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
This commit is contained in:
Hongbin Lu 2016-05-20 09:55:48 -05:00
parent 060a641f20
commit 754233c51d
9 changed files with 19 additions and 13 deletions

View File

@ -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" \

View File

@ -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::

View File

@ -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)

View File

@ -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)

View File

@ -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
)

View File

@ -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)

View File

@ -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,

View File

@ -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')

View File

@ -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.