Support for rlz_brand_code and customization_id in factory flow.

BUG=chrome-os-partner:28445
TEST=Unit tests, manually tested on device

Change-Id: I3a0ac1b0aa3ab06a914e3015aa93533ad62243c7
Reviewed-on: https://chromium-review.googlesource.com/197475
Reviewed-by: Jon Salz <jsalz@chromium.org>
Commit-Queue: Jon Salz <jsalz@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
diff --git a/py/gooftool/gooftool.py b/py/gooftool/gooftool.py
index 8fbf247..971197c 100755
--- a/py/gooftool/gooftool.py
+++ b/py/gooftool/gooftool.py
@@ -544,6 +544,18 @@
     event_log.Log('switch_dev', type='virtual switch')
 
 
+@Command('verify_branding')
+def VerifyBranding(options):  # pylint: disable=W0613
+  """Verify that branding fields are properly set.
+
+  customization_id, if set in the RO VPD, must be of the correct format.
+
+  rlz_brand_code must be set either in the RO VPD or OEM partition, and must
+  be of the correct format.
+  """
+  return GetGooftool(options).VerifyBranding()
+
+
 @Command('write_protect')
 def EnableFwWp(options):  # pylint: disable=W0613
   """Enable then verify firmware write protection."""
@@ -654,6 +666,7 @@
   VerifyKeys(options)
   VerifyRootFs(options)
   VerifyTPM(options)
+  VerifyBranding(options)
 
 @Command('untar_stateful_files')
 def UntarStatefulFiles(dummy_options):