Fixes vmware_nsx_tempest tempest plugin issues with tempest

* Added vmware_nsx_tempest under packages in setup.cfg so that
  tempest can discovers it.
* Removed pbr version from vmware_nsx_tempest (in-tree tempest plugin)
  as it causes versioning issue with the main package vmware_nsx.
* Added all sections and options defined in tempest plugin conf
  so that tempest can retrive all the tempest sample configurations.

Depends-on: Iab0202a28bfa525c4cd91e776ac2bdba56a807f6

Change-Id: I2f706b8cdb31c53d951b059f939fb0d6afc32958
Closes-Bug: #1691122
This commit is contained in:
Chandan Kumar 2017-05-16 20:01:53 +05:30
parent 387efd8657
commit eb293bd418
4 changed files with 16 additions and 39 deletions

View File

@ -21,6 +21,7 @@ classifier =
[files] [files]
packages = packages =
vmware_nsx vmware_nsx
vmware_nsx_tempest
[entry_points] [entry_points]
console_scripts = 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', default='mail',
help="host exists in dns_search_domain"), help="host exists in dns_search_domain"),
cfg.StrOpt('public_network_cidr', cfg.StrOpt('public_network_cidr',
default='',
help="Public network cidr which provides external network" help="Public network cidr which provides external network"
" connectivity"), " connectivity"),
cfg.StrOpt('backend', cfg.StrOpt('backend',

View File

@ -22,6 +22,15 @@ from tempest.test_discover import plugins
from vmware_nsx_tempest import config as config_nsx 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): class VMwareNsxTempestPlugin(plugins.TempestPlugin):
"""Our addon configuration is defined at vmware_nsx_tempest/config.py """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] base_path = os.path.split(mydir)[0]
test_dir = "vmware_nsx_tempest/tests" test_dir = "vmware_nsx_tempest/tests"
test_fullpath = os.path.join(base_path, test_dir) test_fullpath = os.path.join(base_path, test_dir)
return (test_fullpath, base_path) return test_fullpath, base_path
def register_opts(self, conf): def register_opts(self, conf):
conf.register_opt(config_nsx.service_option, conf.register_opt(config_nsx.service_option,
group='service_available') group='service_available')
config.register_opt_group( for group, option in _opts:
conf, config.register_opt_group(conf, group, option)
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)
def get_opt_lists(self): def get_opt_lists(self):
return [ return [(group.name, option) for group, option in _opts
(config_nsx.scenario_group.name, config_nsx.scenario_group), ].append(('service_available', [config_nsx.service_option]))
('service_available', [config_nsx.service_option])
]