def _wait_stop(self): """ Wait for the system to shutdown and set state STOPPED afterwards. """ self.log_start("waiting for system to shutdown... ") dotlog = lambda: self.log_continue(".") wait_for_tcp_port(self.main_ipv4, 22, open=False, callback=dotlog) self.log_continue("[down]") self.state = self.STOPPED
def _wait_stop(self): """ Wait for the system to shutdown and set state STOPPED afterwards. """ self.log_start("waiting for system to shutdown...") dotlog = lambda: self.log_continue(".") wait_for_tcp_port(self.main_ipv4, 22, open=False, callback=dotlog) self.log_continue("[down]") self.state = self.STOPPED
def _wait_for_rescue(self, ip): if not TEST_MODE: # In test mode, the target machine really doesn't go down at all, # so only wait for the reboot to finish when deploying real # systems. self.log_start("waiting for rescue system...") dotlog = lambda: self.log_continue(".") wait_for_tcp_port(ip, 22, open=False, callback=dotlog) self.log_continue("[down]") wait_for_tcp_port(ip, 22, callback=dotlog) self.log_end("[up]") self.state = self.RESCUE