From 697ad2aacccb27db164f9c7bc69c9ff3d0c24267 Mon Sep 17 00:00:00 2001 From: liyingjun Date: Tue, 10 Nov 2015 14:11:59 +0800 Subject: [PATCH] Replacing application_catalog with application-catalog Murano does not get keystone endpoint when Keystone is configured to use templated catalog Change-Id: Id568c0a59b2e99dc946b1f2f55f6b233fd6a1b27 Closes-bug: #1514692 --- contrib/devstack/lib/murano | 4 ++-- devstack/plugin.sh | 8 ++++---- doc/source/draft/admin-guide/admin_troubleshooting.rst | 2 +- doc/source/install/manual.rst | 4 ++-- murano/engine/client_manager.py | 2 +- murano/tests/functional/api/base.py | 2 +- murano/tests/functional/common/utils.py | 2 +- murano_tempest_tests/config.py | 4 ++-- ...n_catalog-to-application-catalog-f61d12454a557f79.yaml | 7 +++++++ 9 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 releasenotes/notes/application_catalog-to-application-catalog-f61d12454a557f79.yaml diff --git a/contrib/devstack/lib/murano b/contrib/devstack/lib/murano index de6e2caf..72d18d3b 100644 --- a/contrib/devstack/lib/murano +++ b/contrib/devstack/lib/murano @@ -83,8 +83,8 @@ function create_murano_accounts() { create_service_user "murano" if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then - get_or_create_service "murano" "application_catalog" "Application Catalog Service" - get_or_create_endpoint "application_catalog" \ + get_or_create_service "murano" "application-catalog" "Application Catalog Service" + get_or_create_endpoint "application-catalog" \ "$REGION_NAME" \ "$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" \ "$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" \ diff --git a/devstack/plugin.sh b/devstack/plugin.sh index d3185a39..16e9b4d4 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -32,16 +32,16 @@ function create_murano_accounts() { create_service_user "murano" if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then - get_or_create_service "murano" "application_catalog" "Application Catalog Service" - get_or_create_endpoint "application_catalog" \ + get_or_create_service "murano" "application-catalog" "Application Catalog Service" + get_or_create_endpoint "application-catalog" \ "$REGION_NAME" \ "$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" \ "$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" \ "$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" if is_service_enabled murano-cfapi; then - get_or_create_service "murano-cfapi" "service_broker" "Murano CloudFoundry Service Broker" - get_or_create_endpoint "service_broker" \ + get_or_create_service "murano-cfapi" "service-broker" "Murano CloudFoundry Service Broker" + get_or_create_endpoint "service-broker" \ "$REGION_NAME" \ "$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_CFAPI_SERVICE_PORT" \ "$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_CFAPI_SERVICE_PORT" \ diff --git a/doc/source/draft/admin-guide/admin_troubleshooting.rst b/doc/source/draft/admin-guide/admin_troubleshooting.rst index c5721c93..5243d249 100644 --- a/doc/source/draft/admin-guide/admin_troubleshooting.rst +++ b/doc/source/draft/admin-guide/admin_troubleshooting.rst @@ -71,7 +71,7 @@ If any problems occur, first of all verify that: **Murano panel can be browsed, but 'Unable to communicate to murano-api server.' appears** If you have murano registered in keystone, verify the endpoint URL is valid -and service has *application_catalog* name. If you don't want to register +and service has *application-catalog* name. If you don't want to register murano service in keystone, just add ``MURANO_API_URL`` option to the horizon local setting. diff --git a/doc/source/install/manual.rst b/doc/source/install/manual.rst index 591fe5dd..3abce9dd 100644 --- a/doc/source/install/manual.rst +++ b/doc/source/install/manual.rst @@ -255,11 +255,11 @@ Register in Keystone To make murano API available to all OpenStack users, you need to register the Application Catalog service within the Identity service. -#. Add ``application_catalog`` service: +#. Add ``application-catalog`` service: .. code-block:: console - keystone service-create --name murano --type application_catalog --description "Application Catalog for OpenStack" + keystone service-create --name murano --type application-catalog --description "Application Catalog for OpenStack" #. Provide an endpoint for that service: diff --git a/murano/engine/client_manager.py b/murano/engine/client_manager.py index f921029e..3ea5bb9d 100644 --- a/murano/engine/client_manager.py +++ b/murano/engine/client_manager.py @@ -159,7 +159,7 @@ class ClientManager(object): murano_url = \ murano_settings.url or keystone_client.service_catalog.url_for( - service_type='application_catalog', + service_type='application-catalog', endpoint_type=murano_settings.endpoint_type) if CONF.packages_opts.packages_service == 'glance': diff --git a/murano/tests/functional/api/base.py b/murano/tests/functional/api/base.py index fe30d1c5..df87559f 100644 --- a/murano/tests/functional/api/base.py +++ b/murano/tests/functional/api/base.py @@ -41,7 +41,7 @@ class MuranoClient(rest_client.RestClient): def __init__(self, auth_provider): super(MuranoClient, self).__init__( auth_provider, - 'application_catalog', + 'application-catalog', CONF.identity.region ) diff --git a/murano/tests/functional/common/utils.py b/murano/tests/functional/common/utils.py index e85b24eb..fdd1c16a 100644 --- a/murano/tests/functional/common/utils.py +++ b/murano/tests/functional/common/utils.py @@ -311,7 +311,7 @@ class DeployTestMixin(zip_utils.ZipUtilsMixin): def get_murano_url(cls): try: url = cls.keystone_client().service_catalog.url_for( - service_type='application_catalog', endpoint_type='publicURL') + service_type='application-catalog', endpoint_type='publicURL') except ks_exceptions.EndpointNotFound: url = CONF.murano.murano_url LOG.warning("Murano endpoint not found in Keystone. Using CONF.") diff --git a/murano_tempest_tests/config.py b/murano_tempest_tests/config.py index 15aa2b33..e3845198 100644 --- a/murano_tempest_tests/config.py +++ b/murano_tempest_tests/config.py @@ -45,7 +45,7 @@ ApplicationCatalogGroup = [ "REST client authentication."), cfg.StrOpt("catalog_type", - default="application_catalog", + default="application-catalog", help="Catalog type of Application Catalog."), cfg.StrOpt("endpoint_type", @@ -76,7 +76,7 @@ ServiceBrokerGroup = [ "REST client authentication."), cfg.StrOpt("catalog_type", - default="service_broker", + default="service-broker", help="Catalog type of Service Broker API"), cfg.StrOpt("endpoint_type", diff --git a/releasenotes/notes/application_catalog-to-application-catalog-f61d12454a557f79.yaml b/releasenotes/notes/application_catalog-to-application-catalog-f61d12454a557f79.yaml new file mode 100644 index 00000000..72aa03a8 --- /dev/null +++ b/releasenotes/notes/application_catalog-to-application-catalog-f61d12454a557f79.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - Murano is now able to work with keystone configured to use a templated catalog. +upgrade: + - When updating to Mitaka, the operator should update service name and type + for endpoint in keystone from "application_catalog" to "application-catalog" + if SQL is used for catalog back-end driver.