Add documentation for glance api
Added links for available params for glance v2 api.
Change-Id: I25d32ba3f2ebabc8132470d098ca2703c9f9eac6
diff --git a/tempest/lib/services/image/v2/image_members_client.py b/tempest/lib/services/image/v2/image_members_client.py
index 2ae7516..d0ab165 100644
--- a/tempest/lib/services/image/v2/image_members_client.py
+++ b/tempest/lib/services/image/v2/image_members_client.py
@@ -19,6 +19,11 @@
api_version = "v2"
def list_image_members(self, image_id):
+ """List image members.
+
+ Available params: http://developer.openstack.org/
+ api-ref-image-v2.html#listImageMembers-v2
+ """
url = 'images/%s/members' % image_id
resp, body = self.get(url)
self.expected_success(200, resp.status)
@@ -52,12 +57,22 @@
return rest_client.ResponseBody(resp, body)
def show_image_member(self, image_id, member_id):
+ """Show an image member.
+
+ Available params: http://developer.openstack.org/
+ api-ref-image-v2.html#showImageMember-v2
+ """
url = 'images/%s/members/%s' % (image_id, member_id)
resp, body = self.get(url)
self.expected_success(200, resp.status)
return rest_client.ResponseBody(resp, json.loads(body))
def delete_image_member(self, image_id, member_id):
+ """Delete an image member.
+
+ Available params: http://developer.openstack.org/
+ api-ref-image-v2.html#deleteImageMember-v2
+ """
url = 'images/%s/members/%s' % (image_id, member_id)
resp, _ = self.delete(url)
self.expected_success(204, resp.status)
diff --git a/tempest/lib/services/image/v2/images_client.py b/tempest/lib/services/image/v2/images_client.py
index 71e7c6b..4276847 100644
--- a/tempest/lib/services/image/v2/images_client.py
+++ b/tempest/lib/services/image/v2/images_client.py
@@ -115,18 +115,33 @@
return rest_client.ResponseBody(resp, body)
def show_image_file(self, image_id):
+ """Show an image file.
+
+ Available params: http://developer.openstack.org/
+ api-ref-image-v2.html#showImageFile-v2
+ """
url = 'images/%s/file' % image_id
resp, body = self.get(url)
self.expected_success(200, resp.status)
return rest_client.ResponseBodyData(resp, body)
def add_image_tag(self, image_id, tag):
+ """Add an image tag.
+
+ Available params: http://developer.openstack.org/
+ api-ref-image-v2.html#addImageTag-v2
+ """
url = 'images/%s/tags/%s' % (image_id, tag)
resp, body = self.put(url, body=None)
self.expected_success(204, resp.status)
return rest_client.ResponseBody(resp, body)
def delete_image_tag(self, image_id, tag):
+ """Delete an image tag.
+
+ Available params: http://developer.openstack.org/
+ api-ref-image-v2.html#deleteImageTag-v2
+ """
url = 'images/%s/tags/%s' % (image_id, tag)
resp, _ = self.delete(url)
self.expected_success(204, resp.status)
diff --git a/tempest/lib/services/image/v2/namespaces_client.py b/tempest/lib/services/image/v2/namespaces_client.py
index 97400e1..5bd096d 100644
--- a/tempest/lib/services/image/v2/namespaces_client.py
+++ b/tempest/lib/services/image/v2/namespaces_client.py
@@ -58,6 +58,11 @@
return rest_client.ResponseBody(resp, body)
def delete_namespace(self, namespace):
+ """Delete a namespace.
+
+ Available params: http://developer.openstack.org/
+ api-ref-image-v2.html#deleteNamespace-v2
+ """
url = 'metadefs/namespaces/%s' % namespace
resp, _ = self.delete(url)
self.expected_success(204, resp.status)