-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add API Sample tests for Hypervisors extension.
Partially implements blueprint nova-api-samples Fixes bug 1091750 Change-Id: Ie8e6881ea3533cd43259548594d3debe377345a5
- Loading branch information
1 parent
96a4518
commit 605bf01
Showing
29 changed files
with
310 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
doc/api_samples/os-hypervisors/hypervisors-detail-resp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"hypervisors": [ | ||
{ | ||
"hypervisor_hostname": "fake-mini", | ||
"id": 1 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<hypervisors> | ||
<hypervisor id="1" hypervisor_hostname="fake-mini"/> | ||
</hypervisors> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"hypervisors": [ | ||
{ | ||
"hypervisor_hostname": "fake-mini", | ||
"id": 1 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<hypervisors> | ||
<hypervisor id="1" hypervisor_hostname="fake-mini"/> | ||
</hypervisors> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"hypervisors": [ | ||
{ | ||
"hypervisor_hostname": "fake-mini", | ||
"id": 1 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<hypervisors> | ||
<hypervisor id="1" hypervisor_hostname="fake-mini"> | ||
<servers/> | ||
</hypervisor> | ||
</hypervisors> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
16 changes: 16 additions & 0 deletions
16
doc/api_samples/os-hypervisors/hypervisors-statistics-resp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
doc/api_samples/os-hypervisors/hypervisors-statistics-resp.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"/> |
26 changes: 26 additions & 0 deletions
26
nova/tests/integrated/api_samples/os-hypervisors/hypervisors-detail-resp.json.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": "%(host_name)s", | ||
"id": 2 | ||
}, | ||
"vcpus": 1, | ||
"vcpus_used": 0 | ||
} | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
nova/tests/integrated/api_samples/os-hypervisors/hypervisors-detail-resp.xml.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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="%(host_name)s" id="2"/> | ||
</hypervisor> | ||
</hypervisors> |
8 changes: 8 additions & 0 deletions
8
nova/tests/integrated/api_samples/os-hypervisors/hypervisors-list-resp.json.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"hypervisors": [ | ||
{ | ||
"hypervisor_hostname": "fake-mini", | ||
"id": 1 | ||
} | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
nova/tests/integrated/api_samples/os-hypervisors/hypervisors-list-resp.xml.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<hypervisors> | ||
<hypervisor id="1" hypervisor_hostname="fake-mini"/> | ||
</hypervisors> |
8 changes: 8 additions & 0 deletions
8
nova/tests/integrated/api_samples/os-hypervisors/hypervisors-search-resp.json.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"hypervisors": [ | ||
{ | ||
"hypervisor_hostname": "fake-mini", | ||
"id": 1 | ||
} | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
nova/tests/integrated/api_samples/os-hypervisors/hypervisors-search-resp.xml.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<hypervisors> | ||
<hypervisor id="1" hypervisor_hostname="fake-mini"/> | ||
</hypervisors> |
8 changes: 8 additions & 0 deletions
8
nova/tests/integrated/api_samples/os-hypervisors/hypervisors-servers-resp.json.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"hypervisors": [ | ||
{ | ||
"hypervisor_hostname": "fake-mini", | ||
"id": 1 | ||
} | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
nova/tests/integrated/api_samples/os-hypervisors/hypervisors-servers-resp.xml.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<hypervisors> | ||
<hypervisor id="1" hypervisor_hostname="fake-mini"> | ||
<servers/> | ||
</hypervisor> | ||
</hypervisors> |
24 changes: 24 additions & 0 deletions
24
nova/tests/integrated/api_samples/os-hypervisors/hypervisors-show-resp.json.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": %(hypervisor_id)s, | ||
"local_gb": 1028, | ||
"local_gb_used": 0, | ||
"memory_mb": 8192, | ||
"memory_mb_used": 512, | ||
"running_vms": 0, | ||
"service": { | ||
"host": "%(host_name)s", | ||
"id": 2 | ||
}, | ||
"vcpus": 1, | ||
"vcpus_used": 0 | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
nova/tests/integrated/api_samples/os-hypervisors/hypervisors-show-resp.xml.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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="%(hypervisor_id)s"> | ||
<service host="%(host_name)s" id="2"/> | ||
</hypervisor> |
16 changes: 16 additions & 0 deletions
16
nova/tests/integrated/api_samples/os-hypervisors/hypervisors-statistics-resp.json.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
nova/tests/integrated/api_samples/os-hypervisors/hypervisors-statistics-resp.xml.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"/> |
7 changes: 7 additions & 0 deletions
7
nova/tests/integrated/api_samples/os-hypervisors/hypervisors-uptime-resp.json.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"hypervisor": { | ||
"hypervisor_hostname": "fake-mini", | ||
"id": %(hypervisor_id)s, | ||
"uptime": " 08:32:11 up 93 days, 18:25, 12 users, load average: 0.20, 0.12, 0.14" | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
nova/tests/integrated/api_samples/os-hypervisors/hypervisors-uptime-resp.xml.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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="%(hypervisor_id)s" hypervisor_hostname="fake-mini"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters