Make the arguments of resource id consistent
Most arguments of resource id are "<resource name>_id" in compute
service clients, but some arguments are different.
This patch renames them to "<resource name>_id".
In addition this patch changes argument of fixed_ips_client also.
However, the argument name is not "<resource name>_id" because the
argument is ip address, not resource id.
The arguments of keypairs_client also are changed with this patch,
and new arguments are not "<resource name>_id" because a caller needs
to specify keypair name on these APIs instead of ID.
Partially implements blueprint consistent-service-method-names
Change-Id: I90cc456c0c49c79884bf0eb41fa93a9c602c1ef6
diff --git a/tempest/services/compute/json/keypairs_client.py b/tempest/services/compute/json/keypairs_client.py
index ba8b1e2..cf03a24 100644
--- a/tempest/services/compute/json/keypairs_client.py
+++ b/tempest/services/compute/json/keypairs_client.py
@@ -32,8 +32,8 @@
self.validate_response(schema.list_keypairs, resp, body)
return service_client.ResponseBodyList(resp, body['keypairs'])
- def show_keypair(self, key_name):
- resp, body = self.get("os-keypairs/%s" % key_name)
+ def show_keypair(self, keypair_name):
+ resp, body = self.get("os-keypairs/%s" % keypair_name)
body = json.loads(body)
self.validate_response(schema.get_keypair, resp, body)
return service_client.ResponseBody(resp, body['keypair'])
@@ -48,7 +48,7 @@
self.validate_response(schema.create_keypair, resp, body)
return service_client.ResponseBody(resp, body['keypair'])
- def delete_keypair(self, key_name):
- resp, body = self.delete("os-keypairs/%s" % key_name)
+ def delete_keypair(self, keypair_name):
+ resp, body = self.delete("os-keypairs/%s" % keypair_name)
self.validate_response(schema.delete_keypair, resp, body)
return service_client.ResponseBody(resp, body)