Пример #1
0
def ssh_command(step, vm_name, user, command):
    ip = utils.nova_cli.get_instance_ip(vm_name)
    step_assert(step).assert_true(ip != '')
    step_assert(step).assert_true(world.saved_root_password is not None)
    conf.log(conf.get_bash_log_file(),"load world.saved_root_password=%s" % world.saved_root_password)
    return utils.ssh(ip,
        command=command,
        user=user,
        password=world.saved_root_password)
Пример #2
0
def check_can_log_via_ssh_using_saved_pwd(step, name, user):
    ip = utils.nova_cli.get_instance_ip(name)
    assert_true(ip != '', name)
    assert_true(world.saved_root_password is not None)
    conf.log(conf.get_bash_log_file(),"load world.saved_root_password=%s" % world.saved_root_password)
    step_assert(step).assert_true(utils.ssh(ip, command="/bin/ls -l /", user=user, password=world.saved_root_password).successful())
Пример #3
0
def check_can_log_via_ssh_with_external_key(step, name, user, key):
    ip = utils.nova_cli.get_instance_ip(name)
    assert_true(ip != '', name)
    key_path = os.path.join(bunch_working_dir,key)
    step_assert(step).assert_true(utils.ssh(ip, command="exit", user=user, key=key_path).successful())