summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-03-28 16:44:20 +0000
committerGerrit Code Review <review@openstack.org>2013-03-28 16:44:20 +0000
commitec9494d0d47494f195c292619529fe2dd00697bb (patch)
tree79196bcd644977f10832c3853e4420342a75abbf /nova/tests
parent7f4589ea7886559918b1c7e0a38384f3d710fca3 (diff)
parent48b41e0b880adf80e3be6d128cd392af57b8477e (diff)
Merge "Fix typo in the XML serialization os-services API."
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/integrated/api_samples/os-services/service-disable-put-req.xml.tpl2
-rw-r--r--nova/tests/integrated/api_samples/os-services/service-disable-put-resp.xml.tpl2
-rw-r--r--nova/tests/integrated/api_samples/os-services/service-enable-put-req.xml.tpl2
-rw-r--r--nova/tests/integrated/api_samples/os-services/service-enable-put-resp.xml.tpl2
-rw-r--r--nova/tests/integrated/api_samples/os-services/services-list-get-resp.xml.tpl6
-rw-r--r--nova/tests/integrated/test_api_samples.py4
6 files changed, 18 insertions, 0 deletions
diff --git a/nova/tests/integrated/api_samples/os-services/service-disable-put-req.xml.tpl b/nova/tests/integrated/api_samples/os-services/service-disable-put-req.xml.tpl
new file mode 100644
index 000000000..fc297bcd3
--- /dev/null
+++ b/nova/tests/integrated/api_samples/os-services/service-disable-put-req.xml.tpl
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<service host="%(host)s" binary="%(binary)s" />
diff --git a/nova/tests/integrated/api_samples/os-services/service-disable-put-resp.xml.tpl b/nova/tests/integrated/api_samples/os-services/service-disable-put-resp.xml.tpl
new file mode 100644
index 000000000..cc03298c5
--- /dev/null
+++ b/nova/tests/integrated/api_samples/os-services/service-disable-put-resp.xml.tpl
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<service host="%(host)s" binary="%(binary)s" status="disabled" />
diff --git a/nova/tests/integrated/api_samples/os-services/service-enable-put-req.xml.tpl b/nova/tests/integrated/api_samples/os-services/service-enable-put-req.xml.tpl
new file mode 100644
index 000000000..fc297bcd3
--- /dev/null
+++ b/nova/tests/integrated/api_samples/os-services/service-enable-put-req.xml.tpl
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<service host="%(host)s" binary="%(binary)s" />
diff --git a/nova/tests/integrated/api_samples/os-services/service-enable-put-resp.xml.tpl b/nova/tests/integrated/api_samples/os-services/service-enable-put-resp.xml.tpl
new file mode 100644
index 000000000..3cbf51b77
--- /dev/null
+++ b/nova/tests/integrated/api_samples/os-services/service-enable-put-resp.xml.tpl
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<service host="%(host)s" binary="%(binary)s" status="enabled" />
diff --git a/nova/tests/integrated/api_samples/os-services/services-list-get-resp.xml.tpl b/nova/tests/integrated/api_samples/os-services/services-list-get-resp.xml.tpl
new file mode 100644
index 000000000..e708aa78d
--- /dev/null
+++ b/nova/tests/integrated/api_samples/os-services/services-list-get-resp.xml.tpl
@@ -0,0 +1,6 @@
+<services>
+ <service status="disabled" binary="nova-scheduler" zone="internal" state="up" host="host1" updated_at="%(timestamp)s"/>
+ <service status="disabled" binary="nova-compute" zone="nova" state="up" host="host1" updated_at="%(timestamp)s" />
+ <service status="enabled" binary="nova-scheduler" zone="internal" state="down" host="host2" updated_at="%(timestamp)s"/>
+ <service status="disabled" binary="nova-compute" zone="nova" state="down" host="host2" updated_at="%(timestamp)s"/>
+</services>
diff --git a/nova/tests/integrated/test_api_samples.py b/nova/tests/integrated/test_api_samples.py
index 8e816766d..0f893d551 100644
--- a/nova/tests/integrated/test_api_samples.py
+++ b/nova/tests/integrated/test_api_samples.py
@@ -2012,6 +2012,10 @@ class ServicesJsonTest(ApiSampleTestBase):
subs, response)
+class ServicesXmlTest(ServicesJsonTest):
+ ctype = 'xml'
+
+
class SimpleTenantUsageSampleJsonTest(ServersSampleBase):
extension_name = ("nova.api.openstack.compute.contrib.simple_tenant_usage."
"Simple_tenant_usage")