You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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
6 years ago
..
aireos Update bare exceptions to specify Exception. 6 years ago
aruba Update bare exceptions to specify Exception. 6 years ago
basics code clean of old code from network modules updates (#21469) 8 years ago
checkpoint Add checkpoint_session module (#50930) 6 years ago
cli Add backup parameter to cli_config (#50206) 6 years ago
cloudvision Ensure that current uses of BaseException are required 6 years ago
cnos Lenovo cnos system module (#53764) 6 years ago
cumulus Remove wildcard import in test_nclu 7 years ago
dellos6 Update bare exceptions to specify Exception. 6 years ago
dellos9 Update bare exceptions to specify Exception. 6 years ago
dellos10 Update bare exceptions to specify Exception. 6 years ago
edgeos Update bare exceptions to specify Exception. 6 years ago
edgeswitch new network module: edgeswitch_vlan (#48041) 6 years ago
enos Update bare exceptions to specify Exception. 6 years ago
eos New module for BGP configuration management in Arista EOS (#52722) 6 years ago
exos Update slxos_vlan for new SLX-OS versions, linting fixes (#52956) 6 years ago
f5 Remove nose from unittests (#54055) 6 years ago
fortimanager FortiManager Plugin Module Conversion: fmgr_ha (#52768) 6 years ago
frr frr: New module for BGP configuration management (#51281) 6 years ago
ftd New module to install images on Cisco FTD devices (#53467) 6 years ago
ingate modules: network: ingate: Add module ig_store_edit (#47675) 6 years ago
ios Add platform facts in network facts modules (#51434) 6 years ago
iosxr Add platform facts in network facts modules (#51434) 6 years ago
ironware Update slxos_vlan for new SLX-OS versions, linting fixes (#52956) 6 years ago
itential itential iap_start_workflow module (#51238) 6 years ago
junos Add platform facts in network facts modules (#51434) 6 years ago
netact Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
netscaler Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
netvisor Pluribus Networks network cli terminal and cliconf plugins (#53735) 6 years ago
nos Update slxos_vlan for new SLX-OS versions, linting fixes (#52956) 6 years ago
nso NSO - added validate_certs parameter to allow for ignoring of SSL certificates (#51981) 6 years ago
nuage Replace nose with pytest 6 years ago
nxos nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260) 6 years ago
onyx Fix Issue #39598 (#49982) 6 years ago
opx opx_cps_changes (#51952) 6 years ago
ovs Update bare exceptions to specify Exception. 6 years ago
radware Enable additional pylint rules and resolve issues found. (#47221) 6 years ago
routeros Update bare exceptions to specify Exception. 6 years ago
slxos Update slxos_vlan for new SLX-OS versions, linting fixes (#52956) 6 years ago
voss Update slxos_vlan for new SLX-OS versions, linting fixes (#52956) 6 years ago
vyos Add platform facts in network facts modules (#51434) 6 years ago
__init__.py adds new module net_command for network devices (#19468) 8 years ago