def create_sftp_backup_storage(vm_ip, tmp_file):
    vm_username = os.environ['imageUsername']
    vm_password = os.environ['imagePassword']

    bs_option = test_util.BackupStorageOption()
    bs_option.name = 'bs1'
    bs_option.description = 'bs'
    bs_option.hostname = vm_ip
    bs_option.url = '/home/bs'
    bs_option.username = vm_username
    bs_option.password = vm_password
    bs_option.sshPort = '22'
    bs_inv = scen_ops.create_sftp_backup_storage(vm_ip, bs_option)
    scen_ops.reconnect_backup_storage(vm_ip, bs_inv.uuid)

    return bs_inv
def check_installation(vm_ip, tmp_file):
    #    cmd = '%s "/usr/bin/zstack-cli LogInByAccount accountName=admin password=password"' % ssh_cmd
    #    process_result = execute_shell_in_process(cmd, tmp_file)
    #    if process_result != 0:
    #        test_util.test_fail('zstack-cli login failed')
    vm_username = os.environ['imageUsername']
    vm_password = os.environ['imagePassword']

    bs_option = test_util.BackupStorageOption()
    bs_option.name = 'bs1'
    bs_option.description = 'bs'
    bs_option.hostname = vm_ip
    bs_option.url = '/home/bs'
    bs_option.username = vm_username
    bs_option.password = vm_password
    bs_option.sshPort = '22'
    bs = scen_ops.create_sftp_backup_storage(vm_ip, bs_option)
    scen_ops.delete_backup_storage(vm_ip, bs.uuid)