summaryrefslogtreecommitdiff
path: root/keystoneclient/access.py
diff options
context:
space:
mode:
authorBrant Knudson <bknudson@us.ibm.com>2015-07-24 10:51:49 -0500
committerBrant Knudson <bknudson@us.ibm.com>2015-07-24 11:05:05 -0500
commit1a2ccb001bdbb09a3b66c6aca651ce71e62734d8 (patch)
treef03b95dda488031899baa2a1395a833d1d363422 /keystoneclient/access.py
parent6d82f1f17ca99b4e318b6c5bfa24b6dc507ba497 (diff)
downloadpython-keystoneclient-1a2ccb001bdbb09a3b66c6aca651ce71e62734d8.tar.gz
Proper deprecation for AccessInfo management_url property
AccessInfo's management_url parameter wasn't properly deprecated since all it had was a comment in the code. Proper deprecation requires use of warnings and documentation. bp deprecations Change-Id: I0ee07c5adc6a7c91f8b23b291eea76f4ae7b3b89
Diffstat (limited to 'keystoneclient/access.py')
-rw-r--r--keystoneclient/access.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/keystoneclient/access.py b/keystoneclient/access.py
index ee90f0e..f308a58 100644
--- a/keystoneclient/access.py
+++ b/keystoneclient/access.py
@@ -378,7 +378,8 @@ class AccessInfo(dict):
authentication request wasn't scoped to a tenant (project).
DEPRECATED: this doesn't correctly handle region name. You should fetch
- it from the service catalog yourself.
+ it from the service catalog yourself. This may be removed in the 2.0.0
+ release.
:returns: tuple of urls
"""
@@ -628,8 +629,13 @@ class AccessInfoV2(AccessInfo):
@property
def management_url(self):
- # FIXME(jamielennox): this is deprecated in favour of retrieving it
- # from the service catalog. Provide a warning.
+ """Deprecated as of the 1.7.0 release in favor of
+ service_catalog.get_urls() and may be removed in the 2.0.0 release.
+ """
+ warnings.warn(
+ 'management_url is deprecated as of the 1.7.0 release in favor of '
+ 'service_catalog.get_urls() and may be removed in the 2.0.0 '
+ 'release.', DeprecationWarning)
if self.service_catalog:
return self.service_catalog.get_urls(service_type='identity',
endpoint_type='adminURL',
@@ -826,8 +832,13 @@ class AccessInfoV3(AccessInfo):
@property
def management_url(self):
- # FIXME(jamielennox): this is deprecated in favour of retrieving it
- # from the service catalog. Provide a warning.
+ """Deprecated as of the 1.7.0 release in favor of
+ service_catalog.get_urls() and may be removed in the 2.0.0 release.
+ """
+ warnings.warn(
+ 'management_url is deprecated as of the 1.7.0 release in favor of '
+ 'service_catalog.get_urls() and may be removed in the 2.0.0 '
+ 'release.', DeprecationWarning)
if self.service_catalog:
return self.service_catalog.get_urls(service_type='identity',
endpoint_type='admin',