Merge "Update os-hypervisor extension with list servers method"

This commit is contained in:
Jenkins 2015-04-24 04:08:15 +00:00 committed by Gerrit Code Review
commit 92bada8a58
7 changed files with 32 additions and 56 deletions

View File

@ -1,14 +1,17 @@
{
"hypervisors": [
{
"cpu_info": "?",
"cpu_info": "{\"arch\": \"x86_64\", \"model\": \"Nehalem\", \"vendor\": \"Intel\", \"features\": [\"pge\", \"clflush\"], \"topology\": {\"cores\": 1, \"threads\": 1, \"sockets\": 4}}",
"current_workload": 0,
"status": "enabled",
"state": "up",
"disk_available_least": 0,
"host_ip": "1.1.1.1",
"free_disk_gb": 1028,
"free_ram_mb": 7680,
"hypervisor_hostname": "fake-mini",
"hypervisor_type": "fake",
"hypervisor_version": 1,
"hypervisor_version": 1000,
"id": 1,
"local_gb": 1028,
"local_gb_used": 0,
@ -17,7 +20,8 @@
"running_vms": 0,
"service": {
"host": "e6a37ee802d74863ab8b91ade8f12a67",
"id": 2
"id": 2,
"disabled_reason": null
},
"vcpus": 1,
"vcpus_used": 0

View File

@ -2,7 +2,9 @@
"hypervisors": [
{
"hypervisor_hostname": "fake-mini",
"id": 1
"id": 1,
"state": "up",
"status": "enabled"
}
]
}

View File

@ -2,7 +2,9 @@
"hypervisors": [
{
"hypervisor_hostname": "fake-mini",
"id": 1
"id": 1,
"state": "up",
"status": "enabled"
}
]
}

View File

@ -1,7 +1,10 @@
{
"hypervisor": {
"hypervisor_hostname": "fake-mini",
"id": 1,
"servers": []
}
"hypervisors": [
{
"hypervisor_hostname": "fake-mini",
"id": 1,
"state": "up",
"status": "enabled"
}
]
}

View File

@ -1,13 +1,16 @@
{
"hypervisor": {
"cpu_info": "?",
"cpu_info": "{\"arch\": \"x86_64\", \"model\": \"Nehalem\", \"vendor\": \"Intel\", \"features\": [\"pge\", \"clflush\"], \"topology\": {\"cores\": 1, \"threads\": 1, \"sockets\": 4}}",
"state": "up",
"status": "enabled",
"current_workload": 0,
"disk_available_least": 0,
"host_ip": "1.1.1.1",
"free_disk_gb": 1028,
"free_ram_mb": 7680,
"hypervisor_hostname": "fake-mini",
"hypervisor_type": "fake",
"hypervisor_version": 1,
"hypervisor_version": 1000,
"id": 1,
"local_gb": 1028,
"local_gb_used": 0,
@ -16,7 +19,8 @@
"running_vms": 0,
"service": {
"host": "043b3cacf6f34c90a7245151fc8ebcda",
"id": 2
"id": 2,
"disabled_reason": null
},
"vcpus": 1,
"vcpus_used": 0

View File

@ -2,6 +2,8 @@
"hypervisor": {
"hypervisor_hostname": "fake-mini",
"id": 1,
"state": "up",
"status": "enabled",
"uptime": " 08:32:11 up 93 days, 18:25, 12 users, load average: 0.20, 0.12, 0.14"
}
}

View File

@ -14,19 +14,6 @@
<resource id="statistics" path="statistics">
<method href="#showhypervisorstatistics"/>
</resource>
<resource id="search" path="search">
<param name="query" style="query"
type="xsd:string">
<wadl:doc
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN"><para>Filters the search
results by the specified
<code>?query={filter}</code> query
parameter.</para>
</wadl:doc>
</param>
<method href="#searchhypervisors"/>
</resource>
<resource id="hypervisor_id" path="{hypervisor_id}">
<method href="#showhypervisordetails"/>
<resource id="uptime" path="uptime">
@ -59,47 +46,19 @@
</representation>
</response>
</method>
<method name="GET" id="searchhypervisors">
<wadl:doc xml:lang="EN" title="Search hypervisors"
xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Searches hypervisors by specified
host name.</para>
</wadl:doc>
<request> </request>
<response status="200">
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../api_samples/os-hypervisors/hypervisors-search-resp.json"
/>
</wadl:doc> &x-openstack-request-idHeader;
</representation>
</response>
</method>
<method name="GET" id="listservers">
<wadl:doc xml:lang="EN" title="List servers for a hypervisor"
xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Lists servers that run on a
specified hypervisor.</para>
</wadl:doc>
<request>
<response status="200">
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../api_samples/os-hypervisors/hypervisors-servers-resp.json"
/>
</wadl:doc>
</representation>
</request>
<response status="200">
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../api_samples/os-hypervisors/hypervisors-list-resp.json"
/>
</wadl:doc> &x-openstack-request-idHeader;
</representation>
</response>