Merge "[magnum] Change magnum service type"

This commit is contained in:
Jenkins 2016-05-28 11:38:54 +00:00 committed by Gerrit Code Review
commit 566608371b
3 changed files with 5 additions and 4 deletions

View File

@ -140,7 +140,7 @@ class _ServiceType(utils.ImmutableMixin, utils.EnumMixin):
APPLICATION_CATALOG = "application-catalog"
BARE_METAL = "baremetal"
METRIC = "metric"
CONTAINER = "container"
CONTAINER_INFRA = "container-infra"
def __init__(self):
self.__names = {
@ -166,7 +166,7 @@ class _ServiceType(utils.ImmutableMixin, utils.EnumMixin):
self.APPLICATION_CATALOG: _Service.MURANO,
self.BARE_METAL: _Service.IRONIC,
self.METRIC: _Service.GNOCCHI,
self.CONTAINER: _Service.MAGNUM,
self.CONTAINER_INFRA: _Service.MAGNUM,
}
def __getitem__(self, service_type):

View File

@ -738,7 +738,8 @@ class Senlin(OSClient):
**self._get_auth_info(project_name_key="project_name"))
@configure("magnum", default_version="1", default_service_type="container",)
@configure("magnum", default_version="1",
default_service_type="container-infra",)
class Magnum(OSClient):
def create_client(self, version=None, service_type=None):
"""Return magnum client."""

View File

@ -845,7 +845,7 @@ class OSClientsTestCase(test.TestCase):
self.assertEqual(fake_magnum, client)
self.service_catalog.url_for.assert_called_once_with(
service_type="container",
service_type="container-infra",
endpoint_type=consts.EndpointType.PUBLIC,
region_name=self.credential.region_name)