Yuiko Takada | 1cd6322 | 2014-04-04 15:19:00 +0000 | [diff] [blame] | 1 | # 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 | |
Marc Koderer | 6fbd74f | 2014-08-04 09:38:19 +0200 | [diff] [blame] | 15 | from tempest.api_schema.response.compute import parameter_types |
Yuiko Takada | 9e118bd | 2014-03-27 10:54:13 +0000 | [diff] [blame] | 16 | |
Yuiko Takada | 1cd6322 | 2014-04-04 15:19:00 +0000 | [diff] [blame] | 17 | delete_interface = { |
| 18 | 'status_code': [202] |
| 19 | } |
Yuiko Takada | 9e118bd | 2014-03-27 10:54:13 +0000 | [diff] [blame] | 20 | |
| 21 | interface_common_info = { |
| 22 | 'type': 'object', |
| 23 | 'properties': { |
| 24 | 'port_state': {'type': 'string'}, |
| 25 | 'fixed_ips': { |
| 26 | 'type': 'array', |
| 27 | 'items': { |
| 28 | 'type': 'object', |
| 29 | 'properties': { |
| 30 | 'subnet_id': { |
| 31 | 'type': 'string', |
| 32 | 'format': 'uuid' |
| 33 | }, |
| 34 | 'ip_address': { |
| 35 | 'type': 'string', |
| 36 | 'format': 'ipv4' |
| 37 | } |
| 38 | }, |
| 39 | 'required': ['subnet_id', 'ip_address'] |
| 40 | } |
| 41 | }, |
| 42 | 'port_id': {'type': 'string', 'format': 'uuid'}, |
| 43 | 'net_id': {'type': 'string', 'format': 'uuid'}, |
| 44 | 'mac_addr': parameter_types.mac_address |
| 45 | }, |
| 46 | 'required': ['port_state', 'fixed_ips', 'port_id', 'net_id', 'mac_addr'] |
| 47 | } |