Beispiel #1
0
def snapshots_list(args):
    l = args.endpoint.list_snapshots(args.vmuuid)
    if args.H:
        header(args)
    fmt = mk_fmt_str(args)
    for e in l:
        if not e:
            print('error!')
            exit(1)
        l = mk_fmt_line(args, e)
        if args.p:
            print(':'.join(l))
        else:
            print(fmt%tuple(l))
Beispiel #2
0
def snapshots_list(args):
    l = args.endpoint.list_snapshots(args.vmuuid)
    if args.H:
        header(args)
    fmt = mk_fmt_str(args)
    for e in l:
        if not e:
            print('error!')
            exit(1)
        l = mk_fmt_line(args, e)
        if args.p:
            print(':'.join(l))
        else:
            print(fmt % tuple(l))
Beispiel #3
0
def backups_list(args):
    l = args.endpoint.list_backups(args.vmuuid)
    l = sorted(l, key=lambda e: d(e, ['timestamp'], 0))
    if args.H:
        header(args)
    fmt = mk_fmt_str(args)
    for e in l:
        if not e:
            print('error!')
            exit(1)
        l = mk_fmt_line(args, e)
        if args.p:
            print(':'.join(l))
        else:
            print(fmt%tuple(l))
Beispiel #4
0
def backups_list(args):
    l = args.endpoint.list_backups(args.vmuuid)
    l = sorted(l, key=lambda e: d(e, ['timestamp'], 0))
    if args.H:
        header(args)
    fmt = mk_fmt_str(args)
    for e in l:
        if not e:
            print('error!')
            exit(1)
        l = mk_fmt_line(args, e)
        if args.p:
            print(':'.join(l))
        else:
            print(fmt % tuple(l))