def __call__(self): from deployer.contrib.nodes import connect class Connect(connect.Connect): class Hosts: host = self.node.hosts._all env = Env(Connect(), self.shell.pty, self.shell.logger_interface) # Run as any other action. (Nice exception handling, e.g. in case of NoInput on host selection.) try: env.with_host() except ActionException, e: pass
def __call__(self): from deployer.contrib.nodes import connect class Connect(connect.Connect): class Hosts: host = self.node.hosts.get_hosts() env = Env(Connect(), self.shell.pty, self.shell.logger_interface) # Run as any other action. (Nice exception handling, e.g. in case of NoInput on host selection.) try: env.with_host() except ActionException as e: pass except Exception as e: self.shell.logger_interface.log_exception(e)