summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrant Knudson <bknudson@us.ibm.com>2015-12-29 18:38:01 -0600
committerBrant Knudson <bknudson@us.ibm.com>2015-12-29 18:38:14 -0600
commit1aaebf0fb9e4ac6b068a6e6b786b720af2562abb (patch)
tree662ea58087c321814835f6399ec4dd747cc726cc
parent689e7d09e023f665c453d1fd7f1eb57ba10a0bb0 (diff)
downloadpython-keystoneclient-1aaebf0fb9e4ac6b068a6e6b786b720af2562abb.tar.gz
Remove "deprecated" internal method
This method says it's deprecated but it's an internal method, so there's no need to deprecate it, just remove it. Change-Id: I916b4a5c9dc2320a4bff7f966fd0c7d5a4957ff9
-rw-r--r--keystoneclient/base.py7
-rw-r--r--keystoneclient/v2_0/ec2.py4
-rw-r--r--keystoneclient/v2_0/endpoints.py2
-rw-r--r--keystoneclient/v2_0/roles.py2
-rw-r--r--keystoneclient/v2_0/services.py2
-rw-r--r--keystoneclient/v2_0/tenants.py4
-rw-r--r--keystoneclient/v2_0/tokens.py4
-rw-r--r--keystoneclient/v2_0/users.py2
-rw-r--r--keystoneclient/v3/ec2.py6
-rw-r--r--keystoneclient/v3/users.py4
10 files changed, 16 insertions, 21 deletions
diff --git a/keystoneclient/base.py b/keystoneclient/base.py
index a03ecee..d199254 100644
--- a/keystoneclient/base.py
+++ b/keystoneclient/base.py
@@ -156,11 +156,6 @@ class Manager(object):
resp, body = self.client.head(url, **kwargs)
return resp.status_code == 204
- def _create(self, url, body, response_key, return_raw=False, **kwargs):
- """Deprecated. Use `_post` instead.
- """
- return self._post(url, body, response_key, return_raw, **kwargs)
-
def _post(self, url, body, response_key, return_raw=False, **kwargs):
"""Create an object.
@@ -338,7 +333,7 @@ class CrudManager(Manager):
@filter_kwargs
def create(self, **kwargs):
url = self.build_url(dict_args_in_out=kwargs)
- return self._create(
+ return self._post(
url,
{self.key: kwargs},
self.key)
diff --git a/keystoneclient/v2_0/ec2.py b/keystoneclient/v2_0/ec2.py
index 0baf224..1aa19ae 100644
--- a/keystoneclient/v2_0/ec2.py
+++ b/keystoneclient/v2_0/ec2.py
@@ -35,8 +35,8 @@ class CredentialsManager(base.ManagerWithFind):
params = {'tenant_id': tenant_id}
- return self._create('/users/%s/credentials/OS-EC2' % user_id,
- params, "credential")
+ return self._post('/users/%s/credentials/OS-EC2' % user_id,
+ params, "credential")
def list(self, user_id):
"""Get a list of access/secret pairs for a user_id.
diff --git a/keystoneclient/v2_0/endpoints.py b/keystoneclient/v2_0/endpoints.py
index 35bda25..984be33 100644
--- a/keystoneclient/v2_0/endpoints.py
+++ b/keystoneclient/v2_0/endpoints.py
@@ -39,7 +39,7 @@ class EndpointManager(base.ManagerWithFind):
'publicurl': publicurl,
'adminurl': adminurl,
'internalurl': internalurl}}
- return self._create('/endpoints', body, 'endpoint')
+ return self._post('/endpoints', body, 'endpoint')
def delete(self, id):
"""Delete an endpoint."""
diff --git a/keystoneclient/v2_0/roles.py b/keystoneclient/v2_0/roles.py
index 3fc47e9..d0d3a79 100644
--- a/keystoneclient/v2_0/roles.py
+++ b/keystoneclient/v2_0/roles.py
@@ -36,7 +36,7 @@ class RoleManager(base.ManagerWithFind):
def create(self, name):
"""Create a role."""
params = {"role": {"name": name}}
- return self._create('/OS-KSADM/roles', params, "role")
+ return self._post('/OS-KSADM/roles', params, "role")
def delete(self, role):
"""Delete a role."""
diff --git a/keystoneclient/v2_0/services.py b/keystoneclient/v2_0/services.py
index adb740d..d93353c 100644
--- a/keystoneclient/v2_0/services.py
+++ b/keystoneclient/v2_0/services.py
@@ -40,7 +40,7 @@ class ServiceManager(base.ManagerWithFind):
body = {"OS-KSADM:service": {'name': name,
'type': service_type,
'description': description}}
- return self._create("/OS-KSADM/services", body, "OS-KSADM:service")
+ return self._post("/OS-KSADM/services", body, "OS-KSADM:service")
def delete(self, id):
"""Delete a service."""
diff --git a/keystoneclient/v2_0/tenants.py b/keystoneclient/v2_0/tenants.py
index 79d98d5..b222fa4 100644
--- a/keystoneclient/v2_0/tenants.py
+++ b/keystoneclient/v2_0/tenants.py
@@ -93,7 +93,7 @@ class TenantManager(base.ManagerWithFind):
if k not in params['tenant']:
params['tenant'][k] = v
- return self._create('/tenants', params, "tenant")
+ return self._post('/tenants', params, "tenant")
def list(self, limit=None, marker=None):
"""Get a list of tenants.
@@ -145,7 +145,7 @@ class TenantManager(base.ManagerWithFind):
body['tenant'][k] = v
# Keystone's API uses a POST rather than a PUT here.
- return self._create("/tenants/%s" % tenant_id, body, "tenant")
+ return self._post("/tenants/%s" % tenant_id, body, "tenant")
def delete(self, tenant):
"""Delete a tenant."""
diff --git a/keystoneclient/v2_0/tokens.py b/keystoneclient/v2_0/tokens.py
index 1874b48..27006f4 100644
--- a/keystoneclient/v2_0/tokens.py
+++ b/keystoneclient/v2_0/tokens.py
@@ -61,10 +61,10 @@ class TokenManager(base.Manager):
# no endpoint that can satisfy the request (eg an unscoped token) then
# issue it against the auth_url.
try:
- token_ref = self._create(*args, **kwargs)
+ token_ref = self._post(*args, **kwargs)
except exceptions.EndpointNotFound:
kwargs['endpoint_filter'] = {'interface': auth.AUTH_INTERFACE}
- token_ref = self._create(*args, **kwargs)
+ token_ref = self._post(*args, **kwargs)
return token_ref
diff --git a/keystoneclient/v2_0/users.py b/keystoneclient/v2_0/users.py
index ccbaf2c..e62c244 100644
--- a/keystoneclient/v2_0/users.py
+++ b/keystoneclient/v2_0/users.py
@@ -100,7 +100,7 @@ class UserManager(base.ManagerWithFind):
"tenantId": tenant_id,
"email": email,
"enabled": enabled}}
- return self._create('/users', params, "user", log=not bool(password))
+ return self._post('/users', params, "user", log=not bool(password))
def delete(self, user):
"""Delete a user."""
diff --git a/keystoneclient/v3/ec2.py b/keystoneclient/v3/ec2.py
index dc378c9..8dcbbbc 100644
--- a/keystoneclient/v3/ec2.py
+++ b/keystoneclient/v3/ec2.py
@@ -31,9 +31,9 @@ class EC2Manager(base.ManagerWithFind):
# NOTE(jamielennox): Yes, this uses tenant_id as a key even though we
# are in the v3 API.
- return self._create('/users/%s/credentials/OS-EC2' % user_id,
- body={'tenant_id': project_id},
- response_key="credential")
+ return self._post('/users/%s/credentials/OS-EC2' % user_id,
+ body={'tenant_id': project_id},
+ response_key="credential")
def list(self, user_id):
"""Get a list of access/secret pairs for a user_id.
diff --git a/keystoneclient/v3/users.py b/keystoneclient/v3/users.py
index 708b5f6..44d0e56 100644
--- a/keystoneclient/v3/users.py
+++ b/keystoneclient/v3/users.py
@@ -73,8 +73,8 @@ class UserManager(base.CrudManager):
enabled=enabled,
**kwargs)
- return self._create('/users', {'user': user_data}, 'user',
- log=not bool(password))
+ return self._post('/users', {'user': user_data}, 'user',
+ log=not bool(password))
@renames.renamed_kwarg('project', 'default_project', version='1.7.0',
removal_version='2.0.0')