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 57607ffcd2 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

(cherry picked from commit 20fb77c49b)
7 years ago
..
aireos Adding changed option to save_when for aireos (#40681) 8 years ago
aruba Aruba indenting (#33884) 8 years ago
basics code clean of old code from network modules updates (#21469) 9 years ago
cloudvision Add module cv_server_provision for integration with Arista CloudVision Portal. (#25450) 8 years ago
cnos Fix unit tests which modify the source tree. (#45763) 7 years ago
cumulus Remove wildcard import in test_nclu 8 years ago
dellos6 Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554) 8 years ago
dellos9 Ansible 2.5 feature support for dellos9 (#34880) 8 years ago
dellos10 Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554) 8 years ago
edgeos Add unit tests for edgeos_command (#35861) 8 years ago
enos AnsiballZ improvements 7 years ago
eos nxos cliconf plugin refactor (#43203) 7 years ago
exos new module exos_config (#43902) 7 years ago
f5 Various fixes for f5 modules (#44734) 7 years ago
fortimanager fortimanager/fmgr_provisioning.py (#35743) 7 years ago
ftd [stable-2.7] FTD HTTP Api plugin bug fixes (#47747) (#48982) 7 years ago
ios Fix ios_user issues (#44904) 7 years ago
iosxr Fix iosxr cli_config module diff issue (#44898) 7 years ago
ironware Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554) 8 years ago
junos Netconf bytes fixes (#41607) 8 years ago
netact AnsiballZ improvements 7 years ago
netscaler Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554) 8 years ago
nos nos_facts module and tests (#44094) 7 years ago
nso AnsiballZ improvements 7 years ago
nuage Fix Python 3.7 syntax error in tests. 8 years ago
nxos nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260) 7 years ago
onyx issue:43021 add support for onyx version 3.6.6000 and above (#44527) 7 years ago
opx Support for Openswitch (OPX) Control Plane Services (CPS) Module (#44745) 7 years ago
ovs openvswitch_db : Handle column value conversion and idempotency in no_key case (#43869) 7 years ago
radware Fixing lack of failure when uploaded source is invalid (#37461) 8 years ago
routeros New module: routeros — manage MikroTik RouterOS (#41155) 7 years ago
slxos Adding slxos_lldp module (#39259) 8 years ago
voss new voss_facts module (#44234) 7 years ago
vyos Backport 2.7: Return correct version on installed VyOS (#39115) (#46730) 7 years ago
__init__.py adds new module net_command for network devices (#19468) 9 years ago