8e9f21c005c170c5868576d86870bc175af8c610 |
|
17-Apr-2014 |
Chris Sosa <sosa@chromium.org> |
Remove complex autotest common code. So the autotest imports make it really hard to install fake_device_server as a standalone server. This CL removes that and just requires that the Python code be installed in a directory called fake_device_server since we have no Autotest dependencies. BUG=chromium:361204 TEST=Started server + ran all unittests. Change-Id: Iefcb5105cb96f07a99c919a1d3d41bf5ff3cb46f Reviewed-on: https://chromium-review.googlesource.com/195454 Tested-by: Chris Sosa <sosa@chromium.org> Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Chris Sosa <sosa@chromium.org>
/external/autotest/client/common_lib/cros/fake_device_server/resource_method_unittest.py
|
626d491db01f46f7ac9943a2508b1e8e9844d39c |
|
17-Apr-2014 |
Chris Sosa <sosa@chromium.org> |
Buffet server: upgraded cherrpy to 3.2, use @tools.json_out to return json properly. Cherrypy provides good tooling for auto-converting dictionaries to json and setting the return header correctly. Let's use it! BUG=chromium:364138 TEST=Unittests + curl and expected return types. CQ-DEPEND=CL:195241 Change-Id: I1ab95a3f4cc606313c7412e2c582c3b9ea873469 Reviewed-on: https://chromium-review.googlesource.com/195332 Reviewed-by: Chris Sosa <sosa@chromium.org> Commit-Queue: Chris Sosa <sosa@chromium.org> Tested-by: Chris Sosa <sosa@chromium.org>
/external/autotest/client/common_lib/cros/fake_device_server/resource_method_unittest.py
|
fb08e82e29ad2232361c6662c3842f5617f4032a |
|
04-Apr-2014 |
Chris Sosa <sosa@chromium.org> |
Buffet server: add support for both devices and commands. This CL adds both the device and commands methods to buffet's fake_device_server. For devices: - Devices are created when either registration tickets are finalized OR a device INSERT method (via a POST) is called. For commands: - Commands are associated to devices by deviceId which is required whenever creating a new command. I store the mapping between devices and their commands in a dictionary. The only reason I need to keep a mapping is I need to map a device to its commands for the listing method i.e. GET on commands without an id. I have also made a small common class used by devices/commands that implements PATCH/PUT as they are indentical for both. I almost did the same for registration but I couldn't find a good way to deal with the "claim" part of it. I have left a couple pieces left TODO as they will require a bit more thinking and we won't likely need them immediately. These are: 1) The upload API i.e. commands that require uploading a blob of data to give to a device e.g. storage.writeFile. 2) A couple specific fields like owner in devices which don't seem to matter yet. BUG=chromium:358277 TEST=See README + unittests Change-Id: I0eb11a2f1bdb31b5d3dc4f17a72499f5160eafc2 Reviewed-on: https://chromium-review.googlesource.com/193529 Tested-by: Chris Sosa <sosa@chromium.org> Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Reviewed-by: Christopher Wiley <wiley@chromium.org> Commit-Queue: Chris Sosa <sosa@chromium.org>
/external/autotest/client/common_lib/cros/fake_device_server/resource_method_unittest.py
|