deploy_chrome: Add --private_key option
This allows using deploy chrome on test devices that have an ssh key other than the publicly
available test key.
BUG=778274
TEST=Replaced test key on a CrOS device and successfully deployed.
Change-Id: I5bdb032e0ed621758fca83c9d9c0309d5764ba40
Reviewed-on: https://chromium-review.googlesource.com/737552
Commit-Ready: Adrian Elder <aelder@chromium.org>
Tested-by: Adrian Elder <aelder@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/deploy_chrome.py b/scripts/deploy_chrome.py
index d913e73..9a6dd10 100644
--- a/scripts/deploy_chrome.py
+++ b/scripts/deploy_chrome.py
@@ -98,7 +98,8 @@
self.staging_dir = staging_dir
if not self.options.staging_only:
self.device = remote.RemoteDevice(options.to, port=options.port,
- ping=options.ping)
+ ping=options.ping,
+ private_key=options.private_key)
self._target_dir_is_still_readonly = multiprocessing.Event()
self.copy_paths = chrome_util.GetCopyPaths('chrome')
@@ -397,6 +398,9 @@
help='Target directory on device to deploy Chrome into.')
parser.add_argument('-g', '--gs-path', type='gs_path',
help='GS path that contains the chrome to deploy.')
+ parser.add_argument('--private-key', type='path', default=None,
+ help='An ssh private key to use when deploying to '
+ 'a CrOS device.')
parser.add_argument('--nostartui', action='store_false', dest='startui',
default=True,
help="Don't restart the ui daemon after deployment.")