gce_au_worker: Revise gce_au_worker based on the new GCE util
All changes include:
* Update gce_au_worker.py with the lately added GCE Python API based utility,
i.e., gce.py, see CL:300202.
* Use locally built GCE tarball instead of depending on its existence in the
archive GCS bucket, see CL:300315.
* Update lib/constants with the credentials of the GCE project used for testing.
Background: brbug.com/1199 and crbug.com/526292.
* Handle test failures by archiving GCE tarball and test private key for repro.
* Add a unit test for gce_au_worker.py.
BUG=brillo:1196
TEST=Trybot run with a config that enables gce tests.
Change-Id: Ide8ed380f23e1c1f015094413f5bc93cbc60760f
Reviewed-on: https://chromium-review.googlesource.com/301741
Commit-Ready: Daniel Wang <wonderfly@google.com>
Tested-by: Daniel Wang <wonderfly@google.com>
Reviewed-by: Simran Basi <sbasi@chromium.org>
diff --git a/lib/constants.py b/lib/constants.py
index 9283902..66e9ac7 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -19,5 +19,9 @@
MAX_TIMEOUT_SECONDS = 4800
-GCE_PROJECT = 'chromiumos-gce-testlab'
-GCE_ZONE = 'us-central1-a'
+# Information of the GCE autotest bots.
+GCE_PROJECT = 'cros-autotest-bots'
+GCE_DEFAULT_ZONE = 'us-central1-a'
+GCE_DEFAULT_NETWORK = 'network-prod'
+GCE_JSON_KEY = '/creds/service_accounts/service-account-cros-autotest-bots.json'
+GCS_BUCKET = 'chromeos-test-gce-tarballs'