Example #1
0
def get_flow_traces(tr):
    rows = cassandra.execute(
        """SELECT flowtraceid FROM midonetflowtracing.flows
           WHERE tracerequestid = %s""",
        [UUID(tr)],
    )
    return [str(r.flowtraceid) for r in rows]
Example #2
0
def get_hosts(tr, flowtraceid):
    rows = cassandra.execute(
        """SELECT host FROM midonetflowtracing.flow_events
           WHERE tracerequestid = %s AND flowtraceid = %s""",
        [UUID(tr), UUID(flowtraceid)])
    hosts = set()
    for r in rows:
        hosts.add(r.host)
    return hosts
Example #3
0
def get_hosts(tr, flowtraceid):
    rows = cassandra.execute(
        """SELECT host FROM midonetflowtracing.flow_events
           WHERE tracerequestid = %s AND flowtraceid = %s""",
        [UUID(tr), UUID(flowtraceid)])
    hosts = set()
    for r in rows:
        hosts.add(r.host)
    return hosts
Example #4
0
def get_flow_traces(tr):
    rows = cassandra.execute(
        """SELECT flowtraceid FROM midonetflowtracing.flows
           WHERE tracerequestid = %s""", [UUID(tr)])
    return [str(r.flowtraceid) for r in rows]