def slaves_attr_usage():
    slaves_state = mesos.get_mesos_slaves()
    result = mesos.get_attr_usage(slaves_state, dict(request.args.items()))
    return Response(dumps(result), mimetype='application/json')
def attrs():
    slaves_state = mesos.get_mesos_slaves()
    return Response(dumps(mesos.get_slaves_attr(slaves_state)),
                    mimetype='application/json')
Exemplo n.º 3
0
def attrs():
    config.logger.debug("Reading attrs")
    slaves_state = mesos.get_mesos_slaves()
    return Response(dumps(mesos.get_slaves_attr(slaves_state)),
                    mimetype='application/json')
Exemplo n.º 4
0
def slaves_with_attrs_count():
    slaves_state = mesos.get_mesos_slaves()
    result = mesos.get_slaves_with_attr(slaves_state,
                                        dict(request.args.items()))
    return Response(dumps({'total_slaves': len(result)}),
                    mimetype='application/json')
Exemplo n.º 5
0
def attrs_count():
    config.logger.debug("Counting attrs")
    slaves_state = mesos.get_mesos_slaves()
    slaves_attrs = mesos.get_slaves_attr(slaves_state)
    return Response(dumps({'total_attrs': len(slaves_attrs.keys())}),
                    mimetype='application/json')