blob: 16ed7c24ed557f8fa5b63e66a1f4d6998c2514a1 [file] [log] [blame]
Chris Yeohc266b282014-03-13 18:19:00 +10301# Copyright 2014 NEC Corporation. All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15get_volume = {
16 'status_code': [200],
17 'response_body': {
18 'type': 'object',
19 'properties': {
20 'volume': {
21 'type': 'object',
22 'properties': {
23 # NOTE: Now the type of 'id' is integer, but here allows
24 # 'string' also because we will be able to change it to
25 # 'uuid' in the future.
26 'id': {'type': ['integer', 'string']},
27 'status': {'type': 'string'},
28 'displayName': {'type': ['string', 'null']},
29 'availabilityZone': {'type': 'string'},
30 'createdAt': {'type': 'string'},
31 'displayDescription': {'type': ['string', 'null']},
32 'volumeType': {'type': 'string'},
33 'snapshotId': {'type': ['string', 'null']},
34 'metadata': {'type': 'object'},
35 'size': {'type': 'integer'},
36 'attachments': {
37 'type': 'array',
38 'items': {
39 'type': 'object',
40 'properties': {
41 'id': {'type': ['integer', 'string']},
42 'device': {'type': 'string'},
43 'volumeId': {'type': ['integer', 'string']},
44 'serverId': {'type': ['integer', 'string']}
45 }
46 }
47 }
48 },
49 'required': ['id', 'status', 'displayName', 'availabilityZone',
50 'createdAt', 'displayDescription', 'volumeType',
51 'snapshotId', 'metadata', 'size', 'attachments']
52 }
53 },
54 'required': ['volume']
55 }
56}