Add in fixes for cheeps infra run.

Made the setup detection more smart since this will get triggered
in the infra run since service accounts are used.

Also make sure cheeps use internal IPs as well.

Bug: 128433662
Test: acloud create --avd-type cheeps ...
Change-Id: Ib9b48f99235e7435657b5335d18cdecd21ca2a61
diff --git a/setup/gcp_setup_runner.py b/setup/gcp_setup_runner.py
index fa0f542..0a1b281 100644
--- a/setup/gcp_setup_runner.py
+++ b/setup/gcp_setup_runner.py
@@ -192,17 +192,21 @@
         Args:
             config_path: String, acloud config path.
         """
+        # pylint: disable=invalid-name
         config_mgr = config.AcloudConfigManager(config_path)
         cfg = config_mgr.Load()
         self.config_path = config_mgr.user_config_path
-        self.client_id = cfg.client_id
-        self.client_secret = cfg.client_secret
         self.project = cfg.project
         self.zone = cfg.zone
         self.storage_bucket_name = cfg.storage_bucket_name
         self.ssh_private_key_path = cfg.ssh_private_key_path
         self.ssh_public_key_path = cfg.ssh_public_key_path
         self.stable_host_image_name = cfg.stable_host_image_name
+        self.client_id = cfg.client_id
+        self.client_secret = cfg.client_secret
+        self.service_account_name = cfg.service_account_name
+        self.service_account_private_key_path = cfg.service_account_private_key_path
+        self.service_account_json_private_key_path = cfg.service_account_json_private_key_path
 
     def ShouldRun(self):
         """Check if we actually need to run GCP setup.
@@ -212,9 +216,18 @@
         Returns:
             True if reqired config fields are empty, False otherwise.
         """
-        return (not self.client_id
-                or not self.client_secret
-                or not self.project)
+        # We need to ensure the config has the proper auth-related fields set,
+        # so config requires just 1 of the following:
+        # 1. client id/secret
+        # 2. service account name/private key path
+        # 3. service account json private key path
+        if ((not self.client_id or not self.client_secret)
+                and (not self.service_account_name or not self.service_account_private_key_path)
+                and not self.service_account_json_private_key_path):
+            return True
+
+        # If a project isn't set, then we need to run setup.
+        return not self.project
 
     def _Run(self):
         """Run GCP setup task."""