Validate image metadata attributes of Nova APIs
This patch adds the JSON Schema for Nova V2 Image metadata APIs
(list, set, update) and validate the response with added JSON
Schema to block the backward incompatibility change in the future.
Response body of above APIs is below-
{
"metadata":
{
}
}
Partially implements blueprint nova-api-attribute-test
Change-Id: I923dc1f8e5df96339b14221a68086039c36e22dc
diff --git a/tempest/api_schema/compute/v2/images.py b/tempest/api_schema/compute/v2/images.py
index dae31a6..7fd6b84 100644
--- a/tempest/api_schema/compute/v2/images.py
+++ b/tempest/api_schema/compute/v2/images.py
@@ -98,3 +98,14 @@
delete = {
'status_code': [204]
}
+
+image_metadata = {
+ 'status_code': [200],
+ 'response_body': {
+ 'type': 'object',
+ 'properties': {
+ 'metadata': {'type': 'object'}
+ },
+ 'required': ['metadata']
+ }
+}