Make identity v3 services_client use **kwargs
As we discussed on
http://lists.openstack.org/pipermail/openstack-dev/2015-July/068864.html
All http POST/PUT methods need to contain **kwargs as their arguments.
This patch makes identity v3 services_client list API accept
filter param.
Also add and correct doc string link.
Partially implements blueprint consistent-service-method-names
Change-Id: Iac174a5d6ab650c4512d0961d10f83a9c23eee52
diff --git a/tempest/services/identity/v3/json/services_client.py b/tempest/services/identity/v3/json/services_client.py
index e863016..95caf7d 100644
--- a/tempest/services/identity/v3/json/services_client.py
+++ b/tempest/services/identity/v3/json/services_client.py
@@ -18,6 +18,7 @@
"""
from oslo_serialization import jsonutils as json
+from six.moves.urllib import parse as urllib
from tempest.lib.common import rest_client
@@ -57,13 +58,21 @@
body = json.loads(body)
return rest_client.ResponseBody(resp, body)
- def delete_service(self, serv_id):
- url = "services/" + serv_id
+ def delete_service(self, service_id):
+ url = "services/" + service_id
resp, body = self.delete(url)
self.expected_success(204, resp.status)
return rest_client.ResponseBody(resp, body)
- def list_services(self):
+ def list_services(self, **params):
+ """List services.
+
+ Available params: see http://developer.openstack.org/
+ api-ref/identity/v3/#list-services
+ """
+ url = 'services'
+ if params:
+ url += '?%s' % urllib.urlencode(params)
resp, body = self.get('services')
self.expected_success(200, resp.status)
body = json.loads(body)