Fix eos_vrf and eos_vlan interfaces param idempotent issue (#34921)

Fixes # 34917

*  Remove spaces from in between interface name
*  Convert interface name to lower case as interface name
   is case insensitive wrt configuring on remote device.
This commit is contained in:
Ganesh Nalawade 2018-01-16 17:46:14 +05:30 committed by GitHub
commit c386ae9498
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 17 deletions

View file

@ -134,9 +134,9 @@
that:
- "result.changed == true"
- "'vlan 4000' in result.commands"
- "'interface Ethernet1' in result.commands"
- "'interface ethernet1' in result.commands"
- "'switchport access vlan 4000' in result.commands"
- "'interface Ethernet2' in result.commands"
- "'interface ethernet2' in result.commands"
- "'switchport access vlan 4000' in result.commands"
# Ensure sessions contains epoc. Will fail after 18th May 2033
- "'ansible_1' in result.session_name"
@ -146,8 +146,8 @@
vlan_id: 4000
state: present
interfaces:
- Ethernet1
- Ethernet2
- ethernet 1 # interface name modified to test case insensitive and space scenario
- ethernet 2 # interface name modified to test case insensitive and space scenario
authorize: yes
provider: "{{ cli }}"
become: yes
@ -175,7 +175,7 @@
that:
- "result.changed == true"
- "'vlan 4000' in result.commands"
- "'interface Ethernet2' in result.commands"
- "'interface ethernet2' in result.commands"
- "'no switchport access vlan 4000' in result.commands"
# Ensure sessions contains epoc. Will fail after 18th May 2033
- "'ansible_1' in result.session_name"
@ -185,7 +185,7 @@
vlan_id: 4000
state: present
interfaces:
- Ethernet1
- ethernet 1 # interface name modified to handle case insensitive and space scenario
authorize: yes
provider: "{{ cli }}"
become: yes