diff options
author | Brant Knudson <bknudson@us.ibm.com> | 2015-07-24 09:10:49 -0500 |
---|---|---|
committer | Brant Knudson <bknudson@us.ibm.com> | 2015-07-24 09:14:40 -0500 |
commit | f782ee853c49dda7f86055192a01c75269e26aff (patch) | |
tree | c251bcb8c086102f3599a9aaeb77fc059351d793 /keystoneclient/access.py | |
parent | 8d65259cb887c0a4f9c26d3994aef131633c5189 (diff) | |
download | python-keystoneclient-f782ee853c49dda7f86055192a01c75269e26aff.tar.gz |
Proper deprecation for AccessInfo scoped property
Properly deprecate constructing AccessInfo's scoped parameter.
bp deprecations
Change-Id: I8f81c75eb8e758feb9d4c62ce7f041957562e766
Diffstat (limited to 'keystoneclient/access.py')
-rw-r--r-- | keystoneclient/access.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/keystoneclient/access.py b/keystoneclient/access.py index 881f4c0..576312b 100644 --- a/keystoneclient/access.py +++ b/keystoneclient/access.py @@ -258,7 +258,10 @@ class AccessInfo(dict): """Returns true if the authorization token was scoped to a tenant (project), and contains a populated service catalog. - This is deprecated, use project_scoped instead. + .. warning:: + + This is deprecated as of the 1.7.0 release in favor of + project_scoped and may be removed in the 2.0.0 release. :returns: bool """ @@ -537,6 +540,13 @@ class AccessInfoV2(AccessInfo): @property def scoped(self): + """Deprecated as of the 1.7.0 release in favor of project_scoped and + may be removed in the 2.0.0 release. + """ + warnings.warn( + 'scoped is deprecated as of the 1.7.0 release in favor of ' + 'project_scoped and may be removed in the 2.0.0 release.', + DeprecationWarning) if ('serviceCatalog' in self and self['serviceCatalog'] and 'tenant' in self['token']): @@ -759,6 +769,13 @@ class AccessInfoV3(AccessInfo): @property def scoped(self): + """Deprecated as of the 1.7.0 release in favor of project_scoped and + may be removed in the 2.0.0 release. + """ + warnings.warn( + 'scoped is deprecated as of the 1.7.0 release in favor of ' + 'project_scoped and may be removed in the 2.0.0 release.', + DeprecationWarning) return ('catalog' in self and self['catalog'] and 'project' in self) @property |