Remove unused imports for iosxr_acls (#67711)

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
pull/63318/head
Paul Belanger 5 years ago committed by GitHub
parent 8fbec3cdeb
commit 81ffc315a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,14 +22,12 @@ from ansible.module_utils.network.iosxr.utils.utils \
prefix_to_address_wildcard, prefix_to_address_wildcard,
is_ipv4_address is_ipv4_address
) )
from ansible.module_utils.network.iosxr.argspec.acls.acls import AclsArgs
from ansible.module_utils.network.common.utils \ from ansible.module_utils.network.common.utils \
import ( import (
to_list, to_list,
search_obj_in_list, search_obj_in_list,
dict_diff, dict_diff,
remove_empties, remove_empties,
dict_merge,
) )
from ansible.module_utils.six import iteritems from ansible.module_utils.six import iteritems
from ansible.module_utils.network.iosxr.facts.facts import Facts from ansible.module_utils.network.iosxr.facts.facts import Facts

@ -13,7 +13,6 @@ based on the configuration.
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
import re
from copy import deepcopy from copy import deepcopy
from collections import deque from collections import deque

@ -10,7 +10,6 @@ from units.compat.mock import patch
from ansible.modules.network.iosxr import iosxr_acls from ansible.modules.network.iosxr import iosxr_acls
from units.modules.utils import set_module_args from units.modules.utils import set_module_args
from .iosxr_module import TestIosxrModule, load_fixture from .iosxr_module import TestIosxrModule, load_fixture
import itertools
class TestIosxrAclsModule(TestIosxrModule): class TestIosxrAclsModule(TestIosxrModule):
@ -79,7 +78,7 @@ class TestIosxrAclsModule(TestIosxrModule):
'ipv4 access-list acl_1', 'ipv4 access-list acl_1',
'10 permit ospf 192.168.1.0 0.0.0.255 any log' '10 permit ospf 192.168.1.0 0.0.0.255 any log'
] ]
result = self.execute_module(changed=True, commands=commands) self.execute_module(changed=True, commands=commands)
def test_iosxr_acls_merged_idempotent(self): def test_iosxr_acls_merged_idempotent(self):
set_module_args( set_module_args(
@ -97,7 +96,7 @@ class TestIosxrAclsModule(TestIosxrModule):
]) ])
], ],
state="merged")) state="merged"))
result = self.execute_module(changed=False, commands=[]) self.execute_module(changed=False, commands=[])
def test_iosxr_acls_replaced(self): def test_iosxr_acls_replaced(self):
set_module_args( set_module_args(
@ -120,7 +119,7 @@ class TestIosxrAclsModule(TestIosxrModule):
'ipv4 access-list acl_2', 'no 10', 'no 20', 'ipv4 access-list acl_2', 'no 10', 'no 20',
'30 permit ospf 10.0.0.0 0.255.255.255 any log' '30 permit ospf 10.0.0.0 0.255.255.255 any log'
] ]
result = self.execute_module(changed=True, commands=commands) self.execute_module(changed=True, commands=commands)
def test_iosxr_acls_replaced_idempotent(self): def test_iosxr_acls_replaced_idempotent(self):
set_module_args( set_module_args(
@ -143,7 +142,7 @@ class TestIosxrAclsModule(TestIosxrModule):
]) ])
], ],
state="replaced")) state="replaced"))
result = self.execute_module(changed=False, commands=[]) self.execute_module(changed=False, commands=[])
def test_iosxr_acls_overridden(self): def test_iosxr_acls_overridden(self):
set_module_args( set_module_args(
@ -166,7 +165,7 @@ class TestIosxrAclsModule(TestIosxrModule):
'no ipv6 access-list acl6_1', 'ipv4 access-list acl_2', 'no 10', 'no ipv6 access-list acl6_1', 'ipv4 access-list acl_2', 'no 10',
'no 20', '40 permit ospf any any log' 'no 20', '40 permit ospf any any log'
] ]
result = self.execute_module(changed=True, commands=commands) self.execute_module(changed=True, commands=commands)
def test_iosxr_acls_overridden_idempotent(self): def test_iosxr_acls_overridden_idempotent(self):
set_module_args( set_module_args(
@ -202,7 +201,7 @@ class TestIosxrAclsModule(TestIosxrModule):
]) ])
], ],
state="overridden")) state="overridden"))
result = self.execute_module(changed=False, commands=[]) self.execute_module(changed=False, commands=[])
def test_iosxr_acls_deletedaces(self): def test_iosxr_acls_deletedaces(self):
set_module_args( set_module_args(
@ -212,19 +211,19 @@ class TestIosxrAclsModule(TestIosxrModule):
], ],
state="deleted")) state="deleted"))
commands = ['ipv4 access-list acl_2', 'no 20'] commands = ['ipv4 access-list acl_2', 'no 20']
result = self.execute_module(changed=True, commands=commands) self.execute_module(changed=True, commands=commands)
def test_iosxr_acls_deletedacls(self): def test_iosxr_acls_deletedacls(self):
set_module_args( set_module_args(
dict(config=[dict(afi="ipv6", acls=[dict(name="acl6_1")])], dict(config=[dict(afi="ipv6", acls=[dict(name="acl6_1")])],
state="deleted")) state="deleted"))
commands = ['no ipv6 access-list acl6_1'] commands = ['no ipv6 access-list acl6_1']
result = self.execute_module(changed=True, commands=commands) self.execute_module(changed=True, commands=commands)
def test_iosxr_acls_deletedafis(self): def test_iosxr_acls_deletedafis(self):
set_module_args(dict(config=[dict(afi="ipv4")], state="deleted")) set_module_args(dict(config=[dict(afi="ipv4")], state="deleted"))
commands = ['no ipv4 access-list acl_2'] commands = ['no ipv4 access-list acl_2']
result = self.execute_module(changed=True, commands=commands) self.execute_module(changed=True, commands=commands)
def test_eos_acls_rendered(self): def test_eos_acls_rendered(self):
set_module_args( set_module_args(

Loading…
Cancel
Save