blob: 03e6aefa9e4019ca2eb0b655a2dd6829864ffb6c [file] [log] [blame]
Ghanshyam47785fa2014-03-14 18:23:02 +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
15list_floating_ips = {
16 'status_code': [200],
17 'response_body': {
18 'type': 'object',
19 'properties': {
20 'floating_ips': {
21 'type': 'array',
22 'items': {
23 'type': 'object',
24 'properties': {
25 # NOTE: Now the type of 'id' is integer, but
26 # here allows 'string' also because we will be
27 # able to change it to 'uuid' in the future.
28 'id': {'type': ['integer', 'string']},
29 'pool': {'type': ['string', 'null']},
30 'instance_id': {'type': ['integer', 'string', 'null']},
31 'ip': {
32 'type': 'string',
33 'format': 'ip-address'
34 },
35 'fixed_ip': {
36 'type': ['string', 'null'],
37 'format': 'ip-address'
38 }
39 },
40 'required': ['id', 'pool', 'instance_id', 'ip', 'fixed_ip']
41 }
42 }
43 },
44 'required': ['floating_ips']
45 }
46}
Ghanshyamd9d45e02014-03-24 09:42:29 +090047
48floating_ip = {
49 'status_code': [200],
50 'response_body': {
51 'type': 'object',
52 'properties': {
53 'floating_ip': {
54 'type': 'object',
55 'properties': {
56 # NOTE: Now the type of 'id' is integer, but here allows
57 # 'string' also because we will be able to change it to
58 # 'uuid' in the future.
59 'id': {'type': ['integer', 'string']},
60 'pool': {'type': ['string', 'null']},
61 'instance_id': {'type': ['integer', 'string', 'null']},
62 'ip': {
63 'type': 'string',
64 'format': 'ip-address'
65 },
66 'fixed_ip': {
67 'type': ['string', 'null'],
68 'format': 'ip-address'
69 }
70 },
71 'required': ['id', 'pool', 'instance_id', 'ip', 'fixed_ip']
72 }
73 },
74 'required': ['floating_ip']
75 }
76}
Ghanshyam8bbe6512014-03-24 14:07:45 +090077
78floating_ip_pools = {
79 'status_code': [200],
80 'response_body': {
81 'type': 'object',
82 'properties': {
83 'floating_ip_pools': {
84 'type': 'array',
85 'items': {
86 'type': 'object',
87 'properties': {
88 'name': {'type': 'string'}
89 },
90 'required': ['name']
91 }
92 }
93 },
94 'required': ['floating_ip_pools']
95 }
96}
97
98add_remove_floating_ip = {
99 'status_code': [202]
100}
Ghanshyam0606e1f2014-06-18 17:10:40 +0900101
102create_floating_ips_bulk = {
103 'status_code': [200],
104 'response_body': {
105 'type': 'object',
106 'properties': {
107 'floating_ips_bulk_create': {
108 'type': 'object',
109 'properties': {
110 'interface': {'type': ['string', 'null']},
111 'ip_range': {'type': 'string'},
112 'pool': {'type': ['string', 'null']},
113 },
114 'required': ['interface', 'ip_range', 'pool']
115 }
116 },
117 'required': ['floating_ips_bulk_create']
118 }
119}