From 66fd1eb7484f92a7d3daa468be8c47910ba79216 Mon Sep 17 00:00:00 2001 From: Brant Knudson Date: Fri, 24 Jul 2015 10:11:57 -0500 Subject: [PATCH] Stop using deprecated AccessInfo.auth_url and management_url The comments for the auth_url and management_url properties say that they're deprecated and to use the service catalog, but internal code was using the deprecated function. The code needs to be changed to use non-deprecated function. bp deprecations Change-Id: I6ada821fe305650d22e58a55192332f0f4986537 --- keystoneclient/httpclient.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/keystoneclient/httpclient.py b/keystoneclient/httpclient.py index e1ee4c699..9c51f6de4 100644 --- a/keystoneclient/httpclient.py +++ b/keystoneclient/httpclient.py @@ -248,8 +248,14 @@ class HTTPClient(baseclient.Client, base.BaseAuthPlugin): self.project_id = self.auth_ref.project_id self.project_name = self.auth_ref.project_name self.project_domain_id = self.auth_ref.project_domain_id - self.auth_url = self.auth_ref.auth_url[0] - self._management_url = self.auth_ref.management_url[0] + auth_urls = self.auth_ref.service_catalog.get_urls( + service_type='identity', endpoint_type='public', + region_name=region_name) + self.auth_url = auth_urls[0] + management_urls = self.auth_ref.service_catalog.get_urls( + service_type='identity', endpoint_type='admin', + region_name=region_name) + self._management_url = management_urls[0] self.auth_token_from_user = self.auth_ref.auth_token self.trust_id = self.auth_ref.trust_id if self.auth_ref.has_service_catalog() and not region_name: