summaryrefslogtreecommitdiff
path: root/tempest/api_schema
diff options
context:
space:
mode:
authorghanshyam <ghanshyam.mann@nectechnologies.in>2015-02-25 15:08:10 +0900
committerKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2015-03-16 00:48:39 +0000
commitd4b808f6a44c04e581167e47b5af6a2f3d2372c0 (patch)
tree4d51d044a7ea77557a4c954d3b6156e941b0721c /tempest/api_schema
parent7ebc28f4784ce96e85213d4d10337775c29ced1f (diff)
downloadtempest-d4b808f6a44c04e581167e47b5af6a2f3d2372c0.tar.gz
Adding common header attributes in image header schema
Create Image schema only contain 'location' as header field but there some common fields listed below which will be present in header. Create Image header- { 'status': '202', 'content-length': '0', 'x-compute-request-id': 'req-df43993d-5047-407b-a9f7-22c455d7f42c', 'connection': 'close', 'location': 'http://10.0.2.15:8774/v2/ 578afc43d3d14c34b71aa01a604ca987/images/b769ecb7-8fee-4893-8c41-1e4047d20a29', 'date': 'Wed, 25 Feb 2015 06:04:25 GMT', 'content-type': 'text/html; charset=UTF-8' 'vary': 'X-OpenStack-Nova-API-Version', 'x-openstack-nova-api-version': '2.1' } This commit fix that. Change-Id: Icfeddc3f8f73d1dc5eb23ace7d1a8bdb1dbb6f5f
Diffstat (limited to 'tempest/api_schema')
-rw-r--r--tempest/api_schema/response/compute/parameter_types.py14
-rw-r--r--tempest/api_schema/response/compute/v2/images.py15
2 files changed, 22 insertions, 7 deletions
diff --git a/tempest/api_schema/response/compute/parameter_types.py b/tempest/api_schema/response/compute/parameter_types.py
index 4a1dfddf9..90d4c8f7d 100644
--- a/tempest/api_schema/response/compute/parameter_types.py
+++ b/tempest/api_schema/response/compute/parameter_types.py
@@ -65,3 +65,17 @@ addresses = {
}
}
}
+
+response_header = {
+ 'connection': {'type': 'string'},
+ 'content-length': {'type': 'string'},
+ 'content-type': {'type': 'string'},
+ 'status': {'type': 'string'},
+ 'x-compute-request-id': {'type': 'string'},
+ 'vary': {'type': 'string'},
+ 'x-openstack-nova-api-version': {'type': 'string'},
+ 'date': {
+ 'type': 'string',
+ 'format': 'data-time'
+ }
+}
diff --git a/tempest/api_schema/response/compute/v2/images.py b/tempest/api_schema/response/compute/v2/images.py
index 21dc9ab03..3c0b80e79 100644
--- a/tempest/api_schema/response/compute/v2/images.py
+++ b/tempest/api_schema/response/compute/v2/images.py
@@ -91,15 +91,16 @@ create_image = {
'status_code': [202],
'response_header': {
'type': 'object',
- 'properties': {
- 'location': {
- 'type': 'string',
- 'format': 'uri'
- }
- },
- 'required': ['location']
+ 'properties': parameter_types.response_header
}
}
+create_image['response_header']['properties'].update(
+ {'location': {
+ 'type': 'string',
+ 'format': 'uri'}
+ }
+)
+create_image['response_header']['required'] = ['location']
delete = {
'status_code': [204]