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]
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
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]