diff options
| author | Brant Knudson <bknudson@us.ibm.com> | 2015-07-24 10:12:12 -0500 |
|---|---|---|
| committer | Brant Knudson <bknudson@us.ibm.com> | 2015-07-24 11:05:05 -0500 |
| commit | 6d82f1f17ca99b4e318b6c5bfa24b6dc507ba497 (patch) | |
| tree | 986f78d1591a5ef1a22037ced396318f02c23017 /keystoneclient/access.py | |
| parent | 66fd1eb7484f92a7d3daa468be8c47910ba79216 (diff) | |
| download | python-keystoneclient-6d82f1f17ca99b4e318b6c5bfa24b6dc507ba497.tar.gz | |
Proper deprecation for AccessInfo auth_url property
Properly deprecate accessing AccessInfo's auth_url parameter.
bp deprecations
Change-Id: I3824904f517434b507587cf73d4389b72f73f22b
Diffstat (limited to 'keystoneclient/access.py')
| -rw-r--r-- | keystoneclient/access.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/keystoneclient/access.py b/keystoneclient/access.py index 576312b..ee90f0e 100644 --- a/keystoneclient/access.py +++ b/keystoneclient/access.py @@ -364,7 +364,8 @@ class AccessInfo(dict): (project), this property will return None. 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 """ @@ -611,8 +612,13 @@ class AccessInfoV2(AccessInfo): @property def auth_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( + 'auth_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='publicURL', @@ -804,8 +810,13 @@ class AccessInfoV3(AccessInfo): @property def auth_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( + 'auth_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='public', |
