01e4c41be4
* nxos_integration_tests: Removing obsolete provider parameter * nxos: removing support for local-nxapi plugin * nxos: removing LocalNxapi plugin implementation * nxos_nxapi: removing local plugin usage * REVERT - nxos: removing LocalNxapi plugin implementation * Addressing yamllint issues * Removing the condition on the debug messages * Restoring changes done to nxos_nxapi* tests * Retaining timeout of 500 on nxos_smoke test * Some cleanup * Addressing latest comments * Restoring the nxos_smoke and removing timeout from nxos_config and nxos_rollback
140 lines
3 KiB
YAML
140 lines
3 KiB
YAML
---
|
|
- debug: msg="START connection={{ ansible_connection }} nxos_vpc_interface sanity test"
|
|
|
|
- block:
|
|
- name: enable feature vpc
|
|
nxos_feature:
|
|
feature: vpc
|
|
state: enabled
|
|
|
|
- name: create port-channel10
|
|
nxos_config:
|
|
commands:
|
|
- interface port-channel10
|
|
- switchport
|
|
match: none
|
|
|
|
- name: create port-channel11
|
|
nxos_config:
|
|
commands:
|
|
- interface port-channel11
|
|
- switchport
|
|
match: none
|
|
|
|
- name: configure vpc
|
|
nxos_vpc:
|
|
state: present
|
|
domain: 100
|
|
role_priority: 32667
|
|
system_priority: 2000
|
|
pkl_dest: 192.168.100.4
|
|
pkl_src: 10.1.100.20
|
|
peer_gw: true
|
|
auto_recovery: false
|
|
|
|
- name: Configure vpc port channel
|
|
nxos_vpc_interface: &conf
|
|
portchannel: 10
|
|
vpc: 10
|
|
register: result
|
|
|
|
- assert: &true
|
|
that:
|
|
- "result.changed == true"
|
|
|
|
- name: "Conf Idempotence"
|
|
nxos_vpc_interface: *conf
|
|
register: result
|
|
|
|
- assert: &false
|
|
that:
|
|
- "result.changed == false"
|
|
|
|
# The vpc peer-link command seems to be invalid for the NXOSv we have in Zuul CI
|
|
# Hence, we're temporarily skipping the tests that have `peer_link` key
|
|
|
|
- name: Configure vpc port channel
|
|
nxos_vpc_interface: &conf1
|
|
portchannel: 11
|
|
peer_link: True
|
|
register: result
|
|
when: image_version != "7.0(3)I5(1)"
|
|
|
|
- assert: *true
|
|
when: image_version != "7.0(3)I5(1)"
|
|
|
|
- name: "Conf Idempotence"
|
|
nxos_vpc_interface: *conf1
|
|
register: result
|
|
when: image_version != "7.0(3)I5(1)"
|
|
|
|
- assert: *false
|
|
when: image_version != "7.0(3)I5(1)"
|
|
|
|
- name: Configure vpc port channel
|
|
nxos_vpc_interface: &conf2
|
|
portchannel: 11
|
|
peer_link: False
|
|
register: result
|
|
when: image_version != "7.0(3)I5(1)"
|
|
|
|
- assert: *true
|
|
when: image_version != "7.0(3)I5(1)"
|
|
|
|
- name: "Conf Idempotence"
|
|
nxos_vpc_interface: *conf2
|
|
register: result
|
|
when: image_version != "7.0(3)I5(1)"
|
|
|
|
- assert: *false
|
|
when: image_version != "7.0(3)I5(1)"
|
|
|
|
- name: remove vpc port channel
|
|
nxos_vpc_interface: &remove
|
|
portchannel: 10
|
|
vpc: 10
|
|
state: absent
|
|
register: result
|
|
|
|
- assert: *true
|
|
|
|
- name: "Remove Idempotence"
|
|
nxos_vpc_interface: *remove
|
|
register: result
|
|
|
|
- assert: *false
|
|
|
|
always:
|
|
- name: remove vpc
|
|
nxos_vpc:
|
|
state: absent
|
|
domain: 100
|
|
role_priority: 32667
|
|
system_priority: 2000
|
|
pkl_dest: 192.168.100.4
|
|
pkl_src: 10.1.100.20
|
|
peer_gw: true
|
|
auto_recovery: false
|
|
ignore_errors: yes
|
|
|
|
- name: remove vpc port channel
|
|
nxos_vpc_interface:
|
|
portchannel: 10
|
|
vpc: 10
|
|
state: absent
|
|
ignore_errors: yes
|
|
|
|
- name: remove port channel
|
|
nxos_config:
|
|
commands:
|
|
- no interface port-channel10
|
|
- no interface port-channel11
|
|
match: none
|
|
ignore_errors: yes
|
|
|
|
- name: disable feature vpc
|
|
nxos_feature:
|
|
feature: vpc
|
|
state: disabled
|
|
|
|
- debug: msg="END connection={{ ansible_connection }} nxos_vpc_interface sanity test"
|