[V3] Rename get_policy to show_policy

[GET /resources] methods should be "list_<resource name>s"
or "show_<resource name>", so this patch applies the rule
to policy client.

Partially implements blueprint consistent-service-method-names

Change-Id: Ic4cfe4a5ec5695d943f7dca9579c545285fb2719
This commit is contained in:
lei zhang 2015-11-28 23:44:14 +08:00
parent d88f3a34dd
commit f2f496b656
3 changed files with 2 additions and 3 deletions

View File

@ -64,7 +64,7 @@ class PoliciesTestJSON(base.BaseIdentityV3AdminTest):
policy['id'], type=update_type)['policy']
self.assertIn('type', data)
# Assertion for updated value with fetched value
fetched_policy = self.policy_client.get_policy(policy['id'])['policy']
fetched_policy = self.policy_client.show_policy(policy['id'])['policy']
self.assertIn('id', fetched_policy)
self.assertIn('blob', fetched_policy)
self.assertIn('type', fetched_policy)

View File

@ -1,6 +1,5 @@
./tempest/services/database/json/flavors_client.py
./tempest/services/identity/v3/json/identity_client.py
./tempest/services/identity/v3/json/policy_client.py
./tempest/services/messaging/json/messaging_client.py
./tempest/services/object_storage/object_client.py
./tempest/services/telemetry/json/alarming_client.py

View File

@ -44,7 +44,7 @@ class PolicyClient(service_client.ServiceClient):
body = json.loads(body)
return service_client.ResponseBody(resp, body)
def get_policy(self, policy_id):
def show_policy(self, policy_id):
"""Lists out the given policy."""
url = 'policies/%s' % policy_id
resp, body = self.get(url)