Hi all,
I would like to understand the below code snippet in ios_vlan.py,
elif set(interfaces) != set(obj_in_have['interfaces']):
On what scenario the above code snippet will get executed.
Thanks,
Bharathi
Hi all,
I would like to understand the below code snippet in ios_vlan.py,
elif set(interfaces) != set(obj_in_have['interfaces']):
On what scenario the above code snippet will get executed.
Thanks,
Bharathi
Hello Bharathi,
The code snippet you mentioned will be executed when a VLAN with the same VLAN ID(that you’re trying to configure) already exists in the device and you’re trying to associate interfaces to it.
It will compare the existing interfaces with the interfaces you are trying to configure for that VLAN. If they are not “equal”, the module will take care of the missing and superfluous interfaces.
You can use the “q module” to track code execution for Ansible modules.
Thank you,
Nilashish Chakraborty
Associate Software Engineer, Ansible by Red Hat
Red Hat Bangalore, India
Mobile : (+91) 8017535758