Exemplo n.º 1
0
def flush_and_regenerate(param=None):
    _db.table_cleanup_all()
    vols = []
    vols_data = volumes.get()

    for vol in vols_data:
        bricks = []
        vols.append((vol["uuid"],
                     vol["name"],
                     vol["type"],
                     vol["status"],
                     vol["num_bricks"],
                     vol["transport"]))

        for brick in vol['bricks']:
            bricks.append((vol['name'], brick))

    _db.volumes_add(vols)
    _db.bricks_add(bricks)
Exemplo n.º 2
0
def volume_delete(volume):
    _db.table_cleanup_all(volume=volume)