commands:  Remove topology usage to simplify authentication

Topology seems to be used in a broad way, resulting in unpredictable
behavior in older branches.  Remove the use of topology, as it provides
little value in this context, and simplify the usage to consume constants.

BUG=chromium:931793
TEST='cros tryjob --hwtest --staging samus-paladin-tryjob bob-paladin-tryjob'

Change-Id: I7d11e72e3489a6e0b7e55a680d2cb0401da9d3f1
Reviewed-on: https://chromium-review.googlesource.com/c/1493100
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Tested-by: Mike Nichols <mikenichols@chromium.org>
Commit-Queue: Mike Nichols <mikenichols@chromium.org>
diff --git a/cbuildbot/commands.py b/cbuildbot/commands.py
index 8d79417..7910195 100644
--- a/cbuildbot/commands.py
+++ b/cbuildbot/commands.py
@@ -1497,6 +1497,7 @@
       'hard_timeout_secs': swarming_timeout,
       'expiration_secs': _SWARMING_EXPIRATION,
       'tags': tags,
+      'service_account_json': constants.CHROMEOS_SERVICE_ACCOUNT,
   }
 
 
diff --git a/lib/constants.py b/lib/constants.py
index 01ef0a2..7b38747 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -1262,3 +1262,15 @@
 # Mock build and stage IDs
 MOCK_STAGE_ID = 313377
 MOCK_BUILD_ID = 31337
+
+# Topology dictionary copied from CIDB.
+TOPOLOGY_DICT = {
+    '/buildbucket/host':'cr-buildbucket.appspot.com',
+    '/chrome_swarming_proxy/host':'chromeos-swarming.appspot.com',
+    '/datastore/creds_file':('/creds/service_accounts/service-account-chromeos'
+                             '-datastore-writer-prod.json'),
+    '/sheriffomatic/host':'sheriff-o-matic.appspot.com',
+    '/statsd/es_host':'104.154.79.237',
+    '/statsd/host':'104.154.79.237',
+    '/swarming_proxy/host':'chromeos-proxy.appspot.com',
+}