ansible/test/integration/targets/nxos_bgp/tests/common/hels.yaml
Nathaniel Case e9d7fa0418
HTTP(S) API connection plugin (#39224)
* HTTPAPI connection

* Punt run_commands to cliconf or httpapi

* Fake enable_mode on eapi

* Pull changes to nxos

* Move load_config to edit_config for future-preparedness

* Don't fail on lldp disabled

* Re-enable check_rc on nxos' run_commands

* Reorganize nxos httpapi plugin for compatibility

* draft docs for connection: httpapi

* restores docs for connection:local for eapi

* Add _remote_is_local to httpapi
2018-05-17 18:47:15 -04:00

97 lines
2.3 KiB
YAML

---
- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- debug: msg="This test is not supported on {{ image_version }}"
when: imagetag is search("D1")
- set_fact: test_helsinki="false"
- set_fact: test_helsinki="true"
when: imagetag is not search("D1")
- name: "Disable feature BGP"
nxos_feature:
feature: bgp
state: disabled
ignore_errors: yes
when: test_helsinki
- name: "Enable feature BGP"
nxos_feature:
feature: bgp
state: enabled
ignore_errors: yes
when: test_helsinki
- block:
# these tasks will fail on n7k running helsinki
# due to no support
- name: "set helsinki"
nxos_bgp: &set1
asn: 65535
vrf: "{{ item }}"
graceful_restart_timers_restart: 130
graceful_restart_timers_stalepath_time: 310
neighbor_down_fib_accelerate: true
reconnect_interval: 55
timer_bgp_hold: 110
timer_bgp_keepalive: 45
with_items: "{{ vrfs }}"
register: result
when: test_helsinki
- assert: &true
that:
- "result.changed == true"
when: test_helsinki
- name: "Check Idempotence"
nxos_bgp: *set1
with_items: "{{ vrfs }}"
register: result
when: test_helsinki
- assert: &false
that:
- "result.changed == false"
when: test_helsinki
- name: "reset helsinki"
nxos_bgp: &reset1
asn: 65535
vrf: "{{ item }}"
graceful_restart: true
graceful_restart_timers_restart: default
graceful_restart_timers_stalepath_time: default
neighbor_down_fib_accelerate: false
reconnect_interval: default
timer_bgp_hold: default
timer_bgp_keepalive: default
with_items: "{{ vrfs }}"
register: result
when: test_helsinki
- assert: *true
when: test_helsinki
- name: "Check Idempotence"
nxos_bgp: *reset1
with_items: "{{ vrfs }}"
register: result
when: test_helsinki
- assert: *false
when: test_helsinki
rescue:
- debug: msg="Tests can fail on helsinki images"
always:
- name: "Disable feature bgp"
nxos_feature:
feature: bgp
state: disabled
ignore_errors: yes
when: test_helsinki
- debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test"