ansible/test/integration/targets/nxos_bgp/tests/common/isolate.yaml
nkshrishail 01e4c41be4 nxos: Removing local-nxapi plugin and related parameters' usage from the integration tests. (#65068)
* 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
2020-01-08 13:43:23 +05:30

76 lines
1.5 KiB
YAML

---
- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
- debug: msg="This bgp_isolate is not supported on {{ image_version }}"
when: imagetag is search("A8")
- set_fact: bgp_isolate="false"
- set_fact: bgp_isolate="true"
when: imagetag is not search("A8")
- name: "Disable feature BGP"
nxos_feature:
feature: bgp
state: disabled
ignore_errors: yes
- name: "Enable feature BGP"
nxos_feature:
feature: bgp
state: enabled
ignore_errors: yes
- block:
# these tasks will fail on n3k running A8
# due to no support
- name: "set isolate"
nxos_bgp: &set1
asn: 65535
isolate: false
register: result
when: bgp_isolate
- assert: &true
that:
- "result.changed == true"
when: bgp_isolate
- name: "Check Idempotence"
nxos_bgp: *set1
register: result
when: bgp_isolate
- assert: &false
that:
- "result.changed == false"
when: bgp_isolate
- name: "reset isolate"
nxos_bgp: &reset1
asn: 65535
isolate: true
register: result
when: bgp_isolate
- assert: *true
when: bgp_isolate
- name: "Check Idempotence"
nxos_bgp: *reset1
register: result
when: bgp_isolate
- assert: *false
when: bgp_isolate
rescue:
- debug: msg="Tests can fail on A8 images"
always:
- name: "Disable feature bgp"
nxos_feature:
feature: bgp
state: disabled
ignore_errors: yes
- debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test"