From 81ffc315a440f37c5a77ab015b9954704f1d5c6c Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Mon, 24 Feb 2020 17:47:35 -0500 Subject: [PATCH] Remove unused imports for iosxr_acls (#67711) Signed-off-by: Paul Belanger --- .../network/iosxr/config/acls/acls.py | 2 -- .../network/iosxr/facts/acls/acls.py | 1 - .../modules/network/iosxr/test_iosxr_acls.py | 19 +++++++++---------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/lib/ansible/module_utils/network/iosxr/config/acls/acls.py b/lib/ansible/module_utils/network/iosxr/config/acls/acls.py index ef3f24d5366..43dd015ece3 100644 --- a/lib/ansible/module_utils/network/iosxr/config/acls/acls.py +++ b/lib/ansible/module_utils/network/iosxr/config/acls/acls.py @@ -22,14 +22,12 @@ from ansible.module_utils.network.iosxr.utils.utils \ prefix_to_address_wildcard, is_ipv4_address ) -from ansible.module_utils.network.iosxr.argspec.acls.acls import AclsArgs from ansible.module_utils.network.common.utils \ import ( to_list, search_obj_in_list, dict_diff, remove_empties, - dict_merge, ) from ansible.module_utils.six import iteritems from ansible.module_utils.network.iosxr.facts.facts import Facts diff --git a/lib/ansible/module_utils/network/iosxr/facts/acls/acls.py b/lib/ansible/module_utils/network/iosxr/facts/acls/acls.py index f67a3e26d0a..685bb67a94f 100644 --- a/lib/ansible/module_utils/network/iosxr/facts/acls/acls.py +++ b/lib/ansible/module_utils/network/iosxr/facts/acls/acls.py @@ -13,7 +13,6 @@ based on the configuration. from __future__ import absolute_import, division, print_function __metaclass__ = type -import re from copy import deepcopy from collections import deque diff --git a/test/units/modules/network/iosxr/test_iosxr_acls.py b/test/units/modules/network/iosxr/test_iosxr_acls.py index 39058210f64..6eab446a9fa 100644 --- a/test/units/modules/network/iosxr/test_iosxr_acls.py +++ b/test/units/modules/network/iosxr/test_iosxr_acls.py @@ -10,7 +10,6 @@ from units.compat.mock import patch from ansible.modules.network.iosxr import iosxr_acls from units.modules.utils import set_module_args from .iosxr_module import TestIosxrModule, load_fixture -import itertools class TestIosxrAclsModule(TestIosxrModule): @@ -79,7 +78,7 @@ class TestIosxrAclsModule(TestIosxrModule): 'ipv4 access-list acl_1', '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): set_module_args( @@ -97,7 +96,7 @@ class TestIosxrAclsModule(TestIosxrModule): ]) ], state="merged")) - result = self.execute_module(changed=False, commands=[]) + self.execute_module(changed=False, commands=[]) def test_iosxr_acls_replaced(self): set_module_args( @@ -120,7 +119,7 @@ class TestIosxrAclsModule(TestIosxrModule): 'ipv4 access-list acl_2', 'no 10', 'no 20', '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): set_module_args( @@ -143,7 +142,7 @@ class TestIosxrAclsModule(TestIosxrModule): ]) ], state="replaced")) - result = self.execute_module(changed=False, commands=[]) + self.execute_module(changed=False, commands=[]) def test_iosxr_acls_overridden(self): set_module_args( @@ -166,7 +165,7 @@ class TestIosxrAclsModule(TestIosxrModule): 'no ipv6 access-list acl6_1', 'ipv4 access-list acl_2', 'no 10', '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): set_module_args( @@ -202,7 +201,7 @@ class TestIosxrAclsModule(TestIosxrModule): ]) ], state="overridden")) - result = self.execute_module(changed=False, commands=[]) + self.execute_module(changed=False, commands=[]) def test_iosxr_acls_deletedaces(self): set_module_args( @@ -212,19 +211,19 @@ class TestIosxrAclsModule(TestIosxrModule): ], state="deleted")) 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): set_module_args( dict(config=[dict(afi="ipv6", acls=[dict(name="acl6_1")])], state="deleted")) 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): set_module_args(dict(config=[dict(afi="ipv4")], state="deleted")) 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): set_module_args(