Ghanshyam | 1002a03 | 2014-03-26 20:48:10 +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 | |
| 15 | hypervisor_statistics = { |
| 16 | 'status_code': [200], |
| 17 | 'response_body': { |
| 18 | 'type': 'object', |
| 19 | 'properties': { |
| 20 | 'hypervisor_statistics': { |
| 21 | 'type': 'object', |
| 22 | 'properties': { |
| 23 | 'count': {'type': 'integer'}, |
| 24 | 'current_workload': {'type': 'integer'}, |
| 25 | 'disk_available_least': {'type': 'integer'}, |
| 26 | 'free_disk_gb': {'type': 'integer'}, |
| 27 | 'free_ram_mb': {'type': 'integer'}, |
| 28 | 'local_gb': {'type': 'integer'}, |
| 29 | 'local_gb_used': {'type': 'integer'}, |
| 30 | 'memory_mb': {'type': 'integer'}, |
| 31 | 'memory_mb_used': {'type': 'integer'}, |
| 32 | 'running_vms': {'type': 'integer'}, |
| 33 | 'vcpus': {'type': 'integer'}, |
| 34 | 'vcpus_used': {'type': 'integer'} |
| 35 | }, |
| 36 | 'required': ['count', 'current_workload', |
| 37 | 'disk_available_least', 'free_disk_gb', |
| 38 | 'free_ram_mb', 'local_gb', 'local_gb_used', |
| 39 | 'memory_mb', 'memory_mb_used', 'running_vms', |
| 40 | 'vcpus', 'vcpus_used'] |
| 41 | } |
| 42 | }, |
| 43 | 'required': ['hypervisor_statistics'] |
| 44 | } |
| 45 | } |
Ghanshyam | 028044c | 2014-03-26 19:20:28 +0900 | [diff] [blame^] | 46 | |
| 47 | common_list_hypervisors_detail = { |
| 48 | 'status_code': [200], |
| 49 | 'response_body': { |
| 50 | 'type': 'object', |
| 51 | 'properties': { |
| 52 | 'hypervisors': { |
| 53 | 'type': 'array', |
| 54 | 'items': { |
| 55 | 'type': 'object', |
| 56 | 'properties': { |
| 57 | 'cpu_info': {'type': 'string'}, |
| 58 | 'current_workload': {'type': 'integer'}, |
| 59 | 'disk_available_least': {'type': ['integer', 'null']}, |
| 60 | 'host_ip': { |
| 61 | 'type': 'string', |
| 62 | 'format': 'ip-address' |
| 63 | }, |
| 64 | 'free_disk_gb': {'type': 'integer'}, |
| 65 | 'free_ram_mb': {'type': 'integer'}, |
| 66 | 'hypervisor_hostname': {'type': 'string'}, |
| 67 | 'hypervisor_type': {'type': 'string'}, |
| 68 | 'hypervisor_version': {'type': 'integer'}, |
| 69 | 'id': {'type': ['integer', 'string']}, |
| 70 | 'local_gb': {'type': 'integer'}, |
| 71 | 'local_gb_used': {'type': 'integer'}, |
| 72 | 'memory_mb': {'type': 'integer'}, |
| 73 | 'memory_mb_used': {'type': 'integer'}, |
| 74 | 'running_vms': {'type': 'integer'}, |
| 75 | 'service': { |
| 76 | 'type': 'object', |
| 77 | 'properties': { |
| 78 | 'host': {'type': 'string'}, |
| 79 | 'id': {'type': ['integer', 'string']} |
| 80 | }, |
| 81 | 'required': ['host', 'id'] |
| 82 | }, |
| 83 | 'vcpus': {'type': 'integer'}, |
| 84 | 'vcpus_used': {'type': 'integer'} |
| 85 | }, |
| 86 | 'required': ['cpu_info', 'current_workload', |
| 87 | 'disk_available_least', 'host_ip', |
| 88 | 'free_disk_gb', 'free_ram_mb', |
| 89 | 'hypervisor_hostname', 'hypervisor_type', |
| 90 | 'hypervisor_version', 'id', 'local_gb', |
| 91 | 'local_gb_used', 'memory_mb', |
| 92 | 'memory_mb_used', 'running_vms', 'service', |
| 93 | 'vcpus', 'vcpus_used'] |
| 94 | } |
| 95 | } |
| 96 | }, |
| 97 | 'required': ['hypervisors'] |
| 98 | } |
| 99 | } |