Send finalize request to shopfloor after in-place wipe
Originally we send finalize request to shopfloor just before wiping.
However, if wiping failed, data in shopfloor still indicates the dut is
finalized.
For in-place wipe, we can inform shopfloor after successfully wiping.
BUG=chromium:544021
TEST=Test in-place wipe on Paine
Change-Id: I200dd4822bb57772c992d051a760d6b02472c594
Reviewed-on: https://chromium-review.googlesource.com/311903
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
diff --git a/py/gooftool/gooftool.py b/py/gooftool/gooftool.py
index 1f8d149..790178c 100755
--- a/py/gooftool/gooftool.py
+++ b/py/gooftool/gooftool.py
@@ -680,14 +680,21 @@
'[--max-battery-percent <maximum battery percentage>] '
'[--min-battery-voltage <minimum battery voltage>] '
'[--max-battery-voltage <maximum battery voltage>]')
+_shopfloor_url_args_cmd_arg = CmdArg(
+ '--shopfloor_url',
+ help='Shopfloor server url to be informed when in-place wipe is done. '
+ 'After in-place wipe, a XML-RPC request will be sent to the '
+ 'given url to indicate the completion of wipe.')
@Command('wipe_in_place',
CmdArg('--fast', action='store_true',
help='use non-secure but faster wipe method.'),
- _cutoff_args_cmd_arg)
+ _cutoff_args_cmd_arg,
+ _shopfloor_url_args_cmd_arg)
def WipeInPlace(options):
"""Start factory wipe directly without reboot."""
- GetGooftool(options).WipeInPlace(options.fast, options.cutoff_args)
+ GetGooftool(options).WipeInPlace(options.fast, options.cutoff_args,
+ options.shopfloor_url)
@Command('prepare_wipe',
CmdArg('--fast', action='store_true',
@@ -880,6 +887,7 @@
CmdArg('--wipe_in_place', action='store_true',
help='Start factory wiping in place without reboot.'),
_cutoff_args_cmd_arg,
+ _shopfloor_url_args_cmd_arg,
_hwid_version_cmd_arg,
_hwdb_path_cmd_arg,
_hwid_status_list_cmd_arg,