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
parent 6fe0215c8f
commit c386ae9498
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

View File

@@ -109,7 +109,7 @@
- assert:
that:
- "result.changed == true"
- "'interface Ethernet2' in result.commands"
- "'interface ethernet2' in result.commands"
- "'vrf forwarding test' in result.commands"
# Ensure sessions contains epoc. Will fail after 18th May 2033
- "'ansible_1' in result.session_name"
@@ -121,7 +121,7 @@
state: present
authorize: yes
interfaces:
- Ethernet2
- ethernet 2 # interface name modified to test case insensitive and space scenario
provider: "{{ cli }}"
become: yes
register: result