Clarify "data" arg in create/update_image()
The argument "data" is used for passing it as raw data to Glance API,
that is different from the other arguments.
This patch separates the argument on the definition and adds some
docstring for linking to api-site.
Partially implements blueprint consistent-service-method-names
Change-Id: Ifeeceeb71c18d658ae6d5a0393150be3470264b3
diff --git a/tempest/services/image/v1/json/images_client.py b/tempest/services/image/v1/json/images_client.py
index e9f0ca1..30325c0 100644
--- a/tempest/services/image/v1/json/images_client.py
+++ b/tempest/services/image/v1/json/images_client.py
@@ -76,9 +76,13 @@
self._http = self._get_http()
return self._http
- def create_image(self, **kwargs):
+ def create_image(self, data=None, **kwargs):
+ """Create an image.
+
+ Available params: http://developer.openstack.org/
+ api-ref-image-v1.html#createImage-v1
+ """
headers = {}
- data = kwargs.pop('data', None)
headers.update(self._image_meta_to_headers(kwargs))
if data is not None:
@@ -89,9 +93,13 @@
body = json.loads(body)
return rest_client.ResponseBody(resp, body)
- def update_image(self, image_id, **kwargs):
+ def update_image(self, image_id, data=None, **kwargs):
+ """Update an image.
+
+ Available params: http://developer.openstack.org/
+ api-ref-image-v1.html#updateImage-v1
+ """
headers = {}
- data = kwargs.pop('data', None)
headers.update(self._image_meta_to_headers(kwargs))
if data is not None: