diff --git a/mistral/config.py b/mistral/config.py index 96a0a7515..be75a884c 100644 --- a/mistral/config.py +++ b/mistral/config.py @@ -295,7 +295,11 @@ openstack_actions_opts = [ 'trove', 'ironic', 'designate', 'murano', 'tacker', 'senlin', 'aodh', 'gnocchi'], help=_('List of module names that support region in actions.') - ) + ), + cfg.StrOpt( + 'default_region', + help=_('Default region name for openstack actions supporting region.') + ), ] # note: this command line option is used only from sync_db and diff --git a/mistral/utils/openstack/keystone.py b/mistral/utils/openstack/keystone.py index f6d5cc7cd..829be3656 100644 --- a/mistral/utils/openstack/keystone.py +++ b/mistral/utils/openstack/keystone.py @@ -83,7 +83,7 @@ def get_endpoint_for_project(service_name=None, service_type=None, # could be passed to rest api in http header ('X-Region-Name'). Otherwise, # just get region from mistral configuration. region = (region_name or ctx.region_name or - CONF.keystone_authtoken.region_name) + CONF.openstack_actions.default_region) service_endpoints = service_catalog.get_endpoints( service_name=service_name,