Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 def get_host(self):
     try:
         return PlainInstance.get_host(self)
     except KeyError:
         pass
     return self._get_forwarding_info()['hostip']
Exemplo n.º 6
0
 def get_host(self):
     try:
         return PlainInstance.get_host(self)
     except KeyError:
         pass
     return self._get_forwarding_info()['hostip']