Exemple #1
0
def run_fs_detach(arguments, sdk):
    config = config_get(silent=True)
    from smb.cli.fs import fs_detach
    lib.approve_danger_op(
        "Detaching Filesystem {} from Cluster {}".format(
            arguments['--name'], config['Cluster']), arguments)
    fs_detach(arguments['--name'], sdk)
Exemple #2
0
def run_fs_attach(arguments, sdk):
    from smb.cli.fs import fs_attach
    config = config_get(silent=True)
    lib.approve_danger_op(
        "Adding volume {} to Cluster {}".format(arguments['--name'],
                                                config['Cluster']), arguments)
    log(logger, "calling {}")
    fs_attach(arguments['--name'], sdk, arguments['--force'])
Exemple #3
0
def run_share_resize(arguments, sdk):
    from smb.cli.share import share_limit, share_unlimit
    size = lib._validate_size(arguments['--size'], roundup=True)
    if size != 0:
        lib.approve_danger_op(
            "Size limiting to share {}".format(arguments['--name']), arguments)
        share_limit(arguments['--name'], size, sdk)
        return
    share_unlimit(arguments['--name'])
Exemple #4
0
def run_share_delete(arguments):
    from smb.cli.share import share_delete
    lib.approve_danger_op(
        "Completely DELETE share {}".format(arguments['--name']), arguments)
    share_delete(arguments['--name'])
Exemple #5
0
def run_fs_delete(arguments, sdk):
    from smb.cli.fs import fs_delete
    lib.approve_danger_op(
        "Deleting Filesystem {} completely. NO WAY BACK!".format(
            arguments['--name']), arguments)
    fs_delete(arguments['--name'], sdk)