AdminUtils NSX-v3: Add config import
Added import for l2 configuration that was missing and cause the core to crash on unknown config. Also added some more v3 unittests for the admin utils to help us catch similar problems in the future Change-Id: Ieb2fde77e0be4e32a0976cdeedb9680fda19001d
This commit is contained in:
parent
fcac238cb0
commit
43b140625b
@ -16,6 +16,7 @@
|
||||
from oslo_config import cfg
|
||||
|
||||
from neutron.db import db_base_plugin_v2
|
||||
from neutron.db import l3_dvr_db # noqa
|
||||
from neutron import manager
|
||||
from neutron_lib import context
|
||||
from neutron_lib.plugins import constants as const
|
||||
|
@ -278,8 +278,12 @@ class TestNsxv3AdminUtils(AbstractTestAdminUtils,
|
||||
"""
|
||||
args = ["dhcp_profile_uuid=e5b9b249-0034-4729-8ab6-fe4dacaa3a12",
|
||||
"metadata_proxy_uuid=e5b9b249-0034-4729-8ab6-fe4dacaa3a12",
|
||||
"nsx-id=e5b9b249-0034-4729-8ab6-fe4dacaa3a12",
|
||||
"availability-zone=default",
|
||||
"server-ip=1.1.1.1"
|
||||
]
|
||||
# Create some neutron objects for the utilities to run on
|
||||
self._create_router()
|
||||
with self._create_l3_ext_network() as network:
|
||||
with self.subnet(network=network) as subnet:
|
||||
with self.port(subnet=subnet):
|
||||
@ -287,6 +291,15 @@ class TestNsxv3AdminUtils(AbstractTestAdminUtils,
|
||||
self._test_resources_with_args(
|
||||
resources.nsxv3_resources, args)
|
||||
|
||||
def _create_router(self):
|
||||
tenant_id = uuidutils.generate_uuid()
|
||||
data = {'router': {'tenant_id': tenant_id}}
|
||||
data['router']['name'] = 'dummy'
|
||||
data['router']['admin_state_up'] = True
|
||||
|
||||
edgeapi = nsxv_utils.NeutronDbClient()
|
||||
return self._plugin.create_router(edgeapi.context, data)
|
||||
|
||||
|
||||
class TestNsxtvdAdminUtils(AbstractTestAdminUtils):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user