diff --git a/setup.cfg b/setup.cfg index 824c98605e..52a87fc39c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,6 +21,7 @@ classifier = [files] packages = vmware_nsx + vmware_nsx_tempest [entry_points] console_scripts = diff --git a/vmware_nsx_tempest/__init__.py b/vmware_nsx_tempest/__init__.py index 94ca290da9..e69de29bb2 100644 --- a/vmware_nsx_tempest/__init__.py +++ b/vmware_nsx_tempest/__init__.py @@ -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() diff --git a/vmware_nsx_tempest/config.py b/vmware_nsx_tempest/config.py index 47dfbab236..ec47e705d2 100644 --- a/vmware_nsx_tempest/config.py +++ b/vmware_nsx_tempest/config.py @@ -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', diff --git a/vmware_nsx_tempest/plugin.py b/vmware_nsx_tempest/plugin.py index ae18cbee15..db36053117 100644 --- a/vmware_nsx_tempest/plugin.py +++ b/vmware_nsx_tempest/plugin.py @@ -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]))