ansible/test/integration/targets/nxos_igmp_snooping/tests/common/sanity.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

78 lines
2.2 KiB
YAML

---
- debug: msg="START connection={{ ansible_connection }} nxos_igmp_snooping sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- set_fact: gt_run="false"
- set_fact: gt_run="true"
when: not (platform is match("N5K")) and not (platform is match("N35"))
- set_fact: group_timeout="never"
when: not (platform is match("N5K")) and not (platform is match("N35"))
- set_fact: def_group_timeout="default"
when: not (platform is match("N5K")) and not (platform is match("N35"))
- block:
- name: Configure igmp snooping with non-default values
nxos_igmp_snooping: &non-default
snooping: false
group_timeout: "{{group_timeout|default(omit)}}"
link_local_grp_supp: false
report_supp: false
v3_report_supp: true
state: present
register: result
- assert: &true
that:
- "result.changed == true"
- block:
- name: "Check Idempotence - Configure igmp snooping with non-default values"
nxos_igmp_snooping: *non-default
register: result
- assert: &false
that:
- "result.changed == false"
when: (imagetag and (imagetag is version_compare('D1', 'ne')))
- name: Configure igmp snooping with default group timeout
nxos_igmp_snooping: &defgt
group_timeout: "{{def_group_timeout|default(omit)}}"
state: present
register: result
- assert: *true
when: gt_run
- block:
- name: "Check Idempotence"
nxos_igmp_snooping: *defgt
register: result
- assert: *false
when: gt_run or (imagetag and (imagetag is version_compare('D1', 'ne')))
- name: Configure igmp snooping with default values
nxos_igmp_snooping: &default
state: default
register: result
- assert: *true
- block:
- name: "Check Idempotence - Configure igmp snooping with default values"
nxos_igmp_snooping: *default
register: result
- assert: *false
when: (imagetag and (imagetag is version_compare('D1', 'ne')))
always:
- name: Configure igmp snooping with default values
nxos_igmp_snooping: *default
register: result
- debug: msg="END connection={{ ansible_connection }} nxos_igmp_snooping sanity test"