labstation: Adds image downloader as standalone module
* Adds the image downloader code as a standalone
module.
* Adds tests to validate workflows.
* Updates substring match to support http/https
* Updates error logic to avoid crashes
BUG=b:364955403
BUG=b:368405901
TEST=pytest
TEST=image_downloader -d ${PATH_TO_DRIVE} -i ${LOCAL_PATH}
TEST=image_downloader -d ${PATH_TO_DRIVE} -i ${NETWORK_PATH}
Change-Id: I9953cb345ef26d7a88c122fa417b59e5f0cfa45f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/labstation/+/6019423
Reviewed-by: Garry Wang <xianuowang@chromium.org>
Reviewed-by: Keith Haddow <haddowk@chromium.org>
Commit-Queue: Keith Haddow <haddowk@chromium.org>
Tested-by: Brian Nemec <bnemec@google.com>
12 files changed