Make ios_vlan identify vlans starting with 9 (#42247)

* Make ios_vlan identify vlans starting with 9

* Add unit test for vlan id start with 9
This commit is contained in:
Zhikang Zhang 2018-07-09 09:50:06 -04:00 committed by GitHub
parent 26b0908270
commit 70e33ef92c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 2 deletions

View file

@ -59,6 +59,12 @@ class TestIosVlanModule(TestIosModule):
]
self.assertEqual(result['commands'], expected_commands)
def test_ios_vlan_id_startwith_9(self):
set_module_args({'vlan_id': '9', 'name': 'vlan9', 'state': 'present'})
result = self.execute_module(changed=False)
expected_commands = []
self.assertEqual(result['commands'], expected_commands)
def test_ios_vlan_rename(self):
set_module_args({'vlan_id': '2', 'name': 'test', 'state': 'present'})
result = self.execute_module(changed=True)
@ -121,6 +127,14 @@ class TestIosVlanModule(TestIosModule):
'state': 'active',
'vlan_id': '2',
},
{
'name': 'vlan9',
'interfaces': [
'GigabitEthernet1/0/6',
],
'state': 'active',
'vlan_id': '9',
},
{
'name': 'fddi-default',
'interfaces': [],