nxos_interface_ospf: Add bfd support (#56807)

* nxos_interface_ospf: Add bfd support

Add support for `bfd` state in `nxos_interface_ospf`

- Feature Pull Request

`nxos_interface_ospf`

* Fix pep issues

* sanity loop: syntax

* bfd states changed from T/F to enable/disable/default

* doc hdr fixes
This commit is contained in:
Chris Van Heuveln
2019-06-07 00:28:29 -04:00
committed by Trishna Guha
parent b9a0086aac
commit bd844bc11c
4 changed files with 122 additions and 19 deletions

View File

@@ -5,19 +5,20 @@
- set_fact: testint="{{ nxos_int1 }}"
- name: "Setup - Disable feature OSPF"
nxos_feature: &disable
feature: ospf
- name: Setup - Disable features
nxos_feature:
feature: "{{ item }}"
provider: "{{ connection }}"
state: disabled
loop: ['ospf', 'bfd']
ignore_errors: yes
- name: "Setup - Enable feature OSPF"
nxos_feature: &enable
feature: ospf
- name: Setup - Enable features
nxos_feature:
feature: "{{ item }}"
provider: "{{ connection }}"
state: enabled
ignore_errors: yes
loop: ['ospf', 'bfd']
- name: "Put interface into default state"
nxos_config: &intdefault
@@ -51,6 +52,7 @@
interface: "{{ nxos_int1|upper }}"
ospf: 1
area: 12345678
bfd: enable
cost: 55
passive_interface: true
hello_interval: 15
@@ -99,6 +101,7 @@
interface: "{{ testint }}"
ospf: 1
area: 12345678
bfd: default
cost: default
hello_interval: 10
dead_interval: default
@@ -266,6 +269,7 @@
interface: "{{ testint }}"
ospf: 1
area: 12345678
bfd: disable
cost: 55
passive_interface: true
hello_interval: 15
@@ -282,22 +286,21 @@
- assert: *false
- name: "Disable feature OSPF"
nxos_feature: *disable
always:
- name: Disable features
nxos_feature:
feature: "{{ item }}"
provider: "{{ connection }}"
state: disabled
loop: ['ospf', 'bfd']
ignore_errors: yes
- name: "Interface cleanup"
nxos_config: *intdefault
rescue:
- name: "Disable feature OSPF"
nxos_feature: *disable
- name: "Interface cleanup"
nxos_config: *intdefault
ignore_errors: yes
- name: "Remove port-channel and loopback ints"
nxos_config: *removepcandlb
ignore_errors: yes
always:
- debug: msg="END connection={{ ansible_connection }} nxos_interface_ospf sanity test"