Lines Matching refs:instance

46 def _IsWebrtcEnable(instance, host_user, host_ssh_private_key_path,  argument
60 if instance.islocal:
61 return instance.cf_runtime_cfg.enable_webrtc
62 ssh = ssh_object.Ssh(ip=ssh_object.IP(ip=instance.ip), user=host_user,
122 instance, argument
148 if instance.avd_type not in utils.AVD_PORT_DICT:
151 (instance.name, instance.avd_type))
156 adb_cmd = AdbTools(instance.adb_port)
157 vnc_port = instance.vnc_port
158 adb_port = instance.adb_port
159 webrtc_port = instance.webrtc_port
161 if instance.ssh_tunnel_is_connected and not adb_cmd.IsAdbConnectionAlive():
165 elif not instance.ssh_tunnel_is_connected and not instance.islocal:
168 ip_addr=connect_hostname or instance.ip,
170 target_vnc_port=utils.AVD_PORT_DICT[instance.avd_type].vnc_port,
171 target_adb_port=utils.AVD_PORT_DICT[instance.avd_type].adb_port,
177 if not instance.islocal:
178 webrtc_port = utils.GetWebrtcPortFromSSHTunnel(instance.ip)
182 ip_addr=connect_hostname or instance.ip,
190 StartVnc(vnc_port, instance.display)
193 constants.IP: instance.ip,
194 constants.INSTANCE_NAME: instance.name,
198 if adb_port and not instance.islocal:
209 reconnect_report.AddError(instance.name)
212 def GetSshConnectHostname(cfg, instance): argument
225 if instance.islocal:
229 cfg.project, instance.name, cfg.zone)
249 for instance in instances_to_reconnect:
250 if instance.avd_type not in utils.AVD_PORT_DICT:
253 (instance.name, instance.avd_type),
256 if not instance.islocal:
257 AddPublicSshRsaToInstance(cfg, constants.GCE_USER, instance.name)
259 instance,
262 autoconnect=(args.autoconnect or instance.autoconnect),
263 connect_hostname=GetSshConnectHostname(cfg, instance))