From 48b41e0b880adf80e3be6d128cd392af57b8477e Mon Sep 17 00:00:00 2001 From: Andrea Rosa Date: Wed, 20 Feb 2013 11:52:10 +0000 Subject: Fix typo in the XML serialization os-services API. Partially implements blueprint nova-api-samples fixes bug 1130609 The XML serializer for the update method in the os-services API extensions was not serializing the "updated_at" field because of a typo in the code. In this change we added api_samples for the XML output. Change-Id: I9fff0677e9bad650b19e559b3ed6e9bc0ffe8c3c --- .../api_samples/os-services/service-disable-put-req.xml.tpl | 2 ++ .../api_samples/os-services/service-disable-put-resp.xml.tpl | 2 ++ .../api_samples/os-services/service-enable-put-req.xml.tpl | 2 ++ .../api_samples/os-services/service-enable-put-resp.xml.tpl | 2 ++ .../api_samples/os-services/services-list-get-resp.xml.tpl | 6 ++++++ nova/tests/integrated/test_api_samples.py | 4 ++++ 6 files changed, 18 insertions(+) create mode 100644 nova/tests/integrated/api_samples/os-services/service-disable-put-req.xml.tpl create mode 100644 nova/tests/integrated/api_samples/os-services/service-disable-put-resp.xml.tpl create mode 100644 nova/tests/integrated/api_samples/os-services/service-enable-put-req.xml.tpl create mode 100644 nova/tests/integrated/api_samples/os-services/service-enable-put-resp.xml.tpl create mode 100644 nova/tests/integrated/api_samples/os-services/services-list-get-resp.xml.tpl (limited to 'nova/tests') 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 @@ + + 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 @@ + + 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 @@ + + 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 @@ + + 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 @@ + + + + + + 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") -- cgit