def get_prios(self): ''' Get all priorities for a given domain. ''' sf = Flow.filter(self.rd, domain=self.domain.name) return sorted(set(s['priority'] for s in sf))
def get_flows(self, **condition): """all flows under this domain """ flows = Flow.filter(self.rd, domain=self.domain.name, priority=self.prio, **condition) return flows
def get_all_flows(self): '''get all flow ids''' return Flow.filter(self.rd)