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
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
..
cloud Bug 42787 create volume with label (#46527) 7 years ago
files Fixes #34893 (#40166) 8 years ago
monitoring Update pagerduty modules to rest v2 (#42618) 7 years ago
net_tools [2.7] nmcli: backport of #42415 (#46814) 7 years ago
network nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260) 7 years ago
packaging [stable-2.7] Fix unit test issues with pytest >= 4.0.0. 7 years ago
remote_management [stable-2.7] Mocking out __future__ could cause problems 7 years ago
source_control AnsiballZ improvements 7 years ago
storage Fix unit tests which modify the source tree. (#45763) 7 years ago
system Backport/2.7/54105 pamd: fix idempotence issue when removing rules (#54105) 7 years ago
web_infrastructure Fix jenkins_plugin test for no net situations (#30568) 8 years ago
__init__.py Some algorithmic unittests for the apt and docker modules 10 years ago
conftest.py AnsiballZ improvements 7 years ago
utils.py AnsiballZ improvements 7 years ago