community.general/lib/ansible
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
..
cli Fix typo in CLI help text (#53353) 2019-03-21 17:39:28 -04:00
compat Have update-bundled check for updates to all bundled code 2019-02-06 13:59:55 -08:00
config use ANSIBLE_ prefix on all ansible-defined env vars (#54272) 2019-03-26 17:43:48 -04:00
errors Catch sshpass authentication errors and don't retry multiple times to prevent account lockout (#50776) 2019-01-23 11:32:25 -05:00
executor Expose loop_control.loop_var as ansible_loop_var (#54240) 2019-03-26 11:07:54 -05:00
galaxy Update galaxy cli metadata file templates (#51398) 2019-02-22 00:54:02 -05:00
inventory Strip whitespace when reading limit file (#53564) 2019-03-18 12:40:45 -04:00
module_utils kubevirt: cleanup module docs (#54119) 2019-03-26 22:22:50 +01:00
modules nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260) 2019-03-27 09:15:50 +05:30
parsing dataloader: check exact value of dir (#52021) 2019-03-16 01:48:01 -04:00
playbook helper: raise Exception when ds is not dict type (#53936) 2019-03-25 11:18:33 +05:30
plugins use ANSIBLE_ prefix on all ansible-defined env vars (#54272) 2019-03-26 17:43:48 -04:00
template dict is dict (#54057) 2019-03-20 09:37:34 -04:00
utils Fix encoding handling in unfrackpath. 2019-03-21 16:19:54 -07:00
vars fixes for stripping (#52930) 2019-03-12 18:18:38 -04:00
__init__.py
constants.py Fine tune sanity (#53544) 2019-03-11 15:12:14 -04:00
context.py Become plugins (#50991) 2019-02-11 11:27:44 -06:00
release.py Codename: How Many More Times 2018-09-04 12:38:29 -04:00