Lines Matching refs:cfg
120 cfg = config.AcloudConfigManager.LoadConfigFromProtocolBuffer(
122 self.assertEqual(cfg.service_account_name,
124 self.assertEqual(cfg.service_account_private_key_path,
126 self.assertEqual(cfg.service_account_json_private_key_path,
128 self.assertEqual(cfg.project, "fake-project")
129 self.assertEqual(cfg.zone, "us-central1-f")
130 self.assertEqual(cfg.machine_type, "n1-standard-1")
131 self.assertEqual(cfg.network, "default")
132 self.assertEqual(cfg.ssh_private_key_path, "/path/to/ssh/key")
133 self.assertEqual(cfg.storage_bucket_name, "fake_bucket")
134 self.assertEqual(cfg.orientation, "portrait")
135 self.assertEqual(cfg.resolution, "1200x1200x1200x1200")
136 self.assertEqual(cfg.client_id, "fake_client_id")
137 self.assertEqual(cfg.client_secret, "fake_client_secret")
138 self.assertEqual(cfg.extra_args_ssh_tunnel, "fake_extra_args_ssh_tunnel")
140 {key: val for key, val in six.iteritems(cfg.metadata_variable)},
142 self.assertEqual(cfg.hw_property,
145 self.assertEqual(cfg.extra_scopes, ["scope1", "scope2"])
167 cfg = config_unspecify.Load()
170 self.assertEqual(cfg.project, "")
171 self.assertEqual(cfg.zone, "")
185 cfg = config_exist.Load()
186 self.assertEqual(cfg.project, "fake-project")
187 self.assertEqual(cfg.zone, "us-central1-f")
188 self.assertEqual(cfg.client_id, "fake_client_id")
189 self.assertEqual(cfg.client_secret, "fake_client_secret")
198 cfg = config.AcloudConfigManager.LoadConfigFromProtocolBuffer(
200 self.assertEqual(cfg.min_machine_size, "n1-standard-1")
201 self.assertEqual(cfg.disk_image_name, "avd-system.tar.gz")
202 self.assertEqual(cfg.disk_image_mime_type, "application/x-tar")
203 self.assertEqual(cfg.disk_image_extension, ".tar.gz")
204 self.assertEqual(cfg.disk_raw_image_name, "disk.raw")
205 self.assertEqual(cfg.disk_raw_image_extension, ".img")
206 self.assertEqual(cfg.creds_cache_file, ".fake_oauth2.dat")
207 self.assertEqual(cfg.user_agent, "fake_user_agent")
208 self.assertEqual(cfg.default_usr_cfg.machine_type, "n1-standard-1")
209 self.assertEqual(cfg.default_usr_cfg.network, "default")
212 for key, val in six.iteritems(cfg.default_usr_cfg.metadata_variable)
218 {key: val for key, val in six.iteritems(cfg.device_resolution_map)},
222 for key, val in six.iteritems(cfg.device_default_orientation_map)
227 for key, val in six.iteritems(cfg.valid_branch_and_min_build_id)
230 self.assertEqual(cfg.default_usr_cfg.stable_host_image_name,
232 self.assertEqual(cfg.default_usr_cfg.stable_host_image_project,
234 self.assertEqual(cfg.kernel_build_target, "kernel")
237 self.assertEqual(cfg.default_usr_cfg.stable_goldfish_host_image_name,
239 self.assertEqual(cfg.default_usr_cfg.stable_goldfish_host_image_project,
241 self.assertEqual(cfg.emulator_build_target, "sdk_tools_linux")
242 self.assertEqual(cfg.default_usr_cfg.instance_name_pattern,
246 self.assertEqual(cfg.default_usr_cfg.stable_cheeps_host_image_name,
248 self.assertEqual(cfg.default_usr_cfg.stable_cheeps_host_image_project,
253 {key: val for key, val in six.iteritems(cfg.common_hw_property_map)},
272 cfg = config.AcloudConfig(usr_cfg, internal_cfg)
275 cfg.hw_property = None
279 cfg.OverrideWithArgs(args)
280 self.assertEqual(cfg.hw_property,
284 cfg.hw_property = None
288 cfg.OverrideWithArgs(args)
289 self.assertEqual(cfg.hw_property, "")
292 cfg.zone = "us-central1-f"
297 cfg.OverrideWithArgs(args)
298 self.assertEqual(cfg.zone, "us-central1-b")