blob: 4c5801307fe91d56ec41ff8061559140e30f8779 [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
15list_services = {
16 'status_code': [200],
17 'response_body': {
18 'type': 'object',
19 'properties': {
20 'services': {
21 'type': 'array',
22 'items': {
23 'type': 'object',
24 'properties': {
25 # NOTE: Now the type of 'id' is integer, but here
26 # allows 'string' also because we will be able to
27 # change it to 'uuid' in the future.
28 'id': {'type': ['integer', 'string']},
29 'zone': {'type': 'string'},
30 'host': {'type': 'string'},
31 'state': {'type': 'string'},
32 'binary': {'type': 'string'},
33 'status': {'type': 'string'},
34 'updated_at': {'type': 'string'},
35 'disabled_reason': {'type': ['string', 'null']}
36 },
37 'required': ['id', 'zone', 'host', 'state', 'binary',
38 'status', 'updated_at', 'disabled_reason']
39 }
40 }
41 },
42 'required': ['services']
43 }
44}
Ken'ichi Ohmichi26bcee62014-03-19 14:30:38 +090045
46enable_service = {
47 'status_code': [200],
48 'response_body': {
49 'type': 'object',
50 'properties': {
51 'service': {
52 'type': 'object',
53 'properties': {
54 'status': {'type': 'string'},
55 'binary': {'type': 'string'},
56 'host': {'type': 'string'}
57 },
58 'required': ['status', 'binary', 'host']
59 }
60 },
61 'required': ['service']
62 }
63}