diff options
author | Giampaolo Lauria <lauria@us.ibm.com> | 2013-02-15 09:27:27 -0500 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-02-20 14:55:37 +0000 |
commit | 605bf01cf3f06959f1ca652dc27ba2ae42b515bd (patch) | |
tree | 9c5eb1688b06fe6ad5553bc94668c8f527e92464 /doc | |
parent | 96a4518575ea550d8e997444bfc243b7a822ec11 (diff) | |
download | nova-605bf01cf3f06959f1ca652dc27ba2ae42b515bd.tar.gz nova-605bf01cf3f06959f1ca652dc27ba2ae42b515bd.tar.xz nova-605bf01cf3f06959f1ca652dc27ba2ae42b515bd.zip |
Add API Sample tests for Hypervisors extension.
Partially implements blueprint nova-api-samples
Fixes bug 1091750
Change-Id: Ie8e6881ea3533cd43259548594d3debe377345a5
Diffstat (limited to 'doc')
14 files changed, 125 insertions, 0 deletions
diff --git a/doc/api_samples/os-hypervisors/hypervisors-detail-resp.json b/doc/api_samples/os-hypervisors/hypervisors-detail-resp.json new file mode 100644 index 000000000..b124901ea --- /dev/null +++ b/doc/api_samples/os-hypervisors/hypervisors-detail-resp.json @@ -0,0 +1,26 @@ +{ + "hypervisors": [ + { + "cpu_info": "?", + "current_workload": 0, + "disk_available_least": null, + "free_disk_gb": 1028, + "free_ram_mb": 7680, + "hypervisor_hostname": "fake-mini", + "hypervisor_type": "fake", + "hypervisor_version": 1, + "id": 1, + "local_gb": 1028, + "local_gb_used": 0, + "memory_mb": 8192, + "memory_mb_used": 512, + "running_vms": 0, + "service": { + "host": "1e0d7892083548cfb347e782d3b20342", + "id": 2 + }, + "vcpus": 1, + "vcpus_used": 0 + } + ] +}
\ No newline at end of file diff --git a/doc/api_samples/os-hypervisors/hypervisors-detail-resp.xml b/doc/api_samples/os-hypervisors/hypervisors-detail-resp.xml new file mode 100644 index 000000000..709f4fcd6 --- /dev/null +++ b/doc/api_samples/os-hypervisors/hypervisors-detail-resp.xml @@ -0,0 +1,6 @@ +<?xml version='1.0' encoding='UTF-8'?> +<hypervisors> + <hypervisor vcpus_used="0" hypervisor_type="fake" local_gb_used="0" hypervisor_hostname="fake-mini" memory_mb_used="512" memory_mb="8192" current_workload="0" vcpus="1" cpu_info="?" running_vms="0" free_disk_gb="1028" hypervisor_version="1" disk_available_least="None" local_gb="1028" free_ram_mb="7680" id="1"> + <service host="4400f556a66d44ce95dfa61e75a23aaf" id="2"/> + </hypervisor> +</hypervisors>
\ No newline at end of file diff --git a/doc/api_samples/os-hypervisors/hypervisors-list-resp.json b/doc/api_samples/os-hypervisors/hypervisors-list-resp.json new file mode 100644 index 000000000..8d9402127 --- /dev/null +++ b/doc/api_samples/os-hypervisors/hypervisors-list-resp.json @@ -0,0 +1,8 @@ +{ + "hypervisors": [ + { + "hypervisor_hostname": "fake-mini", + "id": 1 + } + ] +}
\ No newline at end of file diff --git a/doc/api_samples/os-hypervisors/hypervisors-list-resp.xml b/doc/api_samples/os-hypervisors/hypervisors-list-resp.xml new file mode 100644 index 000000000..8a784c592 --- /dev/null +++ b/doc/api_samples/os-hypervisors/hypervisors-list-resp.xml @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<hypervisors> + <hypervisor id="1" hypervisor_hostname="fake-mini"/> +</hypervisors>
\ No newline at end of file diff --git a/doc/api_samples/os-hypervisors/hypervisors-search-resp.json b/doc/api_samples/os-hypervisors/hypervisors-search-resp.json new file mode 100644 index 000000000..8d9402127 --- /dev/null +++ b/doc/api_samples/os-hypervisors/hypervisors-search-resp.json @@ -0,0 +1,8 @@ +{ + "hypervisors": [ + { + "hypervisor_hostname": "fake-mini", + "id": 1 + } + ] +}
\ No newline at end of file diff --git a/doc/api_samples/os-hypervisors/hypervisors-search-resp.xml b/doc/api_samples/os-hypervisors/hypervisors-search-resp.xml new file mode 100644 index 000000000..8a784c592 --- /dev/null +++ b/doc/api_samples/os-hypervisors/hypervisors-search-resp.xml @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<hypervisors> + <hypervisor id="1" hypervisor_hostname="fake-mini"/> +</hypervisors>
\ No newline at end of file diff --git a/doc/api_samples/os-hypervisors/hypervisors-servers-resp.json b/doc/api_samples/os-hypervisors/hypervisors-servers-resp.json new file mode 100644 index 000000000..8d9402127 --- /dev/null +++ b/doc/api_samples/os-hypervisors/hypervisors-servers-resp.json @@ -0,0 +1,8 @@ +{ + "hypervisors": [ + { + "hypervisor_hostname": "fake-mini", + "id": 1 + } + ] +}
\ No newline at end of file diff --git a/doc/api_samples/os-hypervisors/hypervisors-servers-resp.xml b/doc/api_samples/os-hypervisors/hypervisors-servers-resp.xml new file mode 100644 index 000000000..950a5ab11 --- /dev/null +++ b/doc/api_samples/os-hypervisors/hypervisors-servers-resp.xml @@ -0,0 +1,6 @@ +<?xml version='1.0' encoding='UTF-8'?> +<hypervisors> + <hypervisor id="1" hypervisor_hostname="fake-mini"> + <servers/> + </hypervisor> +</hypervisors>
\ No newline at end of file diff --git a/doc/api_samples/os-hypervisors/hypervisors-show-resp.json b/doc/api_samples/os-hypervisors/hypervisors-show-resp.json new file mode 100644 index 000000000..c0feecd02 --- /dev/null +++ b/doc/api_samples/os-hypervisors/hypervisors-show-resp.json @@ -0,0 +1,24 @@ +{ + "hypervisor": { + "cpu_info": "?", + "current_workload": 0, + "disk_available_least": null, + "free_disk_gb": 1028, + "free_ram_mb": 7680, + "hypervisor_hostname": "fake-mini", + "hypervisor_type": "fake", + "hypervisor_version": 1, + "id": 1, + "local_gb": 1028, + "local_gb_used": 0, + "memory_mb": 8192, + "memory_mb_used": 512, + "running_vms": 0, + "service": { + "host": "5641188ab2964f88a21042b493585ff8", + "id": 2 + }, + "vcpus": 1, + "vcpus_used": 0 + } +}
\ No newline at end of file diff --git a/doc/api_samples/os-hypervisors/hypervisors-show-resp.xml b/doc/api_samples/os-hypervisors/hypervisors-show-resp.xml new file mode 100644 index 000000000..04feef067 --- /dev/null +++ b/doc/api_samples/os-hypervisors/hypervisors-show-resp.xml @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<hypervisor vcpus_used="0" hypervisor_type="fake" local_gb_used="0" hypervisor_hostname="fake-mini" memory_mb_used="512" memory_mb="8192" current_workload="0" vcpus="1" cpu_info="?" running_vms="0" free_disk_gb="1028" hypervisor_version="1" disk_available_least="None" local_gb="1028" free_ram_mb="7680" id="1"> + <service host="807e1a43ceb740138eea32969c3e9fe5" id="2"/> +</hypervisor>
\ No newline at end of file diff --git a/doc/api_samples/os-hypervisors/hypervisors-statistics-resp.json b/doc/api_samples/os-hypervisors/hypervisors-statistics-resp.json new file mode 100644 index 000000000..2cfb51e70 --- /dev/null +++ b/doc/api_samples/os-hypervisors/hypervisors-statistics-resp.json @@ -0,0 +1,16 @@ +{ + "hypervisor_statistics": { + "count": 1, + "current_workload": 0, + "disk_available_least": 0, + "free_disk_gb": 1028, + "free_ram_mb": 7680, + "local_gb": 1028, + "local_gb_used": 0, + "memory_mb": 8192, + "memory_mb_used": 512, + "running_vms": 0, + "vcpus": 1, + "vcpus_used": 0 + } +}
\ No newline at end of file diff --git a/doc/api_samples/os-hypervisors/hypervisors-statistics-resp.xml b/doc/api_samples/os-hypervisors/hypervisors-statistics-resp.xml new file mode 100644 index 000000000..5d10411e3 --- /dev/null +++ b/doc/api_samples/os-hypervisors/hypervisors-statistics-resp.xml @@ -0,0 +1,2 @@ +<?xml version='1.0' encoding='UTF-8'?> +<hypervisor_statistics count="1" vcpus_used="0" local_gb_used="0" memory_mb="8192" current_workload="0" vcpus="1" running_vms="0" free_disk_gb="1028" disk_available_least="0" local_gb="1028" free_ram_mb="7680" memory_mb_used="512"/>
\ No newline at end of file diff --git a/doc/api_samples/os-hypervisors/hypervisors-uptime-resp.json b/doc/api_samples/os-hypervisors/hypervisors-uptime-resp.json new file mode 100644 index 000000000..f5f9d19e7 --- /dev/null +++ b/doc/api_samples/os-hypervisors/hypervisors-uptime-resp.json @@ -0,0 +1,7 @@ +{ + "hypervisor": { + "hypervisor_hostname": "fake-mini", + "id": 1, + "uptime": " 08:32:11 up 93 days, 18:25, 12 users, load average: 0.20, 0.12, 0.14" + } +}
\ No newline at end of file diff --git a/doc/api_samples/os-hypervisors/hypervisors-uptime-resp.xml b/doc/api_samples/os-hypervisors/hypervisors-uptime-resp.xml new file mode 100644 index 000000000..5c1b2cd7d --- /dev/null +++ b/doc/api_samples/os-hypervisors/hypervisors-uptime-resp.xml @@ -0,0 +1,2 @@ +<?xml version='1.0' encoding='UTF-8'?> +<hypervisor uptime=" 08:32:11 up 93 days, 18:25, 12 users, load average: 0.20, 0.12, 0.14" id="1" hypervisor_hostname="fake-mini"/>
\ No newline at end of file |