aboutsummaryrefslogtreecommitdiff
path: root/app/handlers/boot.py
AgeCommit message (Collapse)Author
2014-11-20Add boot POST token validation.Milo Casagrande
* We validate the token to make sure it is valid. But we also need to make sure the token used can send boot reports for the provided lab. * Add some tests to cover this case. Change-Id: I5a09d8845f08cac63a43f10b533aa5804b643486
2014-11-18boot: Fix boot handler for new mongodb object ID.Milo Casagrande
Change-Id: I49822be826a3d59ab2d69560c95c4d66308ada6a
2014-11-07boot: Refactor boot handler.Milo Casagrande
* Use new validation logic as provided by base handler. * Add new common fields. Change-Id: I0f7eadf0b86acb6ea7b7493547e79f6f073e98b3
2014-10-22boot: Use db parameters in boot import.Milo Casagrande
Change-Id: Id0707b7f916d7d08fadcfde48c63be5a9311b467
2014-10-21handlers: Refactor token validation logic.Milo Casagrande
* Add master_key validation where it belongs, only in the token handler. * Rework validation methods. * Add tests. Change-Id: Ib457963bc2ae2018e8241297f75b8667dac0e572
2014-10-20boot: Refactor token validation decorator.Milo Casagrande
Change-Id: I529aaf81d922db1f110cb8ddd22e88227ac3c462
2014-10-16handlers: Make instance method into static one, refactor.Milo Casagrande
* Turn _valid_keys into a static method for all handlers. * Use in batch handlers the valid keys defined in common. * Change the JSON serializer using the default one, and change how mongodb Cursor results are stored (should be slightly faster). Change-Id: I17cf26d9011e34125bf6873edda7179a5202aa39
2014-10-15handlers: Use the newly defined keys and values.Milo Casagrande
* Refactor handlers code to use the newly defined keys. Change-Id: Ib14578bd1f2a57297b2296a0c1d12824700c9f2e
2014-09-11handlers: Refactor common methods into module.Milo Casagrande
* Move all the handlers common methods into a single module (making them "static"). * Refactor methods and tests. * Add new tests. Change-Id: Ied713e6d5a9d4c16dcc27794509bdc6dd1193c1f
2014-09-08boot: Implement DELETE method.Milo Casagrande
* Add a more complex DELETE method that accepts either an ID or a query to specify which boot reports to delete. This is specific only to the boot handler. * Refactor the base handler and created a new method to retrieve the date_range query. This is necesary to limit the boot delete method to not include date range deletion. * Add boot handler test focused on the DELETE implementation. Change-Id: I6ac159e8bddd5f0a094692ed891aefa1b0f31a41
2014-08-18boot: Fix parameter passing.Milo Casagrande
Change-Id: Ida91454fc0d3e97699643ddc07bbf74e996b5678
2014-07-31Massive refactoring.Milo Casagrande
* Will break the frontend. * Rework BaseHandler in order for that to handle all the async calls setup, and leave the subclasses to implement just the correct methods. * TokenHandler is a special case, since we need special token protection for that. * Fix db.py so that it returns plaun mongodb objects (Cursor) and store them as is: they are iteratable. * Make HandlerResponse the only accepted response type to create the response that is sent to the clients. * Fixe, rework and add tests. Change-Id: Ief7dad65b2801f701e7e5f67b3a360329aca69f6
2014-05-16Use more predefined keys.Milo Casagrande
2014-05-15Fix created attribute.Milo Casagrande
* Apparently, mongodb internally has a field called 'created', that collides with the 'created' attribute we have in the models. Sort operations on that field returned weird results when you drop the DB and re-import everything and are expecting to see the real documents date. * Rename created models attribute into created_on, and move it into the base model. * Fix tests.
2014-05-14Add valid keys for BootHandler GET method.Milo Casagrande
* Fix default return value to empty list.
2014-05-09Implement POST method for boot handler.Milo Casagrande
* Add URL for boot handler.
2014-05-07Add prototype for BootHandler.Milo Casagrande