コード例 #1
0
ファイル: node.py プロジェクト: githubofhuo/fuel-devops
 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)
コード例 #2
0
 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)
コード例 #3
0
ファイル: test_helpers.py プロジェクト: openstack/fuel-devops
    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()
コード例 #4
0
    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()