def init_ssh_key(self, user=None): mi = getattr(self.master, 'instance', None) if mi is not None and 'proxyhost' not in self.config: self.config['proxyhost'] = self.master.id if mi is not None and 'proxycommand' not in self.config: self.config['proxycommand'] = self.proxycommand_with_instance(mi) return PlainInstance.init_ssh_key(self, user=user)
def init_ssh_key(self, user=None): status = self._status() if status == "unavailable": log.error("Instance '%s' unavailable", self.id) raise self.paramiko.SSHException() if status != "running": log.error("Instance state: %s", status) raise self.paramiko.SSHException() if "proxyhost" not in self.config: self.config["proxyhost"] = self.master.id if "proxycommand" not in self.config: mi = self.master.instance self.config["proxycommand"] = self.proxycommand_with_instance(mi) return PlainInstance.init_ssh_key(self, user=user)
def init_ssh_key(self, user=None): status = self._status() if status == 'unavailable': log.error("Instance '%s' unavailable", self.id) raise self.paramiko.SSHException() if status != 'running': log.error("Instance state: %s", status) raise self.paramiko.SSHException() if 'proxyhost' not in self.config: self.config['proxyhost'] = self.master.id if 'proxycommand' not in self.config: mi = self.master.instance self.config['proxycommand'] = self.proxycommand_with_instance(mi) return PlainInstance.init_ssh_key(self, user=user)
def get_host(self): try: return PlainInstance.get_host(self) except KeyError: pass return self._get_forwarding_info()['hostip']