Verify the response status of create delete Image

This patch adds the JSON Schema for response status of Nova V2 Image
create, delete delete meta APIs and validate the response status with
added JSON Schema to block the backward incompatibility change in the
future.

create image, delete image & delete image meta does not return the
response body. Response status of above APIs is below-
create image - 202
delete image - 204
delete image meta - 204

Partially implements blueprint nova-api-attribute-test

Change-Id: Ia4864b3b7145a69dc257aba7f7612745b1b8254f
diff --git a/tempest/api_schema/compute/v2/images.py b/tempest/api_schema/compute/v2/images.py
index 41593c6..dae31a6 100644
--- a/tempest/api_schema/compute/v2/images.py
+++ b/tempest/api_schema/compute/v2/images.py
@@ -90,3 +90,11 @@
         'required': ['images']
     }
 }
+
+create_image = {
+    'status_code': [202]
+}
+
+delete = {
+    'status_code': [204]
+}
diff --git a/tempest/services/compute/json/images_client.py b/tempest/services/compute/json/images_client.py
index 2f128f2..bfa65df 100644
--- a/tempest/services/compute/json/images_client.py
+++ b/tempest/services/compute/json/images_client.py
@@ -48,6 +48,7 @@
         post_body = json.dumps(post_body)
         resp, body = self.post('servers/%s/action' % str(server_id),
                                post_body)
+        self.validate_response(schema.create_image, resp, body)
         return resp, body
 
     def list_images(self, params=None):
@@ -81,7 +82,9 @@
 
     def delete_image(self, image_id):
         """Deletes the provided image."""
-        return self.delete("images/%s" % str(image_id))
+        resp, body = self.delete("images/%s" % str(image_id))
+        self.validate_response(schema.delete, resp, body)
+        return resp, body
 
     def wait_for_image_status(self, image_id, status):
         """Waits for an image to reach a given status."""
@@ -125,6 +128,7 @@
         """Deletes a single image metadata key/value pair."""
         resp, body = self.delete("images/%s/metadata/%s" %
                                  (str(image_id), key))
+        self.validate_response(schema.delete, resp, body)
         return resp, body
 
     def is_resource_deleted(self, id):