update_engine: Add --properties_format flag to delta_generator
We need to be able to capture information about a payload by just
looking at it. These information needed for nebraska to be able to
process a response from a request. These information includes:
- Payload and its metadata hashes and sizes.
- Payload metadata signature.
- The APP ID of the original image.
- Whether the payload is a delta or full.
- The payload's target version.
This CL adds the ability to generate a json file with the payloads
properties such as above.
Also this CL refactors how this information is generated into a single
class.
BUG=chromium:960433
TEST=delta_generator --in_file=hello-signed-delta --properties_file=prop
TEST=delta_generator --in_file=hello-signed-delta
--properties_file=payload.json --properties_format="json"
Change-Id: Ia61be0bf37bcacfd82f8982a7977fdae2f18cb30
Reviewed-on: https://chromium-review.googlesource.com/1610801
Tested-by: Amin Hassani <ahassani@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Sen Jiang <senj@chromium.org>
Reviewed-by: Nicolas Norvez <norvez@chromium.org>
9 files changed