blob: aefb8f5fc6388ef2f2d54de366543eb2cd2c1f5b [file] [log] [blame]
Ghanshyam7fa397c2014-04-01 19:32:38 +09001# 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
Ghanshyama8f66532014-04-23 17:18:14 +090015import copy
16
Ken'ichi Ohmichi29cd5122014-04-28 11:04:52 +090017from tempest.api_schema.compute import parameter_types
18
Ghanshyam7fa397c2014-04-01 19:32:38 +090019get_password = {
20 'status_code': [200],
21 'response_body': {
22 'type': 'object',
23 'properties': {
24 'password': {'type': 'string'}
25 },
26 'required': ['password']
27 }
28}
Ghanshyamd6d30402014-04-02 15:28:37 +090029
30get_vnc_console = {
31 'status_code': [200],
32 'response_body': {
33 'type': 'object',
34 'properties': {
35 'console': {
36 'type': 'object',
37 'properties': {
38 'type': {'type': 'string'},
39 'url': {
40 'type': 'string',
41 'format': 'uri'
42 }
43 },
44 'required': ['type', 'url']
45 }
46 },
47 'required': ['console']
48 }
49}
Ghanshyam4ac02742014-04-17 19:15:47 +090050
Ken'ichi Ohmichi29cd5122014-04-28 11:04:52 +090051base_update_server = {
52 'status_code': [200],
53 'response_body': {
54 'type': 'object',
55 'properties': {
56 'server': {
57 'type': 'object',
58 'properties': {
59 'id': {'type': ['integer', 'string']},
60 'name': {'type': 'string'},
61 'status': {'type': 'string'},
62 'image': {
63 'type': 'object',
64 'properties': {
65 'id': {'type': ['integer', 'string']},
66 'links': parameter_types.links
67 },
68 'required': ['id', 'links']
69 },
70 'flavor': {
71 'type': 'object',
72 'properties': {
73 'id': {'type': ['integer', 'string']},
74 'links': parameter_types.links
75 },
76 'required': ['id', 'links']
77 },
78 'user_id': {'type': 'string'},
79 'tenant_id': {'type': 'string'},
80 'created': {'type': 'string'},
81 'updated': {'type': 'string'},
82 'progress': {'type': 'integer'},
83 'metadata': {'type': 'object'},
84 'links': parameter_types.links,
85 'addresses': parameter_types.addresses,
86 },
87 'required': ['id', 'name', 'status', 'image', 'flavor',
88 'user_id', 'tenant_id', 'created', 'updated',
89 'progress', 'metadata', 'links', 'addresses']
90 }
91 }
92 }
93}
94
Ghanshyam4ac02742014-04-17 19:15:47 +090095delete_server = {
96 'status_code': [204],
97}
Haiwei Xu3d2b7af2014-04-12 02:50:26 +090098
99set_server_metadata = {
100 'status_code': [200],
101 'response_body': {
102 'type': 'object',
103 'properties': {
Ghanshyameaaa6a42014-04-25 18:38:21 +0900104 'metadata': {
105 'type': 'object',
106 'patternProperties': {
107 '^.+$': {'type': 'string'}
108 }
109 }
Haiwei Xu3d2b7af2014-04-12 02:50:26 +0900110 },
111 'required': ['metadata']
112 }
113}
Ghanshyama8f66532014-04-23 17:18:14 +0900114
115list_server_metadata = copy.deepcopy(set_server_metadata)
Ghanshyameaaa6a42014-04-25 18:38:21 +0900116
117delete_server_metadata_item = {
118 'status_code': [204]
119}