def deploy_wait(self): ip = self.get_ip_address_by_network_name( settings.SSH_CREDENTIALS['admin_network']) if self.deploy_check_cmd is None: self.deploy_check_cmd = self.ext.get_deploy_check_cmd() self.save() wait_ssh_cmd(host=ip, port=self.ssh_port, check_cmd=self.deploy_check_cmd, username=settings.SSH_CREDENTIALS['login'], password=settings.SSH_CREDENTIALS['password'], timeout=self.deploy_timeout)
def deploy_wait(self): ip = self.node.get_ip_address_by_network_name( settings.SSH_CREDENTIALS['admin_network']) if self.node.deploy_check_cmd is None: self.node.deploy_check_cmd = self.get_deploy_check_cmd() self.node.save() helpers.wait_ssh_cmd(host=ip, port=self.node.ssh_port, check_cmd=self.node.deploy_check_cmd, username=settings.SSH_CREDENTIALS['login'], password=settings.SSH_CREDENTIALS['password'], timeout=self.node.deploy_timeout)
def test_wait_ssh_cmd(self, wait, ssh): host = '127.0.0.1' port = 65535 check_cmd = 'ls ~' username = '******' password = '******' timeout = 0 helpers.wait_ssh_cmd( host, port, check_cmd, username, password, timeout) ssh.assert_called_once_with( host=host, port=port, auth=ssh_client.SSHAuth(username=username, password=password) ) wait.assert_called_once()
def test_wait_ssh_cmd(self, wait, ssh): host = '127.0.0.1' port = 65535 check_cmd = 'ls ~' username = '******' password = '******' timeout = 0 helpers.wait_ssh_cmd(host, port, check_cmd, username, password, timeout) ssh.assert_called_once_with(host=host, port=port, username=username, password=password) wait.assert_called_once()