|
|
@ -25,6 +25,7 @@ import unittest |
|
|
|
from neutron_lib.api.definitions import portbindings |
|
|
|
from neutron_lib.api.definitions import provider_net |
|
|
|
import neutron_lib.constants as q_constants |
|
|
|
from neutron_lib.db import utils as lib_db_utils |
|
|
|
import neutron_lib.exceptions as q_lib_exc |
|
|
|
from neutron_lib.exceptions import availability_zone as az_exc |
|
|
|
from neutron_lib.plugins import constants as plugin_constants |
|
|
@ -72,6 +73,13 @@ from tricircle.tests.unit.network import test_security_groups |
|
|
|
import tricircle.tests.unit.utils as test_utils |
|
|
|
from tricircle.xjob import xmanager |
|
|
|
|
|
|
|
|
|
|
|
# TODO(boden): remove when https://review.openstack.org/#/c/565593/ lands |
|
|
|
if hasattr(_utils, 'filter_non_model_columns'): |
|
|
|
db_utils = _utils |
|
|
|
else: |
|
|
|
db_utils = lib_db_utils |
|
|
|
|
|
|
|
_resource_store = test_utils.get_resource_store() |
|
|
|
TOP_NETS = _resource_store.TOP_NETWORKS |
|
|
|
TOP_SUBNETS = _resource_store.TOP_SUBNETS |
|
|
@ -1949,7 +1957,7 @@ class PluginTest(unittest.TestCase, |
|
|
|
'_update_ips_for_port', new=fake_update_ips_for_port) |
|
|
|
@patch.object(directory, 'get_plugin', new=fake_get_plugin) |
|
|
|
@patch.object(driver.Pool, 'get_instance', new=fake_get_instance) |
|
|
|
@patch.object(_utils, 'filter_non_model_columns', |
|
|
|
@patch.object(db_utils, 'filter_non_model_columns', |
|
|
|
new=fake_filter_non_model_columns) |
|
|
|
@patch.object(context, 'get_context_from_neutron_context') |
|
|
|
def test_update_port(self, mock_context): |
|
|
@ -2035,7 +2043,7 @@ class PluginTest(unittest.TestCase, |
|
|
|
|
|
|
|
@patch.object(directory, 'get_plugin', new=fake_get_plugin) |
|
|
|
@patch.object(driver.Pool, 'get_instance', new=fake_get_instance) |
|
|
|
@patch.object(_utils, 'filter_non_model_columns', |
|
|
|
@patch.object(db_utils, 'filter_non_model_columns', |
|
|
|
new=fake_filter_non_model_columns) |
|
|
|
@patch.object(context, 'get_context_from_neutron_context') |
|
|
|
def test_update_bound_port_mac(self, mock_context): |
|
|
@ -2064,7 +2072,7 @@ class PluginTest(unittest.TestCase, |
|
|
|
|
|
|
|
@patch.object(directory, 'get_plugin', new=fake_get_plugin) |
|
|
|
@patch.object(driver.Pool, 'get_instance', new=fake_get_instance) |
|
|
|
@patch.object(_utils, 'filter_non_model_columns', |
|
|
|
@patch.object(db_utils, 'filter_non_model_columns', |
|
|
|
new=fake_filter_non_model_columns) |
|
|
|
@patch.object(context, 'get_context_from_neutron_context') |
|
|
|
def test_update_non_vm_port(self, mock_context): |
|
|
@ -2101,7 +2109,7 @@ class PluginTest(unittest.TestCase, |
|
|
|
|
|
|
|
@patch.object(FakeRPCAPI, 'setup_shadow_ports') |
|
|
|
@patch.object(driver.Pool, 'get_instance', new=fake_get_instance) |
|
|
|
@patch.object(_utils, 'filter_non_model_columns', |
|
|
|
@patch.object(db_utils, 'filter_non_model_columns', |
|
|
|
new=fake_filter_non_model_columns) |
|
|
|
@patch.object(context, 'get_context_from_neutron_context') |
|
|
|
def test_update_vm_port(self, mock_context, mock_setup): |
|
|
|