]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Clarify and add a TODO in the controller
authorKevin Benton <blak111@gmail.com>
Tue, 15 Sep 2015 17:04:09 +0000 (10:04 -0700)
committerKevin Benton <blak111@gmail.com>
Tue, 15 Sep 2015 18:20:28 +0000 (11:20 -0700)
This clarifies and adds a TODO regarding the filters and fields
API parameters.

Change-Id: I01cfd45b99dcfca4e320900caebdc68f6562ddd8

neutron/pecan_wsgi/controllers/root.py

index 396778bac880923cee39fac91b11724b6130348d..41a249932c1f48cf08affe301f2cfc6d0aa3bfb1 100644 (file)
@@ -128,10 +128,12 @@ class CollectionsController(object):
 
     def get(self, *args, **kwargs):
         # list request
-        # TODO(kevinbenton): allow fields after policy enforced fields present
+        # TODO(kevinbenton): use user-provided fields in call to plugin
+        # after making sure policy enforced fields remain
         kwargs.pop('fields', None)
         _listify = lambda x: x if isinstance(x, list) else [x]
         filters = {k: _listify(v) for k, v in kwargs.items()}
+        # TODO(kevinbenton): convert these using api_common.get_filters
         lister = getattr(request.plugin, 'get_%s' % self.collection)
         return {self.collection: lister(request.context, filters=filters)}