ansible/test/integration/targets/nxos_igmp_interface/tests/common/sanity.yaml
rahushen ab84718a01 NXOS: Integration tests to Ansible (part 3) (#29030)
* Add nxos_file_copy IT

* Restructure nxos_igmp tests

* add nxos_igmp_interface IT

* add nxos_igmp_snooping IT

* add nxos_ntp_auth IT

* Add nxos_ntp_options IT

* update nxos.yaml with new tests

* update nxos_ntp_options test

* update nxos_ntp_auth IT
2017-10-25 11:41:23 -04:00

90 lines
2.2 KiB
YAML

---
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_igmp_interface sanity test"
# Select interface for test
- set_fact: intname="{{ nxos_int1 }}"
- name: "Enable feature PIM"
nxos_feature:
feature: pim
state: enabled
provider: "{{ connection }}"
ignore_errors: yes
- block:
- name: put interface in L3 and enable PIM
nxos_config:
commands:
- no switchport
- ip pim sparse-mode
parents:
- "interface {{ intname }}"
match: none
provider: "{{ connection }}"
- name: Configure igmp interface with non-default values
nxos_igmp_interface: &non-default
interface: "{{ intname }}"
version: 3
startup_query_interval: 60
startup_query_count: 5
robustness: 6
querier_timeout: 2000
query_mrt: 12
query_interval: 200
last_member_qrt: 2
last_member_query_count: 4
report_llg: true
immediate_leave: true
restart: false
state: present
provider: "{{ connection }}"
register: result
- assert: &true
that:
- "result.changed == true"
- name: "Check Idempotence - Configure igmp interface with non-default values"
nxos_igmp_interface: *non-default
register: result
- assert: &false
that:
- "result.changed == false"
- name: Configure igmp interface with default value
nxos_igmp_interface: &default
interface: "{{ intname }}"
state: default
provider: "{{ connection }}"
register: result
- assert: *true
- name: "Check Idempotence - Configure igmp interface with default value"
nxos_igmp_interface: *default
register: result
- assert: *false
always:
- name: Configure igmp interface with default value
nxos_igmp_interface: *default
register: result
- name: Put interface in default mode
nxos_config:
commands:
- "default interface {{ intname }}"
provider: "{{ connection }}"
match: none
- name: "Disable feature PIM"
nxos_feature:
feature: pim
state: disabled
provider: "{{ connection }}"
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_igmp_interface sanity test"