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
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
6 years ago
..
cli Remove unused internal -a argument and functionality (#52602) 6 years ago
compat Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
config Fix encoding issues with file paths. (#50830) 6 years ago
contrib Fix vmware_inventory unit tests so they run. 6 years ago
errors Add better error when k=v syntax is used with YAML in tasks (#41754) 6 years ago
executor Move type checking methods out of basic.py and add unit tests (#53687) 6 years ago
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 10 years ago
mock Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
module_utils New module to install images on Cisco FTD devices (#53467) 6 years ago
modules nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260) 6 years ago
parsing Fieldattribute inheritance with defaults (#50891) 6 years ago
playbook helper: raise Exception when ds is not dict type (#53936) 6 years ago
plugins Avoid erroring on host group confusion in keyed groups (#54099) 6 years ago
regex Add toggle to control invalid character substitution in group names (#52748) 6 years ago
template Native Jinja2: raise undefined error immediately (#52237) 6 years ago
utils Move the arguments module into cli/ and context_objects into utils 6 years ago
vars Fix inventory cache interface (#50446) 6 years ago
__init__.py Add empty-init code-smell script. (#18406) 8 years ago
ansible.cfg Fix ansible-test config management. 7 years ago
conftest.py Update handling of the non_local test alias. 6 years ago
test_constants.py 1st part of ansible config, adds ansible-config to view/manage configs (#12797) 8 years ago
test_context.py Save the command line arguments into a global context 6 years ago