fuel-web/nailgun/nailgun/objects
Dmitry Sutyagin 03aaca2dee Add limit, offset, order in collection GET
Allow limiting the number of objects returned via GET
by providing "limit"
Example: api/notifications?limit=5

Allow offseting (skipping N first records) via "offset"
Example: api/notifications?offset=100

Allow ordering of objects by providing "order_by"
Example: api/notifications?order_by=-id

Add helper functions/classes to:
- get HTTP parameters (limit, offset, order_by)
- get scoped collection query by applying 4 operations
  filter, order, offset, limit
- set Conent-Range header if scope limits are present

Make default NailgunCollection's GET utilize scoped query
This makes default (parent) GET of child handlers support paging
and ordering (overriden GET methods will not get this functionality
automatically)
NailgunCollection.GET is also an example of how to implement
this new functionality.

Helper functions/classes can be utilized in child handler methods
to implement filters / ordering / paging

Related-Bug: 1657348
Change-Id: I7760465f70b3f69791e7a0c558a26e8ba55c934a
2017-02-14 08:11:23 +00:00
..
serializers Introduce new validation rules for tags and roles 2016-11-30 19:56:52 +00:00
__init__.py Support for plugin NIC attributes 2016-11-29 10:37:57 +02:00
action_log.py Changed JSON fields on mutable objects in ActionLog object 2015-12-25 08:17:14 +00:00
base.py Add limit, offset, order in collection GET 2017-02-14 08:11:23 +00:00
capacity.py Rewriting remaining handlers to objects 2014-08-06 15:47:04 +04:00
cluster.py Fix DPDK settings get for upgrades 2016-12-26 15:55:13 +00:00
cluster_plugin_link.py Cleanup plugin links upon a cluster reset 2016-07-01 15:39:13 +03:00
deployment_graph.py Plugins v 5.0.0 support in plugins adapters 2016-08-25 04:57:44 +03:00
deployment_history.py Fix deployment history summary 2016-09-05 21:02:43 +03:00
deployment_sequence.py Filter sequences output by release or cluster 2016-09-08 15:02:48 +03:00
master_node_settings.py Add exceptions hierarchy 2016-04-14 17:41:25 +03:00
node.py Revert "Limit the minimal RAM amount for OVS+DPDK to 1024MB" 2017-01-19 12:54:31 +04:00
node_deployment_info.py add node_deployment_info table 2016-07-08 14:08:06 +03:00
node_group.py Move UpdateDnsmasq task to network manager extension 2016-06-06 15:05:56 -07:00
notification.py Handler for changing notifications statuses added 2017-02-07 16:39:05 +00:00
openstack_config.py Fix error in openstack config recognition 2016-04-22 15:19:23 +02:00
oswl.py Fix hacking 0.10 errors in nailgun 2015-10-08 12:01:55 +02:00
plugin.py Tags info calculation is supported on plugins update 2017-01-11 16:40:58 +03:00
plugin_link.py Add functionality from NetworkManager to objects 2016-02-22 08:50:30 -08:00
release.py Introduce new validation rules for tags and roles 2016-11-30 19:56:52 +00:00
task.py Fixed dead-locks and race conditions in tasks execution 2016-09-05 17:46:36 +03:00
transaction.py Track timestamps for start and end of transactions 2016-09-05 13:13:53 +03:00