Haiwei Xu | 54432cf | 2014-03-17 22:58:11 +0900 | [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 | |
Ken'ichi Ohmichi | 0b31d30 | 2014-05-01 10:53:25 +0900 | [diff] [blame] | 15 | common_start_up_body = { |
| 16 | 'type': 'object', |
| 17 | 'properties': { |
| 18 | 'host': {'type': 'string'}, |
| 19 | 'power_action': {'enum': ['startup']} |
| 20 | }, |
| 21 | 'required': ['host', 'power_action'] |
| 22 | } |
| 23 | |
Haiwei Xu | 54432cf | 2014-03-17 22:58:11 +0900 | [diff] [blame] | 24 | list_hosts = { |
| 25 | 'status_code': [200], |
| 26 | 'response_body': { |
| 27 | 'type': 'object', |
| 28 | 'properties': { |
| 29 | 'hosts': { |
| 30 | 'type': 'array', |
| 31 | 'items': { |
| 32 | 'type': 'object', |
| 33 | 'properties': { |
| 34 | 'host_name': {'type': 'string'}, |
| 35 | 'service': {'type': 'string'}, |
| 36 | 'zone': {'type': 'string'} |
| 37 | }, |
| 38 | 'required': ['host_name', 'service', 'zone'] |
| 39 | } |
| 40 | } |
| 41 | }, |
| 42 | 'required': ['hosts'] |
| 43 | } |
| 44 | } |
Haiwei Xu | d99dd48 | 2014-03-19 05:28:36 +0900 | [diff] [blame] | 45 | |
| 46 | show_host_detail = { |
| 47 | 'status_code': [200], |
| 48 | 'response_body': { |
| 49 | 'type': 'object', |
| 50 | 'properties': { |
| 51 | 'host': { |
| 52 | 'type': 'array', |
| 53 | 'item': { |
| 54 | 'type': 'object', |
| 55 | 'properties': { |
| 56 | 'resource': { |
| 57 | 'type': 'object', |
| 58 | 'properties': { |
| 59 | 'cpu': {'type': 'integer'}, |
| 60 | 'disk_gb': {'type': 'integer'}, |
| 61 | 'host': {'type': 'string'}, |
| 62 | 'memory_mb': {'type': 'integer'}, |
| 63 | 'project': {'type': 'string'} |
| 64 | }, |
| 65 | 'required': ['cpu', 'disk_gb', 'host', |
| 66 | 'memory_mb', 'project'] |
| 67 | } |
| 68 | }, |
| 69 | 'required': ['resource'] |
| 70 | } |
| 71 | } |
| 72 | }, |
| 73 | 'required': ['host'] |
| 74 | } |
| 75 | } |