Esempio n. 1
0
def volume_addbrick(version, name):
    bricks_str = get_post_data('brick', '')
    brickpath = [b.strip() for b in bricks_str.split(",")][0]
    replica = get_post_data('replica', 0)
    stripe = get_post_data('stripe', 0)
    force = get_post_data('force', False)

    return run_and_response(volume.addbrick,
                            [name, brickpath, replica, stripe, force])
Esempio n. 2
0
def volume_create(version, name):
    bricks_str = get_post_data('bricks', '')
    bricks = [b.strip() for b in bricks_str.split(",")]
    replica = get_post_data('replica', 0)
    stripe = get_post_data('stripe', 0)
    transport = get_post_data('transport', 'tcp').lower()
    force = get_post_data('force', False)
    start = get_post_data('start', False)

    return run_and_response(volume.create, [name, bricks, replica,
                                            stripe, transport, force, start])
Esempio n. 3
0
def volume_create(version, name):
    bricks_str = get_post_data('bricks', '')
    bricks = [b.strip() for b in bricks_str.split(",")]
    replica = get_post_data('replica', 0)
    stripe = get_post_data('stripe', 0)
    transport = get_post_data('transport', 'tcp').lower()
    force = get_post_data('force', False)
    start = get_post_data('start', False)

    return run_and_response(volume.create, [name, bricks, replica,
                                            stripe, transport, force, start])
Esempio n. 4
0
def peer_create(version, hostname):
    return run_and_response(peer.attach, [hostname])
Esempio n. 5
0
def peers_get(version):
    return run_and_response(peer.info, [])
Esempio n. 6
0
def snapshot_clone(version,snapName,cloneName):
    description = get_post_data('description', '').lower()
    force = get_post_data('force', False)
    start = get_post_data('start', False)

    return run_and_response(snapshot.clone, [cloneName,snapName, description, force, start])
Esempio n. 7
0
def volumes_get(version):
    return run_and_response(volume.info, [])
Esempio n. 8
0
def volume_stop(version, name):
    force = get_post_data('force', False)
    return run_and_response(volume.stop, [name, force])
Esempio n. 9
0
def volume_quorumratio(version):
    quorum_type = get_post_data('type', '')
    quorum_ratio = get_post_data('ratio', '')
    return run_and_response(volume.quorumratio, [quorum_type, quorum_ratio])
Esempio n. 10
0
def peers_get(version):
    return run_and_response(peer.info, [])
Esempio n. 11
0
def volume_get(version, name):
    return run_and_response(volume.info, [name])
Esempio n. 12
0
def volumes_get(version):
    return run_and_response(volume.info, [])
Esempio n. 13
0
def volume_restart(version, name):
    return run_and_response(volume.restart, [name])
Esempio n. 14
0
def snapshot_deactivate(version, name):
    force = get_post_data('force', False)
    return run_and_response(snapshot.deactivate, [name, force])
Esempio n. 15
0
def snapshot_delete(version, name):
    deactivate = get_post_data('deactivate', False)
    return run_and_response(snapshot.delete, [name, deactivate])
Esempio n. 16
0
def peer_delete(version, hostname):
    force = get_post_data('force', False)
    return run_and_response(peer.detach, [hostname, force])
Esempio n. 17
0
def volume_quorumtype(version):
    vol_name = get_post_data('vol', '')
    quorum_type = get_post_data('type', '')
    return run_and_response(volume.quorumtype, [vol_name, quorum_type])
Esempio n. 18
0
def peer_create(version, hostname):
    return run_and_response(peer.attach, [hostname])
Esempio n. 19
0
def volume_delete(version, name):
    stop = get_post_data('stop', False)
    return run_and_response(volume.delete, [name, stop])
Esempio n. 20
0
def peer_delete(version, hostname):
    force = get_post_data('force', False)
    return run_and_response(peer.detach, [hostname, force])
Esempio n. 21
0
def volume_restart(version, name):
    return run_and_response(volume.restart, [name])
Esempio n. 22
0
def volume_delete(version, name):
    stop = get_post_data('stop', False)
    return run_and_response(volume.delete, [name, stop])
Esempio n. 23
0
def volume_get(version, name):
    return run_and_response(volume.info, [name])
Esempio n. 24
0
def volume_start(version, name):
    force = get_post_data('force', False)
    return run_and_response(volume.start, [name, force])
Esempio n. 25
0
def volume_removebrickforce(version, name):
    brick_path_str = get_post_data('brick', '')
    replica = get_post_data('replica', 0)

    return run_and_response(volume.removebrickForce,
                            [name, brick_path_str, replica])
Esempio n. 26
0
def snapshot_get(version, name):
    return run_and_response(snapshot.info, [name])