hdctools: Moved USB Disk Management to Servod from Autoserv

Moved the code segments involving USB disk detection and image downloading to
Servo_server. Now if autoserv is given an image_path, servo_server will probe
for the servo USB device and transfer the image either from the local path or
a publicly visible URL. Also created a method called
make_image_noninteractive in order to make the installation process not require
USB disconnection for reboot.

Portions of install_recovery_image in /files/server/cros/servo.py will
deprecated as a result. Also probe_host_usb_dev in servo.py will need to
be removed in the future once the firmware tests are rewritten.

BUG=chrome-os-partner:8754
TEST=Ran locally using modified autotest with a local image, an image hosted in
my www folder, and without a USB device connected to servo.
Can be ran through python and xmlrpc. Start servod and in a python shell
run (note image path will differ based on your image location):

import xmlrpclib
remote_uri = 'http://localhost:9999'
client = xmlrpclib.ServerProxy(remote_uri, verbose=False)
client.download_image_to_usb("/home/sbasi/trunk/src/build/images/x86-alex/
recovery_image.bin")
client.make_image_noninteractive()

Change-Id: I2a5c6b54b8abcb5fc99e5c04ba9659dc4dacca8b
Reviewed-on: https://gerrit.chromium.org/gerrit/23046
Commit-Ready: Simran Basi <sbasi@google.com>
Reviewed-by: Simran Basi <sbasi@google.com>
Tested-by: Simran Basi <sbasi@google.com>
1 file changed