diff --git a/vmware_nsx/db/distributedrouter.py b/vmware_nsx/db/distributedrouter.py index 9286d99307..6d652f0177 100644 --- a/vmware_nsx/db/distributedrouter.py +++ b/vmware_nsx/db/distributedrouter.py @@ -14,7 +14,8 @@ # under the License. # -from neutron.extensions import dvr as dist_rtr +from neutron_lib.api.definitions import dvr as dvr_apidef + from vmware_nsx.db import nsxrouter @@ -23,6 +24,6 @@ class DistributedRouter_mixin(nsxrouter.NsxRouterMixin): nsx_attributes = ( nsxrouter.NsxRouterMixin.nsx_attributes + [{ - 'name': dist_rtr.DISTRIBUTED, + 'name': dvr_apidef.DISTRIBUTED, 'default': False }]) diff --git a/vmware_nsx/tests/unit/nsx_mh/test_plugin.py b/vmware_nsx/tests/unit/nsx_mh/test_plugin.py index 30bcaac3b3..2c4ca6887d 100644 --- a/vmware_nsx/tests/unit/nsx_mh/test_plugin.py +++ b/vmware_nsx/tests/unit/nsx_mh/test_plugin.py @@ -16,7 +16,6 @@ import copy import uuid import mock -from neutron.extensions import dvr from neutron.extensions import l3 from neutron.extensions import securitygroup as secgrp from neutron.tests.unit import _test_extension_portbindings as test_bindings @@ -26,6 +25,7 @@ import neutron.tests.unit.extensions.test_l3 as test_l3_plugin import neutron.tests.unit.extensions.test_l3_ext_gw_mode as test_ext_gw_mode import neutron.tests.unit.extensions.test_securitygroup as ext_sg from neutron.tests.unit import testlib_api +from neutron_lib.api.definitions import dvr as dvr_apidef from neutron_lib.api.definitions import external_net as extnet_apidef from neutron_lib.api.definitions import l3_ext_gw_mode as l3_egm_apidef from neutron_lib.api.definitions import portbindings @@ -458,7 +458,7 @@ class TestL3ExtensionManager(object): l3.L3().update_attributes_map( l3_egm_apidef.RESOURCE_ATTRIBUTE_MAP) l3.L3().update_attributes_map( - dvr.EXTENDED_ATTRIBUTES_2_0) + dvr_apidef.RESOURCE_ATTRIBUTE_MAP) return l3.L3.get_resources() def get_actions(self): diff --git a/vmware_nsx/tests/unit/nsx_v/test_plugin.py b/vmware_nsx/tests/unit/nsx_v/test_plugin.py index cfd20a8a3a..220204d040 100644 --- a/vmware_nsx/tests/unit/nsx_v/test_plugin.py +++ b/vmware_nsx/tests/unit/nsx_v/test_plugin.py @@ -20,7 +20,6 @@ from eventlet import greenthread import mock import netaddr from neutron.extensions import address_scope -from neutron.extensions import dvr as dist_router from neutron.extensions import l3 from neutron.extensions import l3_flavors from neutron.extensions import securitygroup as secgrp @@ -37,6 +36,7 @@ import neutron.tests.unit.extensions.test_portsecurity as test_psec import neutron.tests.unit.extensions.test_securitygroup as ext_sg from neutron.tests.unit import testlib_api from neutron_lib.api.definitions import allowedaddresspairs as addrp_apidef +from neutron_lib.api.definitions import dvr as dvr_apidef from neutron_lib.api.definitions import external_net as extnet_apidef from neutron_lib.api.definitions import extra_dhcp_opt as edo_ext from neutron_lib.api.definitions import l3 as l3_apidef @@ -2098,7 +2098,7 @@ class TestL3ExtensionManager(object): l3.L3().update_attributes_map( l3_egm_apidef.RESOURCE_ATTRIBUTE_MAP) l3.L3().update_attributes_map( - dist_router.EXTENDED_ATTRIBUTES_2_0) + dvr_apidef.RESOURCE_ATTRIBUTE_MAP) l3.L3().update_attributes_map( router_type.EXTENDED_ATTRIBUTES_2_0) l3.L3().update_attributes_map(