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/nxos
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
..
fixtures nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260) 7 years ago
__init__.py new module nxos_system (#21627) 9 years ago
nxos_module.py Surround top-level function and class definitions with two blank lines. 7 years ago
test_nxos_acl.py Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554) 8 years ago
test_nxos_acl_interface.py Unit tests: share common code (#31456) 8 years ago
test_nxos_banner.py Unit tests: share common code (#31456) 8 years ago
test_nxos_bgp.py Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554) 8 years ago
test_nxos_bgp_af.py fix nxos_bgp_af issues (#36147) 8 years ago
test_nxos_bgp_neighbor.py Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554) 8 years ago
test_nxos_bgp_neighbor_af.py Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554) 8 years ago
test_nxos_command.py Unit tests: share common code (#31456) 8 years ago
test_nxos_config.py Fix 'defaults' option in the nxos_config module (#51076) 7 years ago
test_nxos_evpn_global.py Handle nxos platform diffs with cli conf implementation (#34020) 8 years ago
test_nxos_evpn_vni.py fix nxos_evpn_vni issues (#35930) 8 years ago
test_nxos_feature.py Fixes for the N3500 platform that uses the A8 image (#36261) 8 years ago
test_nxos_hsrp.py fix nxos_hsrp issues (#38410) 8 years ago
test_nxos_interface.py Fix nxos_interface multiple issues (#36827) 8 years ago
test_nxos_interface_ospf.py nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260) 7 years ago
test_nxos_ip_interface.py Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554) 8 years ago
test_nxos_nxapi.py Nxapi ssl (#42905) 7 years ago
test_nxos_ospf.py Unit tests: share common code (#31456) 8 years ago
test_nxos_ospf_vrf.py Unit tests: share common code (#31456) 8 years ago
test_nxos_overlay_global.py Unit tests: share common code (#31456) 8 years ago
test_nxos_pim.py Unit tests: share common code (#31456) 8 years ago
test_nxos_pim_interface.py fix nxos_pim_interface issues (#35405) 8 years ago
test_nxos_pim_rp_address.py Unit tests: share common code (#31456) 8 years ago
test_nxos_portchannel.py Deprecate nxos_portchannel and add nxos_linkagg DI module (#33376) 8 years ago
test_nxos_static_route.py Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554) 8 years ago
test_nxos_switchport.py Deprecate nxos_switchport and Add nxos_l2_interface DI module (#33813) 8 years ago
test_nxos_system.py Unit tests: share common code (#31456) 8 years ago
test_nxos_vlan.py nxos_vlan refactor to support non structured output (#43805) 7 years ago
test_nxos_vpc.py fix nxos_vpc issues (#35868) 8 years ago
test_nxos_vpc_interface.py Unit tests: share common code (#31456) 8 years ago
test_nxos_vrf.py Convert nxos_vrf to DI module (#34274) 8 years ago
test_nxos_vrf_af.py Unit tests: share common code (#31456) 8 years ago
test_nxos_vxlan_vtep.py Unit tests: share common code (#31456) 8 years ago
test_nxos_vxlan_vtep_vni.py Unit tests: share common code (#31456) 8 years ago