Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix os-hosts extension can't return xml response correctly.
Also add os-hosts integrated testing template files. fix bug 1075575 fix bug 1070167. DocImpact Change-Id: I6b9f9e58e7cbe10a931d2c83d9baf9dcee74de08
- Loading branch information
1 parent
6c5bbd0
commit a7e5180
Showing
11 changed files
with
199 additions
and
11 deletions.
There are no files selected for viewing
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,31 @@ | ||
{ | ||
"host": [ | ||
{ | ||
"resource": { | ||
"cpu": 1, | ||
"disk_gb": 1028, | ||
"host": "5ca60c6792a1442f9471ff575443f94d", | ||
"memory_mb": 8192, | ||
"project": "(total)" | ||
} | ||
}, | ||
{ | ||
"resource": { | ||
"cpu": 0, | ||
"disk_gb": 0, | ||
"host": "5ca60c6792a1442f9471ff575443f94d", | ||
"memory_mb": 512, | ||
"project": "(used_now)" | ||
} | ||
}, | ||
{ | ||
"resource": { | ||
"cpu": 0, | ||
"disk_gb": 0, | ||
"host": "5ca60c6792a1442f9471ff575443f94d", | ||
"memory_mb": 0, | ||
"project": "(used_max)" | ||
} | ||
} | ||
] | ||
} |
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 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<host> | ||
<resource> | ||
<project>(total)</project> | ||
<memory_mb>8192</memory_mb> | ||
<host>ecf3458ac6bf4a299cc2e0efa740f426</host> | ||
<cpu>1</cpu> | ||
<disk_gb>1028</disk_gb> | ||
</resource> | ||
<resource> | ||
<project>(used_now)</project> | ||
<memory_mb>512</memory_mb> | ||
<host>ecf3458ac6bf4a299cc2e0efa740f426</host> | ||
<cpu>0</cpu> | ||
<disk_gb>0</disk_gb> | ||
</resource> | ||
<resource> | ||
<project>(used_max)</project> | ||
<memory_mb>0</memory_mb> | ||
<host>ecf3458ac6bf4a299cc2e0efa740f426</host> | ||
<cpu>0</cpu> | ||
<disk_gb>0</disk_gb> | ||
</resource> | ||
</host> |
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 @@ | ||
{ | ||
"hosts": [ | ||
{ | ||
"host_name": "c5a4acad61bc463ab5f60d164d942516", | ||
"service": "compute", | ||
"zone": "nova" | ||
}, | ||
{ | ||
"host_name": "9112426abe5f4934a81b494fcdee8c5b", | ||
"service": "cert", | ||
"zone": "nova" | ||
}, | ||
{ | ||
"host_name": "d483b9e6124d47f2a6ad14e57716a778", | ||
"service": "network", | ||
"zone": "nova" | ||
}, | ||
{ | ||
"host_name": "3f9c73ba6d634092a70d6640f53930c8", | ||
"service": "scheduler", | ||
"zone": "nova" | ||
} | ||
] | ||
} |
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 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<hosts> | ||
<host host_name="e5e145b49d244d97982c922e101859fd" service="compute"/> | ||
<host host_name="6d85457c4d884047b41999540c2bf454" service="cert"/> | ||
<host host_name="1f9a3cef66bd450aa004655ef239ddee" service="network"/> | ||
<host host_name="c6fd14f8e3be44628e76ae4a6e88cffb" service="scheduler"/> | ||
</hosts> |
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
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
31 changes: 31 additions & 0 deletions
31
nova/tests/integrated/api_samples/os-hosts/host-get-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,31 @@ | ||
{ | ||
"host": [ | ||
{ | ||
"resource": { | ||
"cpu": 1, | ||
"disk_gb": 1028, | ||
"host": "%(host_name)s", | ||
"memory_mb": 8192, | ||
"project": "(total)" | ||
} | ||
}, | ||
{ | ||
"resource": { | ||
"cpu": 0, | ||
"disk_gb": 0, | ||
"host": "%(host_name)s", | ||
"memory_mb": 512, | ||
"project": "(used_now)" | ||
} | ||
}, | ||
{ | ||
"resource": { | ||
"cpu": 0, | ||
"disk_gb": 0, | ||
"host": "%(host_name)s", | ||
"memory_mb": 0, | ||
"project": "(used_max)" | ||
} | ||
} | ||
] | ||
} |
24 changes: 24 additions & 0 deletions
24
nova/tests/integrated/api_samples/os-hosts/host-get-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,24 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<host> | ||
<resource> | ||
<project>(total)</project> | ||
<memory_mb>8192</memory_mb> | ||
<host>%(host_name)s</host> | ||
<cpu>1</cpu> | ||
<disk_gb>1028</disk_gb> | ||
</resource> | ||
<resource> | ||
<project>(used_now)</project> | ||
<memory_mb>512</memory_mb> | ||
<host>%(host_name)s</host> | ||
<cpu>0</cpu> | ||
<disk_gb>0</disk_gb> | ||
</resource> | ||
<resource> | ||
<project>(used_max)</project> | ||
<memory_mb>0</memory_mb> | ||
<host>%(host_name)s</host> | ||
<cpu>0</cpu> | ||
<disk_gb>0</disk_gb> | ||
</resource> | ||
</host> |
24 changes: 24 additions & 0 deletions
24
nova/tests/integrated/api_samples/os-hosts/hosts-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,24 @@ | ||
{ | ||
"hosts": [ | ||
{ | ||
"host_name": "%(host_name)s", | ||
"service": "compute", | ||
"zone": "nova" | ||
}, | ||
{ | ||
"host_name": "%(host_name)s", | ||
"service": "cert", | ||
"zone": "nova" | ||
}, | ||
{ | ||
"host_name": "%(host_name)s", | ||
"service": "network", | ||
"zone": "nova" | ||
}, | ||
{ | ||
"host_name": "%(host_name)s", | ||
"service": "scheduler", | ||
"zone": "nova" | ||
} | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
nova/tests/integrated/api_samples/os-hosts/hosts-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,7 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<hosts> | ||
<host host_name="%(host_name)s" service="compute"/> | ||
<host host_name="%(host_name)s" service="cert"/> | ||
<host host_name="%(host_name)s" service="network"/> | ||
<host host_name="%(host_name)s" service="scheduler"/> | ||
</hosts> |
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