ansible/test/units/modules/network
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
..
aireos Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
aruba Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
basics
checkpoint Add checkpoint_session module (#50930) 2019-01-16 13:19:36 +01:00
cli Add backup parameter to cli_config (#50206) 2018-12-21 09:55:14 -05:00
cloudvision Ensure that current uses of BaseException are required 2018-12-16 15:03:19 -08:00
cnos Lenovo cnos system module (#53764) 2019-03-20 08:50:45 -04:00
cumulus
dellos6 Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
dellos9 Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
dellos10 Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
edgeos Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
edgeswitch new network module: edgeswitch_vlan (#48041) 2018-12-17 11:30:17 +05:30
enos Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
eos New module for BGP configuration management in Arista EOS (#52722) 2019-03-12 17:31:58 +05:30
exos Update slxos_vlan for new SLX-OS versions, linting fixes (#52956) 2019-03-15 08:55:50 +00:00
f5 Remove nose from unittests (#54055) 2019-03-19 18:36:45 -07:00
fortimanager FortiManager Plugin Module Conversion: fmgr_ha (#52768) 2019-03-07 12:31:17 +05:30
frr frr: New module for BGP configuration management (#51281) 2019-03-04 15:02:56 +05:30
ftd New module to install images on Cisco FTD devices (#53467) 2019-03-26 19:35:53 +05:30
ingate modules: network: ingate: Add module ig_store_edit (#47675) 2019-01-17 23:05:45 -05:00
ios Add platform facts in network facts modules (#51434) 2019-03-11 10:56:39 +05:30
iosxr Add platform facts in network facts modules (#51434) 2019-03-11 10:56:39 +05:30
ironware Update slxos_vlan for new SLX-OS versions, linting fixes (#52956) 2019-03-15 08:55:50 +00:00
itential itential iap_start_workflow module (#51238) 2019-03-07 13:23:40 -05:00
junos Add platform facts in network facts modules (#51434) 2019-03-11 10:56:39 +05:30
netact
netscaler
netvisor Pluribus Networks network cli terminal and cliconf plugins (#53735) 2019-03-15 13:51:50 +05:30
nos Update slxos_vlan for new SLX-OS versions, linting fixes (#52956) 2019-03-15 08:55:50 +00:00
nso NSO - added validate_certs parameter to allow for ignoring of SSL certificates (#51981) 2019-02-25 14:17:56 +00:00
nuage Replace nose with pytest 2018-11-26 13:41:57 -08:00
nxos nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260) 2019-03-27 09:15:50 +05:30
onyx Fix Issue #39598 (#49982) 2018-12-21 11:54:10 +05:30
opx opx_cps_changes (#51952) 2019-03-07 03:41:36 -05:00
ovs Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
radware
routeros Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
slxos Update slxos_vlan for new SLX-OS versions, linting fixes (#52956) 2019-03-15 08:55:50 +00:00
voss Update slxos_vlan for new SLX-OS versions, linting fixes (#52956) 2019-03-15 08:55:50 +00:00
vyos Add platform facts in network facts modules (#51434) 2019-03-11 10:56:39 +05:30
__init__.py