Add probe_results and hwid arguments to Verify and Finalize.

BUG=None
TEST=make lint test; finalize a device (up to PrepareWipe)

Change-Id: I70d576686387729991cc016c1014f320a229f103
Reviewed-on: https://gerrit.chromium.org/gerrit/34413
Commit-Ready: Jon Salz <jsalz@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
Reviewed-by: Chinyue Chen <chinyue@chromium.org>
diff --git a/py/gooftool/gooftool.py b/py/gooftool/gooftool.py
index fad11e5..d350fbd 100755
--- a/py/gooftool/gooftool.py
+++ b/py/gooftool/gooftool.py
@@ -114,11 +114,20 @@
     default=hwid_tool.DEFAULT_HWID_DATA_PATH,
     help='Path to the HWID database.')
 
-
 _hwid_status_list_cmd_arg = CmdArg(
   '--status', nargs='*', default=['supported'],
   help='allow only HWIDs with these status values')
 
+_probe_results_cmd_arg = CmdArg(
+    '--probe_results', metavar='RESULTS.yaml',
+    help=('Output from "gooftool probe" (used instead of '
+          'probing this system).'))
+
+_hwid_cmd_arg = CmdArg(
+    '--hwid', metavar='HWID',
+    help=('HWID to verify (instead of the currently set HWID of '
+          'this system)'))
+
 
 @Command('best_match_hwids',
          _hwdb_path_cmd_arg,
@@ -362,12 +371,8 @@
 @Command('verify_hwid',
          _hwid_status_list_cmd_arg,
          _hwdb_path_cmd_arg,
-         CmdArg('--probe_results', metavar='RESULTS.yaml',
-                help=('Output from "gooftool probe" (used instead of '
-                      'probing this system).')),
-         CmdArg('--hwid', metavar='HWID',
-                help=('HWID to verify (instead of the currently set HWID of '
-                      'this system)')))
+         _probe_results_cmd_arg,
+         _hwid_cmd_arg)
 def VerifyHwid(options):
   """Verify system HWID properties match probed device properties.
 
@@ -650,7 +655,9 @@
          CmdArg('--no_write_protect', action='store_true',
                 help='Do not check write protection switch state.'),
          _hwid_status_list_cmd_arg,
-         _hwdb_path_cmd_arg)
+         _hwdb_path_cmd_arg,
+         _probe_results_cmd_arg,
+         _hwid_cmd_arg)
 def Verify(options):
   """Verifies if whole factory process is ready for finalization.
 
@@ -754,7 +761,9 @@
          _hwdb_path_cmd_arg,
          _hwid_status_list_cmd_arg,
          _upload_method_cmd_arg,
-         _add_file_cmd_arg)
+         _add_file_cmd_arg,
+         _probe_results_cmd_arg,
+         _hwid_cmd_arg)
 def Finalize(options):
   """Verify system readiness and trigger transition into release state.