Remove the dependency on the "mock" package
Now that we are python3 only, we should move to using the built in version of mock that supports all of our testing needs and remove the dependency on the "mock" package. This patch moves all references to "import mock" to "from unittest import mock". It also cleans up some new line inconsistency. Fixed an inconsistency in the OVSBridge.deferred() definition as it needs to also have an *args argument. Fixed an issue where an l3-agent test was mocking functools.partial, causing a python3.8 failure. Unit tests only, removing from tests/base.py affects functional tests which need additional work. Change-Id: I40e8a8410840c3774c72ae1a8054574445d66ecechanges/79/711579/12
parent
4b02ed8225
commit
7594bb0627
|
@ -500,8 +500,8 @@ class OVSBridge(BaseOVS):
|
|||
return [f for f in self.run_ofctl("dump-flows", []).splitlines()
|
||||
if is_a_flow_line(f)]
|
||||
|
||||
def deferred(self, **kwargs):
|
||||
return DeferredOVSBridge(self, **kwargs)
|
||||
def deferred(self, *args, **kwargs):
|
||||
return DeferredOVSBridge(self, *args, **kwargs)
|
||||
|
||||
def add_tunnel_port(self, port_name, remote_ip, local_ip,
|
||||
tunnel_type=p_const.TYPE_GRE,
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
|
||||
import signal
|
||||
import sys
|
||||
from unittest import mock
|
||||
|
||||
import eventlet.event
|
||||
from eventlet.green import subprocess
|
||||
import eventlet.queue
|
||||
import mock
|
||||
import testtools
|
||||
|
||||
from neutron.agent.common import async_process
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# under the License.
|
||||
|
||||
import collections
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib import exceptions
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import uuidutils
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from neutron.agent.common import async_process
|
||||
|
|
|
@ -12,10 +12,9 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from unittest import mock
|
||||
import uuid
|
||||
|
||||
import mock
|
||||
|
||||
from neutron.agent.common import placement_report
|
||||
from neutron.tests import base
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron.agent.common import base_polling
|
||||
from neutron.agent.common import polling
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
# under the License.
|
||||
|
||||
import socket
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron.agent.common import utils
|
||||
from neutron.agent.linux import interface
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
import collections
|
||||
import copy
|
||||
import sys
|
||||
from unittest import mock
|
||||
import uuid
|
||||
|
||||
import eventlet
|
||||
import mock
|
||||
from neutron_lib.agent import constants as agent_consts
|
||||
from neutron_lib import constants as const
|
||||
from neutron_lib import exceptions
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib import constants
|
||||
from neutron_lib.utils import helpers
|
||||
from oslo_config import cfg
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib import constants as common_constants
|
||||
from neutron_lib import context
|
||||
from neutron_lib.db import constants as db_consts
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from neutron.agent.l2 import l2_agent_extensions_manager as l2_ext_manager
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from neutron.agent.l3.extensions.qos import base as qos_base
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib import constants as lib_const
|
||||
from neutron_lib import context
|
||||
from neutron_lib import rpc as n_rpc
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib import constants as lib_const
|
||||
from neutron_lib import context
|
||||
from oslo_utils import uuidutils
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib import constants
|
||||
from neutron_lib import context
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import netaddr
|
||||
from neutron_lib import constants as lib_const
|
||||
from neutron_lib import context
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib import constants as lib_const
|
||||
|
||||
from neutron.agent.l3.extensions import snat_log
|
||||
|
|
|
@ -14,15 +14,14 @@
|
|||
# under the License.
|
||||
|
||||
import copy
|
||||
import functools
|
||||
from itertools import chain as iter_chain
|
||||
from itertools import combinations as iter_combinations
|
||||
import os
|
||||
import pwd
|
||||
from unittest import mock
|
||||
|
||||
import eventlet
|
||||
import fixtures
|
||||
import mock
|
||||
import netaddr
|
||||
from neutron_lib.agent import constants as agent_consts
|
||||
from neutron_lib.api.definitions import portbindings
|
||||
|
@ -3998,14 +3997,11 @@ class TestBasicRouterOperations(BasicRouterOperationsFramework):
|
|||
ri.remove_floating_ip.assert_called_once_with(
|
||||
device, need_to_remove_fip[0]['cidr'])
|
||||
|
||||
@mock.patch.object(functools, 'partial')
|
||||
@mock.patch.object(common_utils, 'load_interface_driver')
|
||||
def test_interface_driver_init(self, load_driver_mock, funct_partial_mock):
|
||||
agent = l3_agent.L3NATAgent(HOSTNAME, self.conf)
|
||||
def test_interface_driver_init(self, load_driver_mock):
|
||||
l3_agent.L3NATAgent(HOSTNAME, self.conf)
|
||||
load_driver_mock.assert_called_once_with(
|
||||
self.conf, get_networks_callback=mock.ANY)
|
||||
funct_partial_mock.assert_called_once_with(
|
||||
self.plugin_api.get_networks, agent.context)
|
||||
|
||||
def test_stop_no_cleanup(self):
|
||||
agent = l3_agent.L3NATAgent(HOSTNAME, self.conf)
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib.exceptions import l3 as l3_exc
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib.api.definitions import portbindings
|
||||
from neutron_lib import constants as lib_constants
|
||||
from oslo_config import cfg
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
import copy
|
||||
import signal
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib import constants as n_consts
|
||||
from neutron_lib import fixture as lib_fixtures
|
||||
from oslo_utils import uuidutils
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron.agent.l3 import item_allocator as ia
|
||||
from neutron.tests import base
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib import constants as lib_constants
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from neutron.agent.l3 import dvr_fip_ns
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib import constants as lib_constants
|
||||
from neutron_lib.exceptions import l3 as l3_exc
|
||||
from oslo_utils import uuidutils
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib.callbacks import events as callbacks_events
|
||||
from neutron_lib.callbacks import registry as callbacks_registry
|
||||
from neutron_lib.callbacks import resources as callbacks_resources
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron.agent.linux import iptables_firewall
|
||||
from neutron.agent.linux.openvswitch_firewall import iptables
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib import constants
|
||||
|
||||
from neutron.agent.linux.openvswitch_firewall import constants as ovsfw_consts
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import netutils
|
||||
|
||||
from neutron.agent.linux import bridge_lib
|
||||
|
|
|
@ -17,8 +17,8 @@ import logging
|
|||
from logging import handlers
|
||||
import os
|
||||
import sys
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib import exceptions
|
||||
from neutron_lib import fixture as lib_fixtures
|
||||
import testtools
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
import copy
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import netaddr
|
||||
from neutron_lib.api.definitions import extra_dhcp_opt as edo_ext
|
||||
from neutron_lib import constants
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# under the License.
|
||||
|
||||
import os.path
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib import fixture as lib_fixtures
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import fileutils
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib import constants
|
||||
from oslo_utils import excutils
|
||||
from pyroute2.netlink import exceptions as pyroute2_exc
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron.agent.linux import ip_conntrack
|
||||
from neutron.tests import base
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
import copy
|
||||
import errno
|
||||
import socket
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import netaddr
|
||||
from neutron_lib import constants
|
||||
from neutron_lib import exceptions
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron.agent.linux import ip_link_support as ip_link
|
||||
from neutron.tests import base
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron.agent.linux import ipset_manager
|
||||
from neutron.tests import base
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib import constants
|
||||
from neutron_lib import exceptions
|
||||
from oslo_config import cfg
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
from neutron_lib import constants
|
||||
from neutron_lib import exceptions
|
||||
from neutron_lib.exceptions import l3 as l3_exc
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
import os
|
||||
import textwrap
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib import constants as n_consts
|
||||
import testtools
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib import constants
|
||||
from neutron_lib import exceptions
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron.agent.l3 import dvr_edge_router
|
||||
from neutron.agent.l3 import dvr_local_router
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib import constants
|
||||
from neutron_lib.exceptions import qos as qos_exc
|
||||
from neutron_lib.services.qos import constants as qos_consts
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
import copy
|
||||
import signal
|
||||
import socket
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import six
|
||||
import testtools
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_rootwrap import cmd as oslo_rootwrap_cmd
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib import constants as n_const
|
||||
import testtools
|
||||
import webob
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib import constants
|
||||
from neutron_lib import fixture as lib_fixtures
|
||||
from oslo_config import cfg
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# limitations under the License.
|
||||
|
||||
import collections
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_config import fixture as config_fixture
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib import fixture as lib_fixtures
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# limitations under the License.
|
||||
|
||||
import collections
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_config import fixture as config_fixture
|
||||
from oslo_utils import fileutils
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ovs.db import idl
|
||||
from ovs import jsonrpc
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import testtools
|
||||
from unittest import mock
|
||||
|
||||
from ovsdbapp import exceptions
|
||||
import testtools
|
||||
|
||||
from neutron.agent.ovsdb import impl_idl
|
||||
from neutron.tests import base
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from neutron.agent import agent_extensions_manager as ext_manager
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib.callbacks import events
|
||||
from neutron_lib.callbacks import registry
|
||||
from neutron_lib import context
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import netaddr
|
||||
from neutron_lib.agent import topics as lib_topics
|
||||
from neutron_lib.callbacks import events
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
import collections
|
||||
import contextlib
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import netaddr
|
||||
from neutron_lib.api.definitions import allowedaddresspairs as addr_apidef
|
||||
from neutron_lib import constants as const
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import netifaces
|
||||
|
||||
from neutron.agent.windows import ip_lib
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
# under the License.
|
||||
|
||||
import io
|
||||
from unittest import mock
|
||||
|
||||
import ddt
|
||||
import eventlet
|
||||
from eventlet import tpool
|
||||
import mock
|
||||
from neutron_lib import exceptions
|
||||
import six
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
import copy
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib.api import extensions
|
||||
from neutron_lib.callbacks import events
|
||||
from neutron_lib.callbacks import registry
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib import rpc
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron.api.rpc.callbacks.consumer import registry
|
||||
from neutron.tests import base
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib.callbacks import exceptions
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron.api.rpc.callbacks import exceptions
|
||||
from neutron.api.rpc.callbacks import resources
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib.api.definitions import portbindings
|
||||
from neutron_lib.callbacks import resources
|
||||
from neutron_lib import constants
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron.api.rpc.handlers import dvr_rpc
|
||||
from neutron.tests import base
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib.agent import topics
|
||||
from neutron_lib import context
|
||||
from neutron_lib.objects import common_types
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import netaddr
|
||||
from neutron_lib import context
|
||||
from oslo_utils import uuidutils
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
from neutron_lib import exceptions
|
||||
from neutron_lib.plugins import constants as lib_const
|
||||
from neutron_lib.plugins import directory
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib.api import attributes
|
||||
from neutron_lib.api import converters
|
||||
from neutron_lib.api.definitions import empty_string_filtering
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron_lib import context
|
||||
from neutron_lib import exceptions as n_exc
|
||||
import oslo_i18n
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron.api.v2 import router
|
||||
from neutron.tests import base
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
import signal
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import testtools
|
||||
|
||||
from neutron.cmd import netns_cleanup as util
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron.cmd import ovs_cleanup as util
|
||||
from neutron.tests import base
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from neutron.cmd import sanity_check
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutron.cmd import status
|
||||
from neutron.tests import base
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_upgradecheck.upgradecheck import Code
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib import constants as const
|
||||
from oslo_config import cfg
|
||||
from ovsdbapp.backend.ovs_idl import idlutils
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib import context
|
||||
from oslo_utils import timeutils
|
||||
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import importutils
|
||||
|
||||
from neutron.tests import base
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_config import fixture as config_fixture
|
||||
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_concurrency import lockutils
|
||||
|
||||
from neutron.common import coordination
|
||||
|
|
|
@ -17,11 +17,11 @@ import random
|
|||
import re
|
||||
import sys
|
||||
import time
|
||||
from unittest import mock
|
||||
|
||||
import ddt
|
||||
import eventlet
|
||||
from eventlet import queue
|
||||
import mock
|
||||
import netaddr
|
||||
from neutron_lib import constants
|
||||
from oslo_log import log as logging
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
import itertools
|
||||
from unittest import mock
|
||||
|
||||