def start_cleanup(nodes, keyspaces=None, column_families=None):
    req = {'nodes': nodes}
    if keyspaces is not None:
        req['key_spaces'] = keyspaces
    if column_families is not None:
        req['column_families'] = column_families
    return http.put(cu.api_url("/cleanup/start"),
                    json=req,
                    headers={'Content-Type': 'application/json'})
def start_restore(name, external_location, s3_access_key, s3_secret_key):
    req = {
        'backup_name': name,
        'external_location': external_location,
        's3_access_key': s3_access_key,
        's3_secret_key': s3_secret_key
    }
    return http.put(cu.api_url("/restore/start"),
                    json=req,
                    headers={'Content-Type': 'application/json'})
Пример #3
0
def start_backup(name, external_location,
                 s3_access_key, s3_secret_key, azure_account, azure_key):
    req = {
        'backup_name': name,
        'external_location': external_location,
        's3_access_key': s3_access_key,
        's3_secret_key': s3_secret_key,
        'azure_account': azure_account,
        'azure_key': azure_key
    }
    return http.put(cu.api_url("/backup/start"),
                    json=req,
                    headers={'Content-Type': 'application/json'})
def status():
    return cu.to_json(http.get(cu.api_url("/plan"), headers={}))
Пример #5
0
def status():
    return cu.to_json(http.get(cu.api_url("/plan"), headers={}))
Пример #6
0
def connection_dns():
    return cu.to_json(http.get(cu.api_url("/nodes/connect/dns"),
                               headers={}))
Пример #7
0
def replace(id):
    url = "/nodes/replace?node=node-{}".format(str(id))
    response = http.put(cu.api_url(url), headers={})
    return response.status_code % 200 < 100
Пример #8
0
def status(id):
    url = "/nodes/node-{}/status".format(str(id))
    return cu.to_json(http.get(cu.api_url(url), headers={}))
Пример #9
0
def describe(id):
    url = "/nodes/node-{}/info".format(str(id))
    return cu.to_json(http.get(cu.api_url(url), headers={}))
Пример #10
0
def list():
    return cu.to_json(http.get(cu.api_url("/nodes/list"), headers={}))
Пример #11
0
def seeds():
    seeds_url = cu.api_url("/seeds")
    return cu.to_json(http.get(seeds_url, headers={}))
Пример #12
0
def connection_dns():
    return cu.to_json(http.get(cu.api_url("/nodes/connect/dns"), headers={}))
Пример #13
0
def replace(id):
    url = "/nodes/replace?node=node-{}".format(str(id))
    response = http.put(cu.api_url(url), headers={})
    return response.status_code % 200 < 100
Пример #14
0
def status(id):
    url = "/nodes/node-{}/status".format(str(id))
    return cu.to_json(http.get(cu.api_url(url), headers={}))
Пример #15
0
def describe(id):
    url = "/nodes/node-{}/info".format(str(id))
    return cu.to_json(http.get(cu.api_url(url), headers={}))
Пример #16
0
def list():
    return cu.to_json(http.get(cu.api_url("/nodes/list"), headers={}))