Check attributes of attach/detach volume Nova APIs
This patch adds the JSON schema for attach and detach volume Nova
V2 & V3 APIs and validate the response of Nova attach and detach Volume
APIs with added JSON schema to block the backward incompatibility
change in the future.
Response body of V2 attach volume-
{
"volumeAttachment": {
"id": "a26887c6-c47b-4654-abb5-dfadf7d3f803",
"device": "/dev/vdd",
"volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803",
"serverId": "0c92f3f6-c253-4c9b-bd43-e880a8d2eb0a"
}
}
Response body of V2 detach Volume-
Empty response body
Status code -202
Response body of V3 attach & detach volume-
Empty response body
Status code -202
Partially implements blueprint nova-api-attribute-test
Change-Id: I8139bfba3e303c2aba1e78519e3470e86929d268
diff --git a/tempest/api_schema/compute/v3/servers.py b/tempest/api_schema/compute/v3/servers.py
index 390962e..f2a4b78 100644
--- a/tempest/api_schema/compute/v3/servers.py
+++ b/tempest/api_schema/compute/v3/servers.py
@@ -42,3 +42,7 @@
'required': ['server']
}
}
+
+attach_detach_volume = {
+ 'status_code': [202]
+}