Merge "Fixes vmware_nsx_tempest tempest plugin issues with tempest"

This commit is contained in:
Jenkins 2017-05-17 17:57:55 +00:00 committed by Gerrit Code Review
commit 3b2bdea363
4 changed files with 16 additions and 39 deletions

View File

@ -21,6 +21,7 @@ classifier =
[files]
packages =
vmware_nsx
vmware_nsx_tempest
[entry_points]
console_scripts =

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
# 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 pbr.version
__version__ = pbr.version.VersionInfo(
'vmware_nsx_tempest').version_string()

View File

@ -67,6 +67,7 @@ NetworkGroup = [
default='mail',
help="host exists in dns_search_domain"),
cfg.StrOpt('public_network_cidr',
default='',
help="Public network cidr which provides external network"
" connectivity"),
cfg.StrOpt('backend',

View File

@ -22,6 +22,15 @@ from tempest.test_discover import plugins
from vmware_nsx_tempest import config as config_nsx
_opts = [
(config_nsx.scenario_group, config_nsx.ScenarioGroup),
(config_nsx.network_group, config_nsx.NetworkGroup),
(config_nsx.nsxv_group, config_nsx.NSXvGroup),
(config_nsx.l2gw_group, config_nsx.L2gwGroup),
(config_nsx.nsxv3_group, config_nsx.NSXv3Group)
]
class VMwareNsxTempestPlugin(plugins.TempestPlugin):
"""Our addon configuration is defined at vmware_nsx_tempest/config.py
@ -38,29 +47,14 @@ class VMwareNsxTempestPlugin(plugins.TempestPlugin):
base_path = os.path.split(mydir)[0]
test_dir = "vmware_nsx_tempest/tests"
test_fullpath = os.path.join(base_path, test_dir)
return (test_fullpath, base_path)
return test_fullpath, base_path
def register_opts(self, conf):
conf.register_opt(config_nsx.service_option,
group='service_available')
config.register_opt_group(
conf,
config_nsx.scenario_group, config_nsx.ScenarioGroup)
config.register_opt_group(
conf,
config_nsx.network_group, config_nsx.NetworkGroup)
config.register_opt_group(
conf,
config_nsx.nsxv_group, config_nsx.NSXvGroup)
config.register_opt_group(
conf,
config_nsx.l2gw_group, config_nsx.L2gwGroup)
config.register_opt_group(
conf,
config_nsx.nsxv3_group, config_nsx.NSXv3Group)
for group, option in _opts:
config.register_opt_group(conf, group, option)
def get_opt_lists(self):
return [
(config_nsx.scenario_group.name, config_nsx.scenario_group),
('service_available', [config_nsx.service_option])
]
return [(group.name, option) for group, option in _opts
].append(('service_available', [config_nsx.service_option]))