From 754233c51dd8915514ba9052dc7b68836dbe6018 Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Fri, 20 May 2016 09:55:48 -0500 Subject: [PATCH] Update Magnum service name and description After this patch [1], Magnum is no longer the "Container Service", it became the "Container Infrastructure Management Service". This commit updates the service name and description accordingly: * Change service name from "container" to "container-infra" * Update service description to reflect its mission [1] https://review.openstack.org/#/c/311476/ Depends-On: I55205ff2b304678d2b53bbd4d66403078c6baac8 Closes-Bug: #1584251 Change-Id: I5c271bf3fc4d6ccecaf2918aca28ce946bcc6b22 --- devstack/lib/magnum | 2 +- doc/source/dev/manual-devstack.rst | 10 +++++----- magnum/common/clients.py | 2 +- magnum/common/rpc.py | 2 +- magnum/tests/functional/common/client.py | 2 +- magnum/tests/functional/common/manager.py | 5 +++-- magnum/tests/functional/python_client_base.py | 2 +- magnum/tests/unit/common/test_clients.py | 2 +- .../notes/change-service-name-ce5c72642fe1d3d1.yaml | 5 +++++ 9 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 releasenotes/notes/change-service-name-ce5c72642fe1d3d1.yaml diff --git a/devstack/lib/magnum b/devstack/lib/magnum index 972eec0d82..a7a5a66ff7 100644 --- a/devstack/lib/magnum +++ b/devstack/lib/magnum @@ -115,7 +115,7 @@ function create_magnum_accounts { if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then local magnum_service=$(get_or_create_service "magnum" \ - "container" "Magnum Container Service") + "container-infra" "Container Infrastructure Management Service") get_or_create_endpoint $magnum_service \ "$REGION_NAME" \ "$MAGNUM_SERVICE_PROTOCOL://$MAGNUM_SERVICE_HOST:$MAGNUM_SERVICE_PORT/v1" \ diff --git a/doc/source/dev/manual-devstack.rst b/doc/source/dev/manual-devstack.rst index 06fe3891aa..a0b7bdb5a8 100644 --- a/doc/source/dev/manual-devstack.rst +++ b/doc/source/dev/manual-devstack.rst @@ -243,14 +243,14 @@ backend:: Configure the keystone endpoint:: openstack service create --name=magnum \ - --description="Magnum Container Service" \ - container + --description="Container Infrastructure Management Service" \ + container-infra openstack endpoint create --region=RegionOne \ - container public http://127.0.0.1:9511/v1 + container-infra public http://127.0.0.1:9511/v1 openstack endpoint create --region=RegionOne \ - container internal http://127.0.0.1:9511/v1 + container-infra internal http://127.0.0.1:9511/v1 openstack endpoint create --region=RegionOne \ - container admin http://127.0.0.1:9511/v1 + container-infra admin http://127.0.0.1:9511/v1 Start the API service in a new screen:: diff --git a/magnum/common/clients.py b/magnum/common/clients.py index 441f5f10b0..a684d89eaa 100644 --- a/magnum/common/clients.py +++ b/magnum/common/clients.py @@ -137,7 +137,7 @@ class OpenStackClients(object): def magnum_url(self): endpoint_type = self._get_client_option('magnum', 'endpoint_type') region_name = self._get_client_option('magnum', 'region_name') - return self.url_for(service_type='container', + return self.url_for(service_type='container-infra', interface=endpoint_type, region_name=region_name) diff --git a/magnum/common/rpc.py b/magnum/common/rpc.py index eeb1dd0348..9d7386a076 100644 --- a/magnum/common/rpc.py +++ b/magnum/common/rpc.py @@ -141,7 +141,7 @@ def get_server(target, endpoints, serializer=None): serializer=serializer) -def get_notifier(service='container', host=None, publisher_id=None): +def get_notifier(service='container-infra', host=None, publisher_id=None): assert NOTIFIER is not None if not publisher_id: publisher_id = "%s.%s" % (service, host or CONF.host) diff --git a/magnum/tests/functional/common/client.py b/magnum/tests/functional/common/client.py index c50da0219a..d61c8da8b4 100644 --- a/magnum/tests/functional/common/client.py +++ b/magnum/tests/functional/common/client.py @@ -26,7 +26,7 @@ class MagnumClient(rest_client.RestClient): def __init__(self, auth_provider): super(MagnumClient, self).__init__( auth_provider=auth_provider, - service='container', + service='container-infra', region=config.Config.region, disable_ssl_certificate_validation=True ) diff --git a/magnum/tests/functional/common/manager.py b/magnum/tests/functional/common/manager.py index 156d9af656..27cb28ac1e 100644 --- a/magnum/tests/functional/common/manager.py +++ b/magnum/tests/functional/common/manager.py @@ -26,7 +26,7 @@ class Manager(clients.Manager): if not credentials: credentials = common_creds.get_configured_credentials( 'identity_admin') - super(Manager, self).__init__(credentials, 'container') + super(Manager, self).__init__(credentials, 'container-infra') self.auth_provider.orig_base_url = self.auth_provider.base_url self.auth_provider.base_url = self.bypassed_base_url if request_type == 'baymodel': @@ -42,7 +42,8 @@ class Manager(clients.Manager): self.client = client.MagnumClient(self.auth_provider) def bypassed_base_url(self, filters, auth_data=None): - if config.Config.magnum_url and filters['service'] == 'container': + if (config.Config.magnum_url and + filters['service'] == 'container-infra'): return config.Config.magnum_url return self.auth_provider.orig_base_url(filters, auth_data=auth_data) diff --git a/magnum/tests/functional/python_client_base.py b/magnum/tests/functional/python_client_base.py index f68c84ae2d..fe915d5d1b 100644 --- a/magnum/tests/functional/python_client_base.py +++ b/magnum/tests/functional/python_client_base.py @@ -95,7 +95,7 @@ class BaseMagnumClient(base.BaseMagnumTest): project_id=tenant_id, project_name=tenant, auth_url=auth_url, - service_type='container', + service_type='container-infra', region_name=region_name, magnum_url=magnum_url) cls.keystone = ksclient.Client(username=user, diff --git a/magnum/tests/unit/common/test_clients.py b/magnum/tests/unit/common/test_clients.py index 9767332270..ade24f7f93 100644 --- a/magnum/tests/unit/common/test_clients.py +++ b/magnum/tests/unit/common/test_clients.py @@ -59,7 +59,7 @@ class ClientsTest(base.BaseTestCase): mock_endpoint = mock_keystone.return_value.session.get_endpoint mock_endpoint.assert_called_once_with(region_name=fake_region, - service_type='container', + service_type='container-infra', interface=fake_endpoint) @mock.patch.object(heatclient, 'Client') diff --git a/releasenotes/notes/change-service-name-ce5c72642fe1d3d1.yaml b/releasenotes/notes/change-service-name-ce5c72642fe1d3d1.yaml new file mode 100644 index 0000000000..1c6de079a5 --- /dev/null +++ b/releasenotes/notes/change-service-name-ce5c72642fe1d3d1.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - Magnum default service type changed from "container" to + "container-infra". It is recommended to update the service + type at Keystone service catalog accordingly.