buffet: Fix state update notification to GCD cloud server
Device state notification from buffet's state manager are coming
with state property names in form "package_name.property_name" and
that's how they were reported to the GCD server instead of being
split in JSON as {"package_name": {"property_name": value}}.
Also added "buffet_client GetState" command to retrieve actual
internal device state from buffet bypassing the GCD server-dependent
GetDeviceInfo. This is useful for debugging and also in case of
local-only workflow (with no GCD server present).
Finally, modified "buffet_client UpdateState" to allow complex
non-string state properties to be set. Now this command expects
a property name followed by a properly formed json value for the
property. Strings now require double-quotes. Integers, Booleans,
lists and dictionaries can now be set too.
BUG=chromium:449250
TEST=FEATURES=test USE=examples emerge-link buffet
Deployed and tested on device
Change-Id: Id2c97b422c56ec6648994ab37bb47284a6fb2041
Reviewed-on: https://chromium-review.googlesource.com/241955
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Anton Muhin <antonm@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
5 files changed
tree: b184bb3d16a6835940fb1750f90c636cb7b19d05
- buffet/