use dvr api def from neutron-lib

The dvr extension's API definition was rehomed into neutron-lib with
commit I6d98e83287833882515240d7db1faa4a1deb7da1 and will be consumed
in neutron with Id5f0be33b036370b7545258a321830fdaa4dc0da

This patch consumes the API def by using neutron-lib's implementation
rather than neutrons.

Change-Id: I1d06c3d607fce1c3887ff121fee7e9132c1ea521
This commit is contained in:
Boden R 2017-11-10 15:54:57 -07:00 committed by Adit Sarfaty
parent 4f56575b1f
commit 65e1f2d6f0
3 changed files with 7 additions and 6 deletions

View File

@ -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
}])

View File

@ -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):

View File

@ -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(