From dc29ab91e434335f4468427475baea23d2c68b7b Mon Sep 17 00:00:00 2001 From: "Mauro S. M. Rodrigues" Date: Thu, 7 Mar 2013 13:25:09 -0500 Subject: Add MultipleCreate template and fix conflict with other templates This patch creates a dedicated xml template to the os-multiple-create extension when using return_reservation_id=True in the request. The previous code, with all extensions loaded, conflicted with security_groups extension. There is also a change in the response due to the new Template, but the only information removed is an empty metadata field (which made the previous xml output even more inconsisten with json). The consistency between json and xml will be treated in the next api version. DocImpact Fixes bug 1149526 Change-Id: I3ca0129086ff1df3a8faa2b3b8bd959c9b74103c --- nova/tests/api/openstack/compute/test_servers.py | 2 +- .../api_samples/os-multiple-create/multiple-create-post-resp.xml.tpl | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/api/openstack/compute/test_servers.py b/nova/tests/api/openstack/compute/test_servers.py index 638ef79b0..e1c88b6f8 100644 --- a/nova/tests/api/openstack/compute/test_servers.py +++ b/nova/tests/api/openstack/compute/test_servers.py @@ -1988,7 +1988,7 @@ class ServersControllerCreateTest(test.TestCase): req.headers["content-type"] = "application/json" res = self.controller.create(req, body) - reservation_id = res.get('reservation_id') + reservation_id = res.obj.get('reservation_id') self.assertNotEqual(reservation_id, "") self.assertNotEqual(reservation_id, None) self.assertTrue(len(reservation_id) > 1) diff --git a/nova/tests/integrated/api_samples/os-multiple-create/multiple-create-post-resp.xml.tpl b/nova/tests/integrated/api_samples/os-multiple-create/multiple-create-post-resp.xml.tpl index a361612b2..e5ba2cc56 100644 --- a/nova/tests/integrated/api_samples/os-multiple-create/multiple-create-post-resp.xml.tpl +++ b/nova/tests/integrated/api_samples/os-multiple-create/multiple-create-post-resp.xml.tpl @@ -1,4 +1,2 @@ - - - + -- cgit