diff --git a/lib/ansible/module_utils/network/nxos/config/bfd_interfaces/bfd_interfaces.py b/lib/ansible/module_utils/network/nxos/config/bfd_interfaces/bfd_interfaces.py index 35ff3a9cbbc..3b0d2e7af71 100644 --- a/lib/ansible/module_utils/network/nxos/config/bfd_interfaces/bfd_interfaces.py +++ b/lib/ansible/module_utils/network/nxos/config/bfd_interfaces/bfd_interfaces.py @@ -14,9 +14,9 @@ __metaclass__ = type import re from ansible.module_utils.network.common.cfg.base import ConfigBase -from ansible.module_utils.network.common.utils import dict_diff, to_list, remove_empties +from ansible.module_utils.network.common.utils import dict_diff, to_list from ansible.module_utils.network.nxos.facts.facts import Facts -from ansible.module_utils.network.nxos.utils.utils import flatten_dict, get_interface_type, normalize_interface, search_obj_in_list, vlan_range_to_list +from ansible.module_utils.network.nxos.utils.utils import flatten_dict, search_obj_in_list class Bfd_interfaces(ConfigBase): diff --git a/lib/ansible/module_utils/network/nxos/config/interfaces/interfaces.py b/lib/ansible/module_utils/network/nxos/config/interfaces/interfaces.py index cd9d8012e9b..e95c9d1c3e1 100644 --- a/lib/ansible/module_utils/network/nxos/config/interfaces/interfaces.py +++ b/lib/ansible/module_utils/network/nxos/config/interfaces/interfaces.py @@ -17,7 +17,7 @@ __metaclass__ = type from ansible.module_utils.network.common.cfg.base import ConfigBase from ansible.module_utils.network.common.utils import dict_diff, to_list, remove_empties from ansible.module_utils.network.nxos.facts.facts import Facts -from ansible.module_utils.network.nxos.utils.utils import get_interface_type, normalize_interface, search_obj_in_list +from ansible.module_utils.network.nxos.utils.utils import normalize_interface, search_obj_in_list class Interfaces(ConfigBase): diff --git a/lib/ansible/module_utils/network/nxos/config/l2_interfaces/l2_interfaces.py b/lib/ansible/module_utils/network/nxos/config/l2_interfaces/l2_interfaces.py index 671605e4a06..ad22ba0e356 100644 --- a/lib/ansible/module_utils/network/nxos/config/l2_interfaces/l2_interfaces.py +++ b/lib/ansible/module_utils/network/nxos/config/l2_interfaces/l2_interfaces.py @@ -17,7 +17,7 @@ __metaclass__ = type from ansible.module_utils.network.common.cfg.base import ConfigBase from ansible.module_utils.network.common.utils import dict_diff, to_list, remove_empties from ansible.module_utils.network.nxos.facts.facts import Facts -from ansible.module_utils.network.nxos.utils.utils import flatten_dict, get_interface_type, normalize_interface, search_obj_in_list, vlan_range_to_list +from ansible.module_utils.network.nxos.utils.utils import flatten_dict, normalize_interface, search_obj_in_list, vlan_range_to_list class L2_interfaces(ConfigBase): diff --git a/lib/ansible/module_utils/network/nxos/config/l3_interfaces/l3_interfaces.py b/lib/ansible/module_utils/network/nxos/config/l3_interfaces/l3_interfaces.py index 6dabaef0f0a..2e31ee10467 100644 --- a/lib/ansible/module_utils/network/nxos/config/l3_interfaces/l3_interfaces.py +++ b/lib/ansible/module_utils/network/nxos/config/l3_interfaces/l3_interfaces.py @@ -15,9 +15,9 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible.module_utils.network.common.cfg.base import ConfigBase -from ansible.module_utils.network.common.utils import dict_diff, to_list, remove_empties +from ansible.module_utils.network.common.utils import to_list, remove_empties from ansible.module_utils.network.nxos.facts.facts import Facts -from ansible.module_utils.network.nxos.utils.utils import get_interface_type, normalize_interface, search_obj_in_list, validate_ipv4_addr, validate_ipv6_addr +from ansible.module_utils.network.nxos.utils.utils import normalize_interface, search_obj_in_list class L3_interfaces(ConfigBase): diff --git a/lib/ansible/module_utils/network/nxos/config/lag_interfaces/lag_interfaces.py b/lib/ansible/module_utils/network/nxos/config/lag_interfaces/lag_interfaces.py index 1f7878194e3..226706e6f38 100644 --- a/lib/ansible/module_utils/network/nxos/config/lag_interfaces/lag_interfaces.py +++ b/lib/ansible/module_utils/network/nxos/config/lag_interfaces/lag_interfaces.py @@ -16,7 +16,7 @@ __metaclass__ = type from ansible.module_utils.network.common.cfg.base import ConfigBase from ansible.module_utils.network.common.utils import to_list, remove_empties from ansible.module_utils.network.nxos.facts.facts import Facts -from ansible.module_utils.network.nxos.utils.utils import get_interface_type, normalize_interface, search_obj_in_list +from ansible.module_utils.network.nxos.utils.utils import normalize_interface, search_obj_in_list class Lag_interfaces(ConfigBase): diff --git a/lib/ansible/module_utils/network/nxos/config/lldp_global/lldp_global.py b/lib/ansible/module_utils/network/nxos/config/lldp_global/lldp_global.py index 8020d316eee..75f0d753ffa 100644 --- a/lib/ansible/module_utils/network/nxos/config/lldp_global/lldp_global.py +++ b/lib/ansible/module_utils/network/nxos/config/lldp_global/lldp_global.py @@ -14,7 +14,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.module_utils.network.common.cfg.base import ConfigBase -from ansible.module_utils.network.common.utils import to_list, remove_empties, dict_diff, dict_merge +from ansible.module_utils.network.common.utils import remove_empties, dict_diff from ansible.module_utils.network.nxos.facts.facts import Facts diff --git a/lib/ansible/module_utils/network/nxos/config/telemetry/telemetry.py b/lib/ansible/module_utils/network/nxos/config/telemetry/telemetry.py index 538275115bd..082b1723094 100644 --- a/lib/ansible/module_utils/network/nxos/config/telemetry/telemetry.py +++ b/lib/ansible/module_utils/network/nxos/config/telemetry/telemetry.py @@ -13,9 +13,6 @@ created from __future__ import absolute_import, division, print_function __metaclass__ = type -import re -from copy import deepcopy - from ansible.module_utils.network.common.cfg.base import ConfigBase from ansible.module_utils.network.common.utils import to_list from ansible.module_utils.network.nxos.facts.facts import Facts diff --git a/lib/ansible/module_utils/network/nxos/config/vlans/vlans.py b/lib/ansible/module_utils/network/nxos/config/vlans/vlans.py index 68d1e784eb3..5bd423c0103 100644 --- a/lib/ansible/module_utils/network/nxos/config/vlans/vlans.py +++ b/lib/ansible/module_utils/network/nxos/config/vlans/vlans.py @@ -17,7 +17,7 @@ __metaclass__ = type from ansible.module_utils.network.common.cfg.base import ConfigBase from ansible.module_utils.network.common.utils import dict_diff, to_list, remove_empties from ansible.module_utils.network.nxos.facts.facts import Facts -from ansible.module_utils.network.nxos.utils.utils import get_interface_type, normalize_interface, search_obj_in_list +from ansible.module_utils.network.nxos.utils.utils import search_obj_in_list class Vlans(ConfigBase): diff --git a/lib/ansible/module_utils/network/nxos/facts/facts.py b/lib/ansible/module_utils/network/nxos/facts/facts.py index e08fd7d4000..24825837af1 100644 --- a/lib/ansible/module_utils/network/nxos/facts/facts.py +++ b/lib/ansible/module_utils/network/nxos/facts/facts.py @@ -9,7 +9,6 @@ this file validates each subset of facts and selectively calls the appropriate facts gathering function """ -from ansible.module_utils.network.nxos.argspec.facts.facts import FactsArgs from ansible.module_utils.network.common.facts.facts import FactsBase from ansible.module_utils.network.nxos.facts.legacy.base import Default, Legacy, Hardware, Config, Interfaces, Features from ansible.module_utils.network.nxos.facts.bfd_interfaces.bfd_interfaces import Bfd_interfacesFacts diff --git a/lib/ansible/module_utils/network/nxos/facts/telemetry/telemetry.py b/lib/ansible/module_utils/network/nxos/facts/telemetry/telemetry.py index 4cfa3b896c5..825d1bc8dfa 100644 --- a/lib/ansible/module_utils/network/nxos/facts/telemetry/telemetry.py +++ b/lib/ansible/module_utils/network/nxos/facts/telemetry/telemetry.py @@ -20,7 +20,7 @@ from ansible.module_utils.network.nxos.argspec.telemetry.telemetry import Teleme from ansible.module_utils.network.nxos.cmdref.telemetry.telemetry import TMS_GLOBAL, TMS_DESTGROUP, TMS_SENSORGROUP, TMS_SUBSCRIPTION from ansible.module_utils.network.nxos.utils.telemetry.telemetry import get_instance_data, cr_key_lookup from ansible.module_utils.network.nxos.utils.telemetry.telemetry import normalize_data -from ansible.module_utils.network.nxos.nxos import NxosCmdRef, normalize_interface +from ansible.module_utils.network.nxos.nxos import NxosCmdRef class TelemetryFacts(object): diff --git a/lib/ansible/module_utils/network/nxos/nxos.py b/lib/ansible/module_utils/network/nxos/nxos.py index d7885bcd3d4..826de6a7c1b 100644 --- a/lib/ansible/module_utils/network/nxos/nxos.py +++ b/lib/ansible/module_utils/network/nxos/nxos.py @@ -41,7 +41,7 @@ from ansible.module_utils.connection import Connection, ConnectionError from ansible.module_utils.common._collections_compat import Mapping from ansible.module_utils.network.common.config import NetworkConfig, dumps from ansible.module_utils.network.common.config import CustomNetworkConfig -from ansible.module_utils.six import iteritems, string_types, PY2, PY3 +from ansible.module_utils.six import iteritems, PY2, PY3 from ansible.module_utils.urls import fetch_url try: diff --git a/lib/ansible/modules/network/nxos/_nxos_l2_interface.py b/lib/ansible/modules/network/nxos/_nxos_l2_interface.py index 28afb6d06a8..9ff0f8b5743 100644 --- a/lib/ansible/modules/network/nxos/_nxos_l2_interface.py +++ b/lib/ansible/modules/network/nxos/_nxos_l2_interface.py @@ -120,10 +120,9 @@ commands: - switchport access vlan 20 """ -import re from copy import deepcopy -from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands +from ansible.module_utils.network.nxos.nxos import load_config, run_commands from ansible.module_utils.network.nxos.nxos import nxos_argument_spec, get_interface_type from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.network.common.utils import remove_default_spec diff --git a/lib/ansible/modules/network/nxos/_nxos_linkagg.py b/lib/ansible/modules/network/nxos/_nxos_linkagg.py index 03c3822a11d..fc205f8f48e 100644 --- a/lib/ansible/modules/network/nxos/_nxos_linkagg.py +++ b/lib/ansible/modules/network/nxos/_nxos_linkagg.py @@ -137,7 +137,7 @@ import re from copy import deepcopy from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands -from ansible.module_utils.network.nxos.nxos import get_capabilities, nxos_argument_spec +from ansible.module_utils.network.nxos.nxos import nxos_argument_spec from ansible.module_utils.network.nxos.nxos import normalize_interface from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.network.common.utils import remove_default_spec diff --git a/lib/ansible/modules/network/nxos/_nxos_vlan.py b/lib/ansible/modules/network/nxos/_nxos_vlan.py index 9d48d0c3721..c82ebaf23fd 100644 --- a/lib/ansible/modules/network/nxos/_nxos_vlan.py +++ b/lib/ansible/modules/network/nxos/_nxos_vlan.py @@ -179,7 +179,6 @@ from ansible.module_utils.network.nxos.nxos import get_capabilities from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands from ansible.module_utils.network.nxos.nxos import normalize_interface, nxos_argument_spec from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.connection import ConnectionError from ansible.module_utils.network.common.config import CustomNetworkConfig from ansible.module_utils.network.common.utils import remove_default_spec diff --git a/lib/ansible/modules/network/nxos/nxos_bfd_global.py b/lib/ansible/modules/network/nxos/nxos_bfd_global.py index 95a8b0845de..92e2e458abb 100644 --- a/lib/ansible/modules/network/nxos/nxos_bfd_global.py +++ b/lib/ansible/modules/network/nxos/nxos_bfd_global.py @@ -139,12 +139,10 @@ cmds: ''' -import re from ansible.module_utils.network.nxos.nxos import NxosCmdRef from ansible.module_utils.network.nxos.nxos import nxos_argument_spec, check_args -from ansible.module_utils.network.nxos.nxos import load_config, run_commands +from ansible.module_utils.network.nxos.nxos import load_config from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.network.common.config import CustomNetworkConfig BFD_CMD_REF = """ # The cmd_ref is a yaml formatted list of module commands. diff --git a/lib/ansible/modules/network/nxos/nxos_evpn_vni.py b/lib/ansible/modules/network/nxos/nxos_evpn_vni.py index 6ca4706f652..686b86f8283 100644 --- a/lib/ansible/modules/network/nxos/nxos_evpn_vni.py +++ b/lib/ansible/modules/network/nxos/nxos_evpn_vni.py @@ -95,7 +95,7 @@ commands: ''' import re -from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands +from ansible.module_utils.network.nxos.nxos import get_config, load_config from ansible.module_utils.network.nxos.nxos import nxos_argument_spec, check_args from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.network.common.config import CustomNetworkConfig diff --git a/lib/ansible/modules/network/nxos/nxos_gir.py b/lib/ansible/modules/network/nxos/nxos_gir.py index 652f7dcc4eb..822c600138b 100644 --- a/lib/ansible/modules/network/nxos/nxos_gir.py +++ b/lib/ansible/modules/network/nxos/nxos_gir.py @@ -158,9 +158,8 @@ changed: sample: true ''' -import re -from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands -from ansible.module_utils.network.nxos.nxos import get_capabilities, nxos_argument_spec +from ansible.module_utils.network.nxos.nxos import load_config, run_commands +from ansible.module_utils.network.nxos.nxos import nxos_argument_spec from ansible.module_utils.basic import AnsibleModule diff --git a/lib/ansible/modules/network/nxos/nxos_gir_profile_management.py b/lib/ansible/modules/network/nxos/nxos_gir_profile_management.py index 1d59817067c..9959985ead0 100644 --- a/lib/ansible/modules/network/nxos/nxos_gir_profile_management.py +++ b/lib/ansible/modules/network/nxos/nxos_gir_profile_management.py @@ -98,8 +98,7 @@ changed: ''' -import re -from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands +from ansible.module_utils.network.nxos.nxos import get_config, load_config from ansible.module_utils.network.nxos.nxos import nxos_argument_spec from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.network.common.config import CustomNetworkConfig diff --git a/lib/ansible/modules/network/nxos/nxos_igmp_interface.py b/lib/ansible/modules/network/nxos/nxos_igmp_interface.py index af7da0d369e..5d28dcea95e 100644 --- a/lib/ansible/modules/network/nxos/nxos_igmp_interface.py +++ b/lib/ansible/modules/network/nxos/nxos_igmp_interface.py @@ -189,7 +189,7 @@ changed: sample: true ''' -from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands +from ansible.module_utils.network.nxos.nxos import load_config, run_commands from ansible.module_utils.network.nxos.nxos import nxos_argument_spec, check_args from ansible.module_utils.network.nxos.nxos import get_interface_type from ansible.module_utils.basic import AnsibleModule diff --git a/lib/ansible/modules/network/nxos/nxos_igmp_snooping.py b/lib/ansible/modules/network/nxos/nxos_igmp_snooping.py index 736b8b8f4ea..0f54f1b1ded 100644 --- a/lib/ansible/modules/network/nxos/nxos_igmp_snooping.py +++ b/lib/ansible/modules/network/nxos/nxos_igmp_snooping.py @@ -95,7 +95,7 @@ commands: import re -from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands +from ansible.module_utils.network.nxos.nxos import load_config, run_commands from ansible.module_utils.network.nxos.nxos import nxos_argument_spec, check_args from ansible.module_utils.basic import AnsibleModule diff --git a/lib/ansible/modules/network/nxos/nxos_ntp_auth.py b/lib/ansible/modules/network/nxos/nxos_ntp_auth.py index 1a5289983ff..febbc8a590c 100644 --- a/lib/ansible/modules/network/nxos/nxos_ntp_auth.py +++ b/lib/ansible/modules/network/nxos/nxos_ntp_auth.py @@ -86,7 +86,7 @@ commands: import re -from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands +from ansible.module_utils.network.nxos.nxos import load_config, run_commands from ansible.module_utils.network.nxos.nxos import nxos_argument_spec, check_args from ansible.module_utils.basic import AnsibleModule diff --git a/lib/ansible/modules/network/nxos/nxos_ntp_options.py b/lib/ansible/modules/network/nxos/nxos_ntp_options.py index 30882041a20..da6b82dc70f 100644 --- a/lib/ansible/modules/network/nxos/nxos_ntp_options.py +++ b/lib/ansible/modules/network/nxos/nxos_ntp_options.py @@ -75,7 +75,7 @@ updates: ''' import re -from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands +from ansible.module_utils.network.nxos.nxos import load_config, run_commands from ansible.module_utils.network.nxos.nxos import nxos_argument_spec, check_args from ansible.module_utils.basic import AnsibleModule diff --git a/lib/ansible/modules/network/nxos/nxos_nxapi.py b/lib/ansible/modules/network/nxos/nxos_nxapi.py index f212fc7d97c..3eac89e37c8 100644 --- a/lib/ansible/modules/network/nxos/nxos_nxapi.py +++ b/lib/ansible/modules/network/nxos/nxos_nxapi.py @@ -166,7 +166,6 @@ from ansible.module_utils.network.nxos.nxos import run_commands, load_config from ansible.module_utils.network.nxos.nxos import nxos_argument_spec from ansible.module_utils.network.nxos.nxos import get_capabilities from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.six import iteritems def check_args(module, warnings, capabilities): diff --git a/lib/ansible/modules/network/nxos/nxos_pim_interface.py b/lib/ansible/modules/network/nxos/nxos_pim_interface.py index 5cd08bbd949..3634d25a126 100644 --- a/lib/ansible/modules/network/nxos/nxos_pim_interface.py +++ b/lib/ansible/modules/network/nxos/nxos_pim_interface.py @@ -148,7 +148,6 @@ from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands from ansible.module_utils.network.nxos.nxos import nxos_argument_spec, check_args from ansible.module_utils.network.nxos.nxos import get_interface_type -from ansible.module_utils.six import string_types PARAM_TO_COMMAND_KEYMAP = { diff --git a/lib/ansible/modules/network/nxos/nxos_rpm.py b/lib/ansible/modules/network/nxos/nxos_rpm.py index 16999ccecf0..a33a8ca612c 100644 --- a/lib/ansible/modules/network/nxos/nxos_rpm.py +++ b/lib/ansible/modules/network/nxos/nxos_rpm.py @@ -82,7 +82,7 @@ import time from copy import deepcopy from ansible.module_utils.network.nxos.nxos import load_config, run_commands -from ansible.module_utils.network.nxos.nxos import nxos_argument_spec, check_args +from ansible.module_utils.network.nxos.nxos import nxos_argument_spec from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.network.common.utils import remove_default_spec diff --git a/lib/ansible/modules/network/nxos/nxos_smu.py b/lib/ansible/modules/network/nxos/nxos_smu.py index 148fd143548..5164ee07caa 100644 --- a/lib/ansible/modules/network/nxos/nxos_smu.py +++ b/lib/ansible/modules/network/nxos/nxos_smu.py @@ -63,11 +63,9 @@ commands: ''' -import collections -import re import time -from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands +from ansible.module_utils.network.nxos.nxos import load_config, run_commands from ansible.module_utils.network.nxos.nxos import nxos_argument_spec, check_args from ansible.module_utils.basic import AnsibleModule diff --git a/lib/ansible/modules/network/nxos/nxos_udld.py b/lib/ansible/modules/network/nxos/nxos_udld.py index 73b8b8a4b40..4b54574c5f2 100644 --- a/lib/ansible/modules/network/nxos/nxos_udld.py +++ b/lib/ansible/modules/network/nxos/nxos_udld.py @@ -103,10 +103,8 @@ changed: sample: true ''' -import re - -from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands -from ansible.module_utils.network.nxos.nxos import get_capabilities, nxos_argument_spec +from ansible.module_utils.network.nxos.nxos import load_config, run_commands +from ansible.module_utils.network.nxos.nxos import nxos_argument_spec from ansible.module_utils.basic import AnsibleModule diff --git a/lib/ansible/modules/network/nxos/nxos_user.py b/lib/ansible/modules/network/nxos/nxos_user.py index 8f7aa28830b..b9628420bac 100644 --- a/lib/ansible/modules/network/nxos/nxos_user.py +++ b/lib/ansible/modules/network/nxos/nxos_user.py @@ -137,15 +137,13 @@ delta: type: str sample: "0:00:10.469466" """ -import re - from copy import deepcopy from functools import partial from ansible.module_utils.network.nxos.nxos import run_commands, load_config from ansible.module_utils.network.nxos.nxos import nxos_argument_spec from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.six import string_types, iteritems +from ansible.module_utils.six import iteritems from ansible.module_utils.network.common.utils import remove_default_spec, to_list VALID_ROLES = ['network-admin', 'network-operator', 'vdc-admin', 'vdc-operator', diff --git a/lib/ansible/plugins/action/nxos_file_copy.py b/lib/ansible/plugins/action/nxos_file_copy.py index 444d3196d35..82fbfbd1acd 100644 --- a/lib/ansible/plugins/action/nxos_file_copy.py +++ b/lib/ansible/plugins/action/nxos_file_copy.py @@ -21,21 +21,13 @@ import copy import hashlib import os import re -import sys -import time -import traceback -import uuid from ansible.errors import AnsibleError from ansible.module_utils._text import to_text, to_bytes from ansible.module_utils.connection import Connection from ansible.plugins.action import ActionBase -from ansible.module_utils.six.moves.urllib.parse import urlsplit from ansible.utils.display import Display from ansible.module_utils.compat.paramiko import paramiko -from ansible.module_utils.network.nxos.nxos import run_commands -from ansible.module_utils._text import to_native, to_text, to_bytes -from ansible.module_utils.basic import AnsibleModule from ansible.module_utils import six try: diff --git a/test/units/modules/network/nxos/test_nxos_evpn_vni.py b/test/units/modules/network/nxos/test_nxos_evpn_vni.py index 67dda12432c..64e55e4410c 100644 --- a/test/units/modules/network/nxos/test_nxos_evpn_vni.py +++ b/test/units/modules/network/nxos/test_nxos_evpn_vni.py @@ -31,9 +31,6 @@ class TestNxosEvpnVniModule(TestNxosModule): def setUp(self): super(TestNxosEvpnVniModule, self).setUp() - self.mock_run_commands = patch('ansible.modules.network.nxos.nxos_evpn_vni.run_commands') - self.run_commands = self.mock_run_commands.start() - self.mock_load_config = patch('ansible.modules.network.nxos.nxos_evpn_vni.load_config') self.load_config = self.mock_load_config.start() @@ -42,7 +39,6 @@ class TestNxosEvpnVniModule(TestNxosModule): def tearDown(self): super(TestNxosEvpnVniModule, self).tearDown() - self.mock_run_commands.stop() self.mock_load_config.stop() self.mock_get_config.stop()