Beispiel #1
0
def unreserve_resources(role):
    """ Unreserves all the resources for all the slaves for the role.
    """
    state = dcos_agents_state()
    if not state or 'slaves' not in state.keys():
        return False
    all_success = True
    for agent in state['slaves']:
        if not unreserve_resource(agent, role):
            all_success = False
    return all_success
Beispiel #2
0
def unreserve_resources(role):
    """ Unreserves all the resources for all the slaves for the role.
    """
    state = dcos_agents_state()
    if not state or 'slaves' not in state.keys():
        return False
    all_success = True
    for agent in state['slaves']:
        if not unreserve_resource(agent, role):
            all_success = False
    return all_success
Beispiel #3
0
def destroy_volumes(role):
    """ Destroys all volumes on all the slaves in the cluster for the role.
    """
    state = dcos_agents_state()
    if not state or 'slaves' not in state.keys():
        return False
    all_success = True
    for agent in state['slaves']:
        if not destroy_volume(agent, role):
            all_success = False
    return all_success
Beispiel #4
0
def destroy_volumes(role):
    """ Destroys all volumes on all the slaves in the cluster for the role.
    """
    state = dcos_agents_state()
    if not state or 'slaves' not in state.keys():
        return False
    all_success = True
    for agent in state['slaves']:
        if not destroy_volume(agent, role):
            all_success = False
    return all_success