예제 #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
예제 #2
0
파일: service.py 프로젝트: dcos/shakedown
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
예제 #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
예제 #4
0
파일: service.py 프로젝트: dcos/shakedown
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