Merge "Correct tenant update HTTP method."
This commit is contained in:
@@ -90,8 +90,8 @@ class TenantManager(base.ManagerWithFind):
|
|||||||
body['tenant']['enabled'] = enabled
|
body['tenant']['enabled'] = enabled
|
||||||
if description:
|
if description:
|
||||||
body['tenant']['description'] = description
|
body['tenant']['description'] = description
|
||||||
|
# Keystone's API uses a POST rather than a PUT here.
|
||||||
return self._update("/tenants/%s" % tenant_id, body, "tenant")
|
return self._create("/tenants/%s" % tenant_id, body, "tenant")
|
||||||
|
|
||||||
def delete(self, tenant):
|
def delete(self, tenant):
|
||||||
"""
|
"""
|
||||||
|
@@ -180,7 +180,7 @@ class TenantTests(utils.TestCase):
|
|||||||
|
|
||||||
httplib2.Http.request(urlparse.urljoin(self.TEST_URL,
|
httplib2.Http.request(urlparse.urljoin(self.TEST_URL,
|
||||||
'v2.0/tenants/4'),
|
'v2.0/tenants/4'),
|
||||||
'PUT',
|
'POST',
|
||||||
body=json.dumps(req_body),
|
body=json.dumps(req_body),
|
||||||
headers=self.TEST_POST_HEADERS) \
|
headers=self.TEST_POST_HEADERS) \
|
||||||
.AndReturn((resp, resp['body']))
|
.AndReturn((resp, resp['body']))
|
||||||
|
Reference in New Issue
Block a user