mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
nxos_igmp_snooping: group-timeout fails when igmp snooping disabled (#53079)
* nxos_igmp_snooping: group-timeout fails when igmp snooping disabled group-timeout config will be rejected by the device if `ip igmp snooping` is disabled. * raise a failure for this condition * reorder the command list so that group-timeout is always last * SA fixes * SA fixes * only call gt_dependency if gt
This commit is contained in:
parent
ea0ef3b2e1
commit
8c33ba3ecd
2 changed files with 48 additions and 1 deletions
|
@ -18,7 +18,7 @@
|
|||
- name: Configure igmp snooping with non-default values
|
||||
nxos_igmp_snooping: &non-default
|
||||
snooping: false
|
||||
group_timeout: "{{group_timeout|default(omit)}}"
|
||||
# group_timeout: n/a when snooping:false
|
||||
link_local_grp_supp: false
|
||||
report_supp: false
|
||||
v3_report_supp: true
|
||||
|
@ -39,6 +39,38 @@
|
|||
- "result.changed == false"
|
||||
when: (imagetag and (imagetag is version_compare('D1', 'ne')))
|
||||
|
||||
- block:
|
||||
- name: Negative Test config group-timeout when igmp snooping disabled
|
||||
nxos_igmp_snooping:
|
||||
snooping: false
|
||||
group_timeout: "{{group_timeout|default(omit)}}"
|
||||
provider: "{{ connection }}"
|
||||
state: present
|
||||
ignore_errors: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.failed == true"
|
||||
- "result.msg == 'group-timeout cannot be enabled or changed when ip igmp snooping is disabled'"
|
||||
|
||||
- name: Configure group-timeout non-default
|
||||
nxos_igmp_snooping: &non-defgt
|
||||
snooping: true
|
||||
group_timeout: "{{group_timeout|default(omit)}}"
|
||||
provider: "{{ connection }}"
|
||||
state: present
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: "Check Idempotence"
|
||||
nxos_igmp_snooping: *non-defgt
|
||||
register: result
|
||||
|
||||
- assert: *false
|
||||
when: gt_run
|
||||
|
||||
- name: Configure igmp snooping with default group timeout
|
||||
nxos_igmp_snooping: &defgt
|
||||
group_timeout: "{{def_group_timeout|default(omit)}}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue