From 3b8fdf4eaaa3262147a61fa1f2e6debb22ed0cf1 Mon Sep 17 00:00:00 2001 From: Kevin Benton Date: Tue, 15 Sep 2015 10:13:38 -0700 Subject: [PATCH] Add missing resource discriminator in update resp The update method of the pecan itemcontroller was not returning the response encapsulated correctly in a dictionary with the resource type identifier. This was discovered via the standard API tests. Change-Id: Ie2217972c75b14a0867477f26f434055b33a9ae6 --- neutron/pecan_wsgi/controllers/root.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neutron/pecan_wsgi/controllers/root.py b/neutron/pecan_wsgi/controllers/root.py index 396778bac..420fdf5a7 100644 --- a/neutron/pecan_wsgi/controllers/root.py +++ b/neutron/pecan_wsgi/controllers/root.py @@ -165,7 +165,8 @@ class ItemController(object): request.prepared_data) # TODO(kevinbenton): bulk? updater = getattr(request.plugin, 'update_%s' % request.resource_type) - return updater(request.context, self.item, request.prepared_data) + return {request.resource_type: updater( + request.context, self.item, request.prepared_data)} @when(index, method='DELETE') def delete(self): -- 2.45.2