api-ref: parameter verification for os-hypervisors

checked parameters

Part of bp:api-ref-in-rst

Change-Id: I6078a0ee0914f3c5cc92d9c17f0d19146f9d373b
This commit is contained in:
Kevin_Zheng 2016-05-16 17:35:18 +08:00 committed by John Garbutt
parent 5b0773f53a
commit 126400a1c9
2 changed files with 280 additions and 2 deletions

View File

@ -1,5 +1,4 @@
.. -*- rst -*- .. -*- rst -*-
.. needs:parameter_verification
.. needs:example_verification .. needs:example_verification
.. needs:body_verification .. needs:body_verification
@ -27,6 +26,14 @@ Error response codes: unauthorized(401), forbidden(403)
Response Response
-------- --------
.. rest_parameters:: parameters.yaml
- hypervisors: hypervisors
- hypervisor_hostname: hypervisor_hostname
- id: hypervisor_id_body
- state: hypervisor_state
- status: hypervisor_status
**Example List Hypervisors: JSON response** **Example List Hypervisors: JSON response**
.. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-list-resp.json .. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-list-resp.json
@ -48,6 +55,33 @@ Error response codes: unauthorized(401), forbidden(403)
Response Response
-------- --------
.. rest_parameters:: parameters.yaml
- hypervisors: hypervisors
- cpu_info: cpu_info
- current_workload: current_workload
- status: hypervisor_status
- state: hypervisor_state
- disk_available_least: disk_available_least
- host_ip: host_ip
- free_disk_gb: hypervisor_free_disk_gb
- free_ram_mb: free_ram_mb
- hypervisor_hostname: hypervisor_hostname
- hypervisor_type: hypervisor_type_body
- hypervisor_version: hypervisor_version
- id: hypervisor_id_body
- local_gb: local_gb
- local_gb_used: local_gb_used
- memory_mb: memory_mb
- memory_mb_used: memory_mb_used
- running_vms: running_vms
- service: hypervisor_service
- service.host: host_name_body
- service.id: service_id_body
- service.disable_reason: service_disable_reason
- vcpus: hypervisor_vcpus
- vcpus_used: hypervisor_vcpus_used
**Example List Hypervisors Details: JSON request** **Example List Hypervisors Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-detail-resp.json .. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-detail-resp.json
@ -69,6 +103,22 @@ Error response codes: unauthorized(401), forbidden(403)
Response Response
-------- --------
.. rest_parameters:: parameters.yaml
- hypervisor_statistics: hypervisor_statistics
- count: hypervisor_count
- current_workload: current_workload
- disk_available_least: disk_available_least
- free_disk_gb: hypervisor_free_disk_gb
- free_ram_mb: free_ram_mb
- local_gb: local_gb
- local_gb_used: local_gb_used
- memory_mb: memory_mb
- memory_mb_used: memory_mb_used
- running_vms: running_vms_total
- vcpus: hypervisor_vcpus
- vcpus_used: hypervisor_vcpus_used
**Example Show Hypervisor Statistics: JSON response** **Example Show Hypervisor Statistics: JSON response**
.. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-statistics-resp.json .. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-statistics-resp.json
@ -98,6 +148,33 @@ Request
Response Response
-------- --------
.. rest_parameters:: parameters.yaml
- hypervisor: hypervisor
- cpu_info: cpu_info
- state: hypervisor_state
- status: hypervisor_status
- current_workload: current_workload
- disk_available_least: disk_available_least
- host_ip: host_ip
- free_disk_gb: hypervisor_free_disk_gb
- free_ram_mb: free_ram_mb
- hypervisor_hostname: hypervisor_hostname
- hypervisor_type: hypervisor_type_body
- hypervisor_version: hypervisor_version
- id: hypervisor_id_body
- local_gb: local_gb
- local_gb_used: local_gb_used
- memory_mb: memory_mb
- memory_mb_used: memory_mb_used
- running_vms: running_vms
- service: hypervisor_service
- service.host: host_name_body
- service.id: service_id_body
- service.disable_reason: service_disable_reason
- vcpus: hypervisor_vcpus
- vcpus_used: hypervisor_vcpus_used
**Example Show Hypervisor Details: JSON response** **Example Show Hypervisor Details: JSON response**
.. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-show-resp.json .. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-show-resp.json
@ -127,6 +204,15 @@ Request
Response Response
-------- --------
.. rest_parameters:: parameters.yaml
- hypervisor: hypervisor
- hypervisor_hostname: hypervisor_hostname
- id: hypervisor_id_body
- state: hypervisor_state
- status: hypervisor_status
- uptime: uptime
**Example Show Hypervisor Uptime: JSON response** **Example Show Hypervisor Uptime: JSON response**
.. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-uptime-resp.json .. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-uptime-resp.json
@ -156,6 +242,14 @@ Request
Response Response
-------- --------
.. rest_parameters:: parameters.yaml
- hypervisors: hypervisors
- hypervisor_hostname: hypervisor_hostname
- id: hypervisor_id_body
- state: hypervisor_state
- status: hypervisor_status
**Example Search Hypervisor: JSON request** **Example Search Hypervisor: JSON request**
.. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-search-resp.json .. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-search-resp.json
@ -185,6 +279,17 @@ Request
Response Response
-------- --------
.. rest_parameters:: parameters.yaml
- hypervisors: hypervisors
- hypervisor_hostname: hypervisor_hostname
- id: hypervisor_id_body
- state: hypervisor_state
- status: hypervisor_status
- servers: servers
- servers.uuid: server_uuid
- servers.name: server_name
**Example List Hypervisor Servers: JSON request** **Example List Hypervisor Servers: JSON request**
.. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-with-servers-resp.json .. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-with-servers-resp.json

View File

@ -126,7 +126,7 @@ host_status_body_in:
type: string type: string
hypervisor_id: hypervisor_id:
description: | description: |
The UUID of the hypervisor. The ID of the hypervisor.
in: path in: path
required: true required: true
type: string type: string
@ -1005,6 +1005,13 @@ cores_quota_optional:
in: body in: body
required: false required: false
type: integer type: integer
cpu_info:
description: |
The cpu information object. The content of this field is hypervisor
specific.
in: body
required: true
type: object
create_info: create_info:
description: | description: |
Information for snapshot creation. Information for snapshot creation.
@ -1038,6 +1045,14 @@ createImage:
in: body in: body
required: true required: true
type: string type: string
current_workload:
description: |
The current_workload is the number of tasks the hypervisor is responsible for. This will be
equal or greater than the number of active VMs on the system (it can be greater when VMs
are being deleted and the hypervisor is still cleaning up).
in: body
required: true
type: integer
delete_on_termination: delete_on_termination:
description: | description: |
To delete the boot volume when the server is destroyed, specify ``true``. To delete the boot volume when the server is destroyed, specify ``true``.
@ -1085,6 +1100,12 @@ device_resp:
in: body in: body
required: true required: true
type: string type: string
disk_available_least:
description: |
The actual free disk on this hypervisor(in GB).
in: body
required: true
type: integer
disk_config: disk_config:
description: | description: |
Disk configuration. The value is either: Disk configuration. The value is either:
@ -1435,6 +1456,12 @@ forceDelete:
in: body in: body
required: true required: true
type: string type: string
free_ram_mb:
description: |
The free RAM in this hypervisor(in MB).
in: body
required: true
type: integer
from_port: from_port:
description: | description: |
The port at start of range. The port at start of range.
@ -1478,6 +1505,12 @@ host_disk_gb:
in: body in: body
required: true required: true
type: string type: string
host_ip:
description: |
The IP address of the hypervisor's host.
in: body
required: true
type: string
host_maintenance_mode: host_maintenance_mode:
description: | description: |
Mode of maintenance state, either 'on_maintenance' or 'off_maintenance' Mode of maintenance state, either 'on_maintenance' or 'off_maintenance'
@ -1574,12 +1607,96 @@ hosts:
in: body in: body
required: true required: true
type: array type: array
hypervisor:
description: |
The hypervisor object.
in: body
required: true
type: object
hypervisor_count:
description: |
The number of hypervisors.
in: body
required: true
type: integer
hypervisor_free_disk_gb:
description: |
The free disk remaining on this hypervisor(in GB).
in: body
required: true
type: integer
hypervisor_hostname:
description: |
The hypervisor host name.
in: body
required: true
type: string
hypervisor_id_body:
description: |
The id of the hypervisor.
in: body
required: true
type: integer
hypervisor_service:
description: |
The hypervisor service object.
in: body
required: true
type: object
hypervisor_state:
description: |
The state of the hypervisor. One of ``up`` or ``down``.
in: body
required: true
type: string
hypervisor_statistics:
description: |
The object of the hypervisors' statics.
in: body
required: true
type: object
hypervisor_status:
description: |
The status of the hypervisor. One of ``enabled`` or ``disabled``.
in: body
required: true
type: string
hypervisor_type: hypervisor_type:
in: body in: body
required: true required: true
type: string type: string
description: | description: |
The hypervisor type for the agent. Currently only ``xen`` is supported. The hypervisor type for the agent. Currently only ``xen`` is supported.
hypervisor_type_body:
description: |
The hypervisor type.
in: body
required: true
type: string
hypervisor_vcpus:
description: |
The number of vcpu in this hypervisor.
in: body
required: true
type: integer
hypervisor_vcpus_used:
description: |
The number of vcpu used in this hypervisor.
in: body
required: true
type: integer
hypervisor_version:
description: |
The hypervisor version.
in: body
required: true
type: integer
hypervisors:
description: |
An array of hypervisor information.
in: body
required: true
type: array
id: id:
description: | description: |
The security group name or UUID. The security group name or UUID.
@ -1883,6 +2000,18 @@ links:
in: body in: body
required: true required: true
type: array type: array
local_gb:
description: |
The disk in this hypervisor(in GB).
in: body
required: true
type: integer
local_gb_used:
description: |
The disk used in this hypervisor(in GB).
in: body
required: true
type: integer
lock: lock:
description: | description: |
The action. The action.
@ -1913,6 +2042,18 @@ members:
in: body in: body
required: true required: true
type: array type: array
memory_mb:
description: |
The memory of this hypervisor(in MB).
in: body
required: true
type: integer
memory_mb_used:
description: |
The memory used in this hypervisor(in MB).
in: body
required: true
type: integer
metadata: metadata:
description: | description: |
Metadata key and value pairs. The maximum size of the metadata key and value is Metadata key and value pairs. The maximum size of the metadata key and value is
@ -2543,6 +2684,18 @@ rules_1:
in: body in: body
required: true required: true
type: string type: string
running_vms:
description: |
The number of running vms on this hypervisor.
in: body
required: true
type: integer
running_vms_total:
description: |
The total number of running vms on all hypervisors.
in: body
required: true
type: integer
secgroup_rule_cidr: secgroup_rule_cidr:
description: | description: |
The CIDR for address range. The CIDR for address range.
@ -2746,6 +2899,19 @@ service:
type: object type: object
description: | description: |
Object representing a compute service Object representing a compute service
service_disable_reason:
in: body
required: true
type: string
description: |
The disable reason of the service, ``null`` if the service is enabled or
disabled without reason provided.
service_id_body:
in: body
required: true
type: integer
description: |
The id of the service
service_state: service_state:
in: body in: body
required: true required: true
@ -2882,6 +3048,13 @@ updated:
in: body in: body
required: true required: true
type: string type: string
uptime:
description: |
The total uptime of the hypervisor and information about average
load.
in: body
required: true
type: string
url: url:
description: | description: |
The URL associated with the agent. The URL associated with the agent.