blob: f2a4b7869c542406083b6842ce6f36f66e0f1b7d [file] [log] [blame]
Ken'ichi Ohmichi02604582014-03-14 16:23:41 +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
Ken'ichi Ohmichi024cdae2014-03-24 08:05:59 +090015from tempest.api_schema.compute import parameter_types
16
Ken'ichi Ohmichi02604582014-03-14 16:23:41 +090017create_server = {
18 'status_code': [202],
19 'response_body': {
20 'type': 'object',
21 'properties': {
22 'server': {
23 'type': 'object',
24 'properties': {
25 # NOTE: Now the type of 'id' is uuid, but here allows
26 # 'integer' also because old OpenStack uses 'integer'
27 # as a server id.
28 'id': {'type': ['integer', 'string']},
29 'os-security-groups:security_groups': {'type': 'array'},
Ken'ichi Ohmichi024cdae2014-03-24 08:05:59 +090030 'links': parameter_types.links,
Ken'ichi Ohmichi02604582014-03-14 16:23:41 +090031 'admin_password': {'type': 'string'},
32 'os-access-ips:access_ip_v4': {'type': 'string'},
33 'os-access-ips:access_ip_v6': {'type': 'string'}
34 },
35 # NOTE: os-access-ips:access_ip_v4/v6 are API extension,
36 # and some environments return a response without these
37 # attributes. So they are not 'required'.
38 'required': ['id', 'os-security-groups:security_groups',
39 'links', 'admin_password']
40 }
41 },
42 'required': ['server']
43 }
44}
Ghanshyam385c4e72014-03-27 11:42:25 +090045
46attach_detach_volume = {
47 'status_code': [202]
48}