1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test
Chris Van Heuveln 20fb77c49b nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260)
* nxos_interfaces_ospf: fix passive-interface states & check_mode

This fix addresses issues #41704 and #45343.

The crux of the problem is that `passive-interface` should have been treated as a tri-state value instead of a boolean.

The `no` form of the command disables the passive state on an interface (allows it to form adjacencies and send routing updates).  It's essentially an override for `passive-interface default` which enables passive state on all OSPF interfaces.\*
This `no` config will be present in `running-config`.

   \**See `router ospf` configuration.*

Since both enable and disable states are explicit configs, the proper way to remove either of these is with the `default` syntax.

Passive-interface config syntax:
```
  ip ospf passive-interface              # enable  (nvgens)
  no ip ospf passive-interface           # disable (nvgens)
  default ip ospf passive-interface      # default (removes config, does not nvgen)
```

Code changes:

* `passive_interface` param changed from boolean to string, restricted to `true`,`false`,`default`.

* Several passive-interface specific checks were added because the existing module logic tends to test for true or false and doesn't handle the None case.

* Fixed `check_mode`.

Sanity verified on: N9K,N7K,N3K,N6K

* Fix doc header

* Unit tests for passive-interface

* doc fix #2

* Fix indent for SA

* Remove 'default' keyword, restore bool behavior

* remove changes to sanity
2019-03-27 09:15:50 +05:30
..
cache Update ansible-test sanity command. (#31958) 2017-10-26 00:21:46 -07:00
env Add env command to ansible-test and run in CI. (#50176) 2018-12-20 22:08:57 -08:00
integration renaming facts to info (#54432) 2019-03-26 20:30:16 -04:00
legacy Cleanup yaml files with incorrect task attrs (#53813) 2019-03-15 13:05:09 -04:00
results Collect data from integration test runs. (#28650) 2017-08-25 18:14:47 -04:00
runner Move interface management into delegate_to test. 2019-03-26 11:15:41 -07:00
sanity Add a script to generate twitter and mailing list announcements 2019-03-22 11:23:54 -07:00
units nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260) 2019-03-27 09:15:50 +05:30
utils Slightly increase non-coverage unit test timeout. 2019-03-21 09:30:43 -07:00