Update our service definition
Clarify that we are the OpenStack Containers service as officially defined in OpenStack governance [1]. [1] https://git.openstack.org/cgit/openstack/governance/plain/ reference/projects.yaml Change-Id: Ibf554b37de55a5fe6f550fade9a5cd91ec67ac7c
This commit is contained in:
parent
7615fba2ae
commit
bedba8a484
@ -54,7 +54,7 @@ Need to adopt tempest.conf, an example as follows::
|
|||||||
[oslo_concurrency]
|
[oslo_concurrency]
|
||||||
lock_path = /tmp/
|
lock_path = /tmp/
|
||||||
|
|
||||||
[container_management]
|
[container_service]
|
||||||
catalog_type = container
|
catalog_type = container
|
||||||
|
|
||||||
[debug]
|
[debug]
|
||||||
|
@ -17,12 +17,12 @@ from zun_tempest_plugin.tests.tempest.api import clients
|
|||||||
|
|
||||||
class APIMicroversionFixture(fixtures.Fixture):
|
class APIMicroversionFixture(fixtures.Fixture):
|
||||||
|
|
||||||
def __init__(self, container_management_microversion):
|
def __init__(self, container_service_microversion):
|
||||||
self.container_management_microversion = \
|
self.container_service_microversion = \
|
||||||
container_management_microversion
|
container_service_microversion
|
||||||
|
|
||||||
def _setUp(self):
|
def _setUp(self):
|
||||||
super(APIMicroversionFixture, self)._setUp()
|
super(APIMicroversionFixture, self)._setUp()
|
||||||
clients.set_container_management_api_microversion(
|
clients.set_container_service_api_microversion(
|
||||||
self.container_management_microversion)
|
self.container_service_microversion)
|
||||||
self.addCleanup(clients.reset_container_management_api_microversion)
|
self.addCleanup(clients.reset_container_service_api_microversion)
|
||||||
|
@ -31,23 +31,23 @@ CONF = config.CONF
|
|||||||
|
|
||||||
ADMIN_CREDS = None
|
ADMIN_CREDS = None
|
||||||
|
|
||||||
CONTAINER_MANAGEMENT_MICROVERSION = None
|
CONTAINER_SERVICE_MICROVERSION = None
|
||||||
|
|
||||||
|
|
||||||
def get_container_management_api_version():
|
def get_container_service_api_version():
|
||||||
"""Get zun-api-version with format: 'container X.Y'"""
|
"""Get zun-api-version with format: 'container X.Y'"""
|
||||||
return 'container ' + CONTAINER_MANAGEMENT_MICROVERSION
|
return 'container ' + CONTAINER_SERVICE_MICROVERSION
|
||||||
|
|
||||||
|
|
||||||
def set_container_management_api_microversion(
|
def set_container_service_api_microversion(
|
||||||
container_management_microversion):
|
container_service_microversion):
|
||||||
global CONTAINER_MANAGEMENT_MICROVERSION
|
global CONTAINER_SERVICE_MICROVERSION
|
||||||
CONTAINER_MANAGEMENT_MICROVERSION = container_management_microversion
|
CONTAINER_SERVICE_MICROVERSION = container_service_microversion
|
||||||
|
|
||||||
|
|
||||||
def reset_container_management_api_microversion():
|
def reset_container_service_api_microversion():
|
||||||
global CONTAINER_MANAGEMENT_MICROVERSION
|
global CONTAINER_SERVICE_MICROVERSION
|
||||||
CONTAINER_MANAGEMENT_MICROVERSION = None
|
CONTAINER_SERVICE_MICROVERSION = None
|
||||||
|
|
||||||
|
|
||||||
class Manager(manager.Manager):
|
class Manager(manager.Manager):
|
||||||
@ -82,26 +82,26 @@ class ZunClient(rest_client.RestClient):
|
|||||||
def __init__(self, auth_provider):
|
def __init__(self, auth_provider):
|
||||||
super(ZunClient, self).__init__(
|
super(ZunClient, self).__init__(
|
||||||
auth_provider=auth_provider,
|
auth_provider=auth_provider,
|
||||||
service=CONF.container_management.catalog_type,
|
service=CONF.container_service.catalog_type,
|
||||||
region=CONF.identity.region,
|
region=CONF.identity.region,
|
||||||
disable_ssl_certificate_validation=True
|
disable_ssl_certificate_validation=True
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_headers(self):
|
def get_headers(self):
|
||||||
headers = super(ZunClient, self).get_headers()
|
headers = super(ZunClient, self).get_headers()
|
||||||
if CONTAINER_MANAGEMENT_MICROVERSION:
|
if CONTAINER_SERVICE_MICROVERSION:
|
||||||
headers[self.api_microversion_header_name] = \
|
headers[self.api_microversion_header_name] = \
|
||||||
get_container_management_api_version()
|
get_container_service_api_version()
|
||||||
return headers
|
return headers
|
||||||
|
|
||||||
def request(self, *args, **kwargs):
|
def request(self, *args, **kwargs):
|
||||||
resp, resp_body = super(ZunClient, self).request(*args, **kwargs)
|
resp, resp_body = super(ZunClient, self).request(*args, **kwargs)
|
||||||
if (CONTAINER_MANAGEMENT_MICROVERSION and
|
if (CONTAINER_SERVICE_MICROVERSION and
|
||||||
CONTAINER_MANAGEMENT_MICROVERSION
|
CONTAINER_SERVICE_MICROVERSION
|
||||||
!= api_version_utils.LATEST_MICROVERSION):
|
!= api_version_utils.LATEST_MICROVERSION):
|
||||||
api_version_utils.assert_version_header_matches_request(
|
api_version_utils.assert_version_header_matches_request(
|
||||||
self.api_microversion_header_name,
|
self.api_microversion_header_name,
|
||||||
get_container_management_api_version(),
|
get_container_service_api_version(),
|
||||||
resp)
|
resp)
|
||||||
return resp, resp_body
|
return resp, resp_body
|
||||||
|
|
||||||
|
@ -32,8 +32,8 @@ class BaseZunTest(api_version_utils.BaseMicroversionTest,
|
|||||||
if not CONF.service_available.zun:
|
if not CONF.service_available.zun:
|
||||||
skip_msg = 'Zun is disabled'
|
skip_msg = 'Zun is disabled'
|
||||||
raise cls.skipException(skip_msg)
|
raise cls.skipException(skip_msg)
|
||||||
cfg_min_version = CONF.container_management.min_microversion
|
cfg_min_version = CONF.container_service.min_microversion
|
||||||
cfg_max_version = CONF.container_management.max_microversion
|
cfg_max_version = CONF.container_service.max_microversion
|
||||||
api_version_utils.check_skip_with_microversion(cls.min_microversion,
|
api_version_utils.check_skip_with_microversion(cls.min_microversion,
|
||||||
cls.max_microversion,
|
cls.max_microversion,
|
||||||
cfg_min_version,
|
cfg_min_version,
|
||||||
@ -49,10 +49,10 @@ class BaseZunTest(api_version_utils.BaseMicroversionTest,
|
|||||||
cls.request_microversion = (
|
cls.request_microversion = (
|
||||||
api_version_utils.select_request_microversion(
|
api_version_utils.select_request_microversion(
|
||||||
cls.min_microversion,
|
cls.min_microversion,
|
||||||
CONF.container_management.min_microversion
|
CONF.container_service.min_microversion
|
||||||
))
|
))
|
||||||
cls.services_microversion = {
|
cls.services_microversion = {
|
||||||
CONF.container_management.catalog_type: cls.request_microversion}
|
CONF.container_service.catalog_type: cls.request_microversion}
|
||||||
super(BaseZunTest, cls).setup_credentials()
|
super(BaseZunTest, cls).setup_credentials()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -61,8 +61,8 @@ class BaseZunTest(api_version_utils.BaseMicroversionTest,
|
|||||||
cls.request_microversion = (
|
cls.request_microversion = (
|
||||||
api_version_utils.select_request_microversion(
|
api_version_utils.select_request_microversion(
|
||||||
cls.min_microversion,
|
cls.min_microversion,
|
||||||
CONF.container_management.min_microversion))
|
CONF.container_service.min_microversion))
|
||||||
cls.wait_timeout = CONF.container_management.wait_timeout
|
cls.wait_timeout = CONF.container_service.wait_timeout
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(BaseZunTest, self).setUp()
|
super(BaseZunTest, self).setUp()
|
||||||
|
@ -20,13 +20,13 @@ service_option = cfg.BoolOpt("zun",
|
|||||||
help="Whether or not zun is expected to be "
|
help="Whether or not zun is expected to be "
|
||||||
"available")
|
"available")
|
||||||
|
|
||||||
container_management_group = cfg.OptGroup(
|
container_service_group = cfg.OptGroup(
|
||||||
name="container_management", title="Container Management Service Options")
|
name="container_service", title="Containers Service Options")
|
||||||
|
|
||||||
ContainerManagementGroup = [
|
ContainerServiceGroup = [
|
||||||
cfg.StrOpt("catalog_type",
|
cfg.StrOpt("catalog_type",
|
||||||
default="container",
|
default="container",
|
||||||
help="Catalog type of the container management service."),
|
help="Catalog type of the containers service."),
|
||||||
cfg.IntOpt("wait_timeout",
|
cfg.IntOpt("wait_timeout",
|
||||||
default=60,
|
default=60,
|
||||||
help="Waiting time for a specific status, in seconds."),
|
help="Waiting time for a specific status, in seconds."),
|
||||||
|
@ -31,13 +31,13 @@ class ZunTempestPlugin(plugins.TempestPlugin):
|
|||||||
def register_opts(self, conf):
|
def register_opts(self, conf):
|
||||||
conf.register_opt(config_zun.service_option,
|
conf.register_opt(config_zun.service_option,
|
||||||
group='service_available')
|
group='service_available')
|
||||||
conf.register_group(config_zun.container_management_group)
|
conf.register_group(config_zun.container_service_group)
|
||||||
conf.register_opts(config_zun.ContainerManagementGroup,
|
conf.register_opts(config_zun.ContainerServiceGroup,
|
||||||
group='container_management')
|
group='container_service')
|
||||||
conf.register_group(config_zun.docker_group)
|
conf.register_group(config_zun.docker_group)
|
||||||
conf.register_opts(config_zun.docker_opts, group='docker')
|
conf.register_opts(config_zun.docker_opts, group='docker')
|
||||||
|
|
||||||
def get_opt_lists(self):
|
def get_opt_lists(self):
|
||||||
return [(config_zun.container_management_group.name,
|
return [(config_zun.container_service_group.name,
|
||||||
config_zun.ContainerManagementGroup),
|
config_zun.ContainerServiceGroup),
|
||||||
('service_available', [config_zun.service_option])]
|
('service_available', [config_zun.service_option])]
|
||||||
|
Loading…
Reference in New Issue
Block a user