]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Add missing resource discriminator in update resp
authorKevin Benton <blak111@gmail.com>
Tue, 15 Sep 2015 17:13:38 +0000 (10:13 -0700)
committerKevin Benton <blak111@gmail.com>
Tue, 15 Sep 2015 18:21:49 +0000 (11:21 -0700)
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

index 396778bac880923cee39fac91b11724b6130348d..420fdf5a79b8b2ef6c3bdc26821233705a11ce6a 100644 (file)
@@ -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):