mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-29 12:29:10 -07:00
Update slxos_vlan for new SLX-OS versions, linting fixes (#52956)
This commit is contained in:
parent
4ea09d4d96
commit
b92d81cc01
32 changed files with 58 additions and 80 deletions
|
@ -22,8 +22,8 @@ __metaclass__ = type
|
|||
import json
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.exos import exos_command
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.exos import exos_command
|
||||
from .exos_module import TestExosModule, load_fixture
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.exos import exos_config
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.exos import exos_config
|
||||
from .exos_module import TestExosModule, load_fixture
|
||||
|
||||
|
||||
|
|
|
@ -20,12 +20,11 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import json
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.exos import exos_facts
|
||||
from units.modules.utils import set_module_args
|
||||
from .exos_module import TestExosModule, load_fixture
|
||||
from ansible.modules.network.exos import exos_facts
|
||||
from .exos_module import TestExosModule
|
||||
|
||||
|
||||
class TestExosFactsModule(TestExosModule):
|
||||
|
|
|
@ -22,7 +22,6 @@ __metaclass__ = type
|
|||
import os
|
||||
import json
|
||||
|
||||
from ansible.module_utils import basic
|
||||
from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.ironware import ironware_command
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.ironware import ironware_command
|
||||
from .ironware_module import TestIronwareModule, load_fixture
|
||||
|
||||
|
||||
|
|
|
@ -20,12 +20,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import json
|
||||
|
||||
from units.compat.mock import patch
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.ironware import ironware_config
|
||||
from .ironware_module import TestIronwareModule, load_fixture
|
||||
from units.modules.utils import set_module_args
|
||||
|
||||
|
||||
class TestIronwareConfigModule(TestIronwareModule):
|
||||
|
@ -143,7 +141,7 @@ class TestIronwareConfigModule(TestIronwareModule):
|
|||
set_module_args(dict(lines=lines, match='none'))
|
||||
self.execute_module(changed=True, updates=lines)
|
||||
|
||||
def test_ironware_config_match_none(self):
|
||||
def test_ironware_config_match_none_parents(self):
|
||||
lines = ['ip address 1.2.3.4 255.255.255.0', 'port-name test string']
|
||||
parents = ['interface ethernet 1/1']
|
||||
set_module_args(dict(lines=lines, parents=parents, match='none'))
|
||||
|
|
|
@ -22,9 +22,9 @@ __metaclass__ = type
|
|||
import json
|
||||
|
||||
from units.compat.mock import patch
|
||||
from .ironware_module import TestIronwareModule, load_fixture
|
||||
from ansible.modules.network.ironware import ironware_facts
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.ironware import ironware_facts
|
||||
from .ironware_module import TestIronwareModule, load_fixture
|
||||
|
||||
|
||||
class TestIronwareFacts(TestIronwareModule):
|
||||
|
|
|
@ -22,8 +22,8 @@ __metaclass__ = type
|
|||
import json
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.nos import nos_command
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.nos import nos_command
|
||||
from .nos_module import TestNosModule, load_fixture
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.nos import nos_config
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.nos import nos_config
|
||||
from .nos_module import TestNosModule, load_fixture
|
||||
|
||||
|
||||
|
@ -113,7 +113,7 @@ class TestNosConfigModule(TestNosModule):
|
|||
set_module_args(dict(lines=lines, match='none'))
|
||||
self.execute_module(changed=True, commands=lines)
|
||||
|
||||
def test_nos_config_match_none(self):
|
||||
def test_nos_config_match_none_parents(self):
|
||||
lines = ['ip address 1.2.3.4 255.255.255.0', 'description test string']
|
||||
parents = ['interface TenGigabitEthernet 104/0/0']
|
||||
set_module_args(dict(lines=lines, parents=parents, match='none'))
|
||||
|
|
|
@ -20,8 +20,8 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.nos import nos_facts
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.nos import nos_facts
|
||||
from .nos_module import TestNosModule, load_fixture
|
||||
|
||||
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
Total Number of VLANs configured : 3
|
||||
VLAN Name State Ports Classification
|
||||
(R)-RSPAN (u)-Untagged
|
||||
(t)-Tagged
|
||||
Total Number of VLANs configured : 2
|
||||
VLAN Name State Config status Ports Classification
|
||||
(R)-RSPAN (u)-Untagged
|
||||
(t)-Tagged
|
||||
================ =============== ========================== =============== ====================
|
||||
1 default INACTIVE(member port down) Eth 0/45(u)
|
||||
Eth 0/3(u)
|
||||
Eth 0/4(u)
|
||||
1 default ACTIVE Static Eth 1/5(t)
|
||||
|
||||
22 VLAN0022 INACTIVE(no member port)
|
||||
22 VLAN0022 INACTIVE(no member port) Static
|
||||
|
||||
5 VLAN0005 ACTIVE Static Tu 61442(t) vni 5
|
||||
Tu 61443(t) vni 5
|
||||
|
||||
200 VLAN0200 INACTIVE(member port down) Eth 0/8(t)
|
||||
Po 200(u)
|
||||
200 VLAN0200 ACTIVE Dynamic (MVRP) Po 60(t)
|
||||
|
||||
1001 VLAN1001 INACTIVE(no member port)
|
||||
1000 VLAN1000 ACTIVE Dynamic (EP tracking) Po 60(t)
|
||||
|
||||
4090 VLAN4090 INACTIVE(no member port) Static
|
||||
|
|
|
@ -22,8 +22,8 @@ __metaclass__ = type
|
|||
import json
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.slxos import slxos_command
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.slxos import slxos_command
|
||||
from .slxos_module import TestSlxosModule, load_fixture
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.slxos import slxos_config
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.slxos import slxos_config
|
||||
from .slxos_module import TestSlxosModule, load_fixture
|
||||
|
||||
|
||||
|
@ -141,7 +141,7 @@ class TestSlxosConfigModule(TestSlxosModule):
|
|||
set_module_args(dict(lines=lines, match='none'))
|
||||
self.execute_module(changed=True, commands=lines)
|
||||
|
||||
def test_slxos_config_match_none(self):
|
||||
def test_slxos_config_match_none_parents(self):
|
||||
lines = ['ip address 1.2.3.4 255.255.255.0', 'description test string']
|
||||
parents = ['interface Ethernet 0/0']
|
||||
set_module_args(dict(lines=lines, parents=parents, match='none'))
|
||||
|
|
|
@ -20,8 +20,8 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.slxos import slxos_facts
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.slxos import slxos_facts
|
||||
from .slxos_module import TestSlxosModule, load_fixture
|
||||
|
||||
|
||||
|
|
|
@ -20,11 +20,10 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.slxos import slxos_interface
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.slxos import slxos_interface
|
||||
from .slxos_module import TestSlxosModule, load_fixture
|
||||
|
||||
|
||||
|
|
|
@ -20,11 +20,10 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.slxos import slxos_l2_interface
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.slxos import slxos_l2_interface
|
||||
from .slxos_module import TestSlxosModule, load_fixture
|
||||
|
||||
|
||||
|
|
|
@ -20,11 +20,10 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.slxos import slxos_l3_interface
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.slxos import slxos_l3_interface
|
||||
from .slxos_module import TestSlxosModule, load_fixture
|
||||
|
||||
|
||||
|
|
|
@ -20,11 +20,10 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.slxos import slxos_linkagg
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.slxos import slxos_linkagg
|
||||
from .slxos_module import TestSlxosModule, load_fixture
|
||||
|
||||
|
||||
|
|
|
@ -20,11 +20,10 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.slxos import slxos_lldp
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.slxos import slxos_lldp
|
||||
from .slxos_module import TestSlxosModule, load_fixture
|
||||
|
||||
|
||||
|
|
|
@ -20,11 +20,10 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.slxos import slxos_vlan
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.slxos import slxos_vlan
|
||||
from .slxos_module import TestSlxosModule, load_fixture
|
||||
|
||||
|
||||
|
@ -116,7 +115,7 @@ class TestSlxosVlanModule(TestSlxosModule):
|
|||
}
|
||||
)
|
||||
|
||||
def test_slxos_vlan_state_absent_nonexistant_vlan(self, *args, **kwargs):
|
||||
def test_slxos_vlan_state_absent_nonexistent_vlan(self, *args, **kwargs):
|
||||
set_module_args(dict(
|
||||
vlan_id=100,
|
||||
state='absent'
|
||||
|
|
|
@ -22,8 +22,8 @@ __metaclass__ = type
|
|||
import json
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.voss import voss_command
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.voss import voss_command
|
||||
from .voss_module import TestVossModule, load_fixture
|
||||
|
||||
|
||||
|
|
|
@ -21,9 +21,9 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
from units.compat.mock import patch, MagicMock
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.voss import voss_config
|
||||
from ansible.plugins.cliconf.voss import Cliconf
|
||||
from units.modules.utils import set_module_args
|
||||
from .voss_module import TestVossModule, load_fixture
|
||||
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.voss import voss_facts
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.modules.network.voss import voss_facts
|
||||
from .voss_module import TestVossModule, load_fixture
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue