summaryrefslogtreecommitdiff
path: root/scripts/update_payload/payload.py
diff options
context:
space:
mode:
authorDon Garrett <dgarrett@google.com>2013-05-10 15:01:36 -0700
committerChromeBot <chrome-bot@google.com>2013-05-15 18:42:55 -0700
commit432d601e236bf8b9110fdb497e5f5c87899346e2 (patch)
tree987f4a1da85832be2f2ebdf9bab1ae2b8264344f /scripts/update_payload/payload.py
parent4f50b413c60a5ef8d642b9d7493baa92c8eedd09 (diff)
Update paycheck to understand the updated update_metadata fields.
When checking a payload, always start by printing a description of the payload being checked. Recompiled (with protoc) the updated update_metadata.proto from the update_engine. BUG=chromium:226310 TEST=Manual Run CQ-DEPEND=CL:47347 Change-Id: Ib60c6e6978d30444db7b65ef6d09540c9ffacdb8 Reviewed-on: https://gerrit.chromium.org/gerrit/50899 Commit-Queue: Don Garrett <dgarrett@chromium.org> Reviewed-by: Don Garrett <dgarrett@chromium.org> Tested-by: Don Garrett <dgarrett@chromium.org>
Diffstat (limited to 'scripts/update_payload/payload.py')
-rw-r--r--scripts/update_payload/payload.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/update_payload/payload.py b/scripts/update_payload/payload.py
index fefc7e4f..1796f511 100644
--- a/scripts/update_payload/payload.py
+++ b/scripts/update_payload/payload.py
@@ -154,6 +154,30 @@ class Payload(object):
self.is_init = True
+ def Describe(self):
+
+ def _DescribeImageInfo(description, image_info):
+ def _DisplayIndentedValue(name, value):
+ print ' {:<14} {}'.format(name+':', value)
+
+ print '%s:' % description
+ _DisplayIndentedValue('Channel', image_info.channel)
+ _DisplayIndentedValue('Board', image_info.board)
+ _DisplayIndentedValue('Version', image_info.version)
+ _DisplayIndentedValue('Key', image_info.key)
+
+ if (image_info.build_channel != image_info.channel):
+ _DisplayIndentedValue('Build channel', image_info.build_channel)
+
+ if (image_info.build_version != image_info.version):
+ _DisplayIndentedValue('Build version', image_info.build_version)
+
+ if self.manifest.HasField('old_image_info'):
+ _DescribeImageInfo('Old Image', self.manifest.old_image_info)
+
+ if self.manifest.HasField('new_image_info'):
+ _DescribeImageInfo('New Image', self.manifest.new_image_info)
+
def _AssertInit(self):
"""Raises an exception if the object was not initialized."""
if not self.is_init: