blob: b4e6e533782285ccdcec026ba5cf26d6c985192d [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 '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 'adminPass': {'type': 'string'},
32 'OS-DCF:diskConfig': {'type': 'string'}
33 },
34 # NOTE: OS-DCF:diskConfig is API extension, and some
35 # environments return a response without the attribute.
36 # So it is not 'required'.
37 'required': ['id', 'security_groups', 'links', 'adminPass']
38 }
39 },
40 'required': ['server']
41 }
42}