Remove version from endpoints in catalog

Remove the API version from the endpoints in the Keystone service
catalog.  The python-barbicanclient library expects the endpoint to not
include the version, and will add the version itself.  This is
recommended by the Keystone team as a better approach, since the service
catalog does not need to be updated in the event that a new API version
becomes available.

Change-Id: Ibb63113bcbd33d65c691cb242b5794b30114fb23
This commit is contained in:
Douglas Mendizabal 2014-10-12 21:15:17 -05:00 committed by Douglas Mendizábal
parent e510acbba0
commit 124d232e5c
3 changed files with 11 additions and 8 deletions

View File

@ -70,8 +70,8 @@ if [[ "$ENABLED_SERVICES" =~ "barbican" ]]; then
keystone endpoint-create \
--region RegionOne \
--service_id $BARBICAN_SERVICE \
--publicurl "http://$SERVICE_HOST:9311/v1" \
--adminurl "http://$SERVICE_HOST:9312/v1" \
--internalurl "http://$SERVICE_HOST:9313/v1"
--publicurl "http://$SERVICE_HOST:9311" \
--adminurl "http://$SERVICE_HOST:9312" \
--internalurl "http://$SERVICE_HOST:9311"
fi
fi

View File

@ -209,9 +209,9 @@ function create_barbican_accounts {
keystone endpoint-create \
--region RegionOne \
--service_id $BARBICAN_SERVICE \
--publicurl "http://$SERVICE_HOST:9311/v1" \
--adminurl "http://$SERVICE_HOST:9312/v1" \
--internalurl "http://$SERVICE_HOST:9311/v1"
--publicurl "http://$SERVICE_HOST:9311" \
--adminurl "http://$SERVICE_HOST:9312" \
--internalurl "http://$SERVICE_HOST:9311"
fi
}

View File

@ -136,10 +136,13 @@ class BarbicanClient(object):
filters = {
'service': 'key-manager',
'region': self.region,
'api_version': self.api_version if include_version else ''
}
return self._auth_provider.base_url(filters)
base_url = self._auth_provider.base_url(filters)
if include_version:
return '/'.join([base_url, self.api_version])
else:
return base_url
def get_list_of_models(self, item_list, model_type):
"""Takes a list of barbican objects and creates a list of models