summaryrefslogtreecommitdiff
path: root/keystoneclient/httpclient.py
diff options
context:
space:
mode:
authorBrant Knudson <bknudson@us.ibm.com>2015-07-24 15:06:00 -0500
committerBrant Knudson <bknudson@us.ibm.com>2015-08-04 09:56:43 -0500
commit1721e01743324fc10630131d590659f565a3684d (patch)
tree1e8af364524de0349f89c5b6f6f5241bba144d25 /keystoneclient/httpclient.py
parenta9ef92a43f7d3cecd6a92d07fe7b4857d00eb2e4 (diff)
downloadpython-keystoneclient-1721e01743324fc10630131d590659f565a3684d.tar.gz
Proper deprecation for HTTPClient tenant_id, tenant_name parameters
HTTPClient() tenant_id and tenant_name parameters weren't properly deprecated since they were only mentioned in the docstring. Proper deprecation requires use of warnings/debtcollector and documentation. Also fixed a bunch of places in the tests where tenant_id and tenant_name were still being used despite being deprecated. bp deprecations Change-Id: I9c4f596b8ff10aede6c417886638a942cb18044c
Diffstat (limited to 'keystoneclient/httpclient.py')
-rw-r--r--keystoneclient/httpclient.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/keystoneclient/httpclient.py b/keystoneclient/httpclient.py
index 37c6a4d..fb7495f 100644
--- a/keystoneclient/httpclient.py
+++ b/keystoneclient/httpclient.py
@@ -22,6 +22,7 @@ OpenStack Client interface. Handles the REST calls and responses.
import logging
from debtcollector import removals
+from debtcollector import renames
from oslo_serialization import jsonutils
import pkg_resources
import requests
@@ -190,10 +191,13 @@ class HTTPClient(baseclient.Client, base.BaseAuthPlugin):
keyring is about to expire. default: 30
(optional)
:param string tenant_name: Tenant name. (optional) The tenant_name keyword
- argument is deprecated, use project_name
- instead.
+ argument is deprecated as of the 1.7.0 release
+ in favor of project_name and may be removed in
+ the 2.0.0 release.
:param string tenant_id: Tenant id. (optional) The tenant_id keyword
- argument is deprecated, use project_id instead.
+ argument is deprecated as of the 1.7.0 release in
+ favor of project_id and may be removed in the
+ 2.0.0 release.
:param string trust_id: Trust ID for trust scoping. (optional)
:param object session: A Session object to be used for
communicating with the identity service.
@@ -216,6 +220,10 @@ class HTTPClient(baseclient.Client, base.BaseAuthPlugin):
version = None
+ @renames.renamed_kwarg('tenant_name', 'project_name', version='1.7.0',
+ removal_version='2.0.0')
+ @renames.renamed_kwarg('tenant_id', 'project_id', version='1.7.0',
+ removal_version='2.0.0')
@utils.positional(enforcement=utils.positional.WARN)
def __init__(self, username=None, tenant_id=None, tenant_name=None,
password=None, auth_url=None, region_name=None, endpoint=None,