ansible/test/units
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 Remove unused internal -a argument and functionality (#52602) 2019-02-19 17:49:06 -06:00
compat Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
config Fix encoding issues with file paths. (#50830) 2019-01-14 13:06:47 -08:00
contrib Fix vmware_inventory unit tests so they run. 2018-10-09 22:52:04 -07:00
errors Add better error when k=v syntax is used with YAML in tasks (#41754) 2018-12-04 12:32:02 -05:00
executor Move type checking methods out of basic.py and add unit tests (#53687) 2019-03-21 09:40:19 -04:00
inventory_test_data/group_vars
mock Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
module_utils New module to install images on Cisco FTD devices (#53467) 2019-03-26 19:35:53 +05:30
modules nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260) 2019-03-27 09:15:50 +05:30
parsing Fieldattribute inheritance with defaults (#50891) 2019-01-23 11:40:07 -06:00
playbook helper: raise Exception when ds is not dict type (#53936) 2019-03-25 11:18:33 +05:30
plugins Avoid erroring on host group confusion in keyed groups (#54099) 2019-03-25 16:57:46 -04:00
regex Add toggle to control invalid character substitution in group names (#52748) 2019-03-06 11:49:40 -05:00
template Native Jinja2: raise undefined error immediately (#52237) 2019-02-15 19:36:12 +01:00
utils Move the arguments module into cli/ and context_objects into utils 2019-01-03 18:12:23 -08:00
vars Fix inventory cache interface (#50446) 2019-03-06 12:12:35 -06:00
__init__.py
ansible.cfg Fix ansible-test config management. 2017-10-04 12:52:36 -07:00
conftest.py Update handling of the non_local test alias. 2019-03-22 16:05:24 -07:00
test_constants.py
test_context.py Save the command line arguments into a global context 2019-01-03 18:12:23 -08:00