Run neighbors intent tests for ios_interface only if show lldp contains netdev (#31539)

This commit is contained in:
Ricardo Carrillo Cruz 2017-10-10 21:26:47 +02:00 committed by GitHub
parent 24c360287e
commit bd17edd5ed

View file

@ -61,6 +61,14 @@
- "result.failed == true" - "result.failed == true"
- "'state eq(up)' in result.failed_conditions" - "'state eq(up)' in result.failed_conditions"
- name: Register show neighbors detail
ios_command:
commands:
- show lldp neighbors
authorize: yes
register: show_lldp_neighbors_result
- block:
- name: Check neighbors intent arguments - name: Check neighbors intent arguments
ios_interface: ios_interface:
name: Gi0/0 name: Gi0/0
@ -91,6 +99,7 @@
- "result.failed == true" - "result.failed == true"
- "'host dummy_host' in result.failed_conditions" - "'host dummy_host' in result.failed_conditions"
- "'port dummy_port' in result.failed_conditions" - "'port dummy_port' in result.failed_conditions"
when: '"netdev" in show_lldp_neighbors_result.stdout'
- name: Aggregate config + intent (pass) - name: Aggregate config + intent (pass)
ios_interface: ios_interface:
@ -107,6 +116,7 @@
that: that:
- "result.failed == false" - "result.failed == false"
- block:
- name: Aggregate neighbors intent (pass) - name: Aggregate neighbors intent (pass)
ios_interface: ios_interface:
aggregate: aggregate:
@ -142,3 +152,4 @@
- "result.failed == true" - "result.failed == true"
- "'host dummy_host' in result.failed_conditions" - "'host dummy_host' in result.failed_conditions"
- "'port dummy_port' in result.failed_conditions" - "'port dummy_port' in result.failed_conditions"
when: "'netdev' in show_lldp_neighbors_result.stdout"