vmware-nsx/vmware_nsx/tests/unit/__init__.py
Shih-Hao Li 4483fe5006 Reorganize vmware_nsx/tests structure
This patch is based on https://review.openstack.org/161194
It renames vmware_nsx/tests/unit/vmware/ to vmware_nsx/tests/unit/
and creates subdirectories
vmware_nsx/tests/unit/dvs/
vmware_nsx/tests/unit/nsx_mh/
vmware_nsx/tests/unit/nsx_v/
vmware_nsx/tests/unit/nsx_v3/
vmware_nsx/tests/unit/nsxlib/mh/
vmware_nsx/tests/unit/nsxlib/v3/

This is part of new vmware_nsx directory structure proposed in
https://goo.gl/GdWXyH.

Change-Id: I16aa2455bce55f6455bb5e504ee9684c675b4257
2015-09-24 10:41:10 -07:00

59 lines
2.2 KiB
Python

# Copyright 2013 OpenStack Foundation.
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import os
from networking_l2gw.db.l2gateway import l2gateway_models # noqa
from vmware_nsx.api_client import client as nsx_client
from vmware_nsx.api_client import eventlet_client
from vmware_nsx import extensions
import vmware_nsx.plugin as neutron_plugin
from vmware_nsx.plugins.nsx_v.vshield.common import (
VcnsApiClient as vcnsapi)
from vmware_nsx.plugins.nsx_v.vshield import edge_utils
from vmware_nsx.plugins.nsx_v.vshield import vcns
import vmware_nsx.plugins.nsx_v.vshield.vcns_driver as vcnsdriver
plugin = neutron_plugin.NsxPlugin
api_client = nsx_client.NsxApiClient
evt_client = eventlet_client.EventletApiClient
vcns_class = vcns.Vcns
vcns_driver = vcnsdriver.VcnsDriver
vcns_api_helper = vcnsapi.VcnsApiHelper
edge_manage_class = edge_utils.EdgeManager
STUBS_PATH = os.path.join(os.path.dirname(__file__), 'etc')
NSXEXT_PATH = os.path.dirname(extensions.__file__)
NSXAPI_NAME = '%s.%s' % (api_client.__module__, api_client.__name__)
PLUGIN_NAME = '%s.%s' % (plugin.__module__, plugin.__name__)
CLIENT_NAME = '%s.%s' % (evt_client.__module__, evt_client.__name__)
VCNS_NAME = '%s.%s' % (vcns_class.__module__, vcns_class.__name__)
VCNS_DRIVER_NAME = '%s.%s' % (vcns_driver.__module__, vcns_driver.__name__)
VCNSAPI_NAME = '%s.%s' % (vcns_api_helper.__module__, vcns_api_helper.__name__)
EDGE_MANAGE_NAME = '%s.%s' % (edge_manage_class.__module__,
edge_manage_class.__name__)
def get_fake_conf(filename):
return os.path.join(STUBS_PATH, filename)
def nsx_method(method_name, module_name='nsxlib'):
return '%s.%s.%s' % ('vmware_nsx', module_name,
method_name)