Esempio n. 1
0
    def fetch_pending(self, deleted):
        if (not deleted):
            objs = SFlowService.get_service_objects().filter(Q(enacted__lt=F('updated')) | Q(enacted=None),Q(lazy_blocked=False))
        else:
            objs = SFlowService.get_deleted_service_objects()

        return objs
Esempio n. 2
0
    def get_sflow_service(self, o):
        sflows = SFlowService.get_service_objects().filter(
            id=o.provider_service.id)
        if not sflows:
            raise "No associated SFlow service"

        return sflows[0]
Esempio n. 3
0
    def get_sflow_service(self, o):
        sflows = SFlowService.get_service_objects().filter(id=o.provider_service.id)
        if not sflows:
           raise "No associated SFlow service"

        return sflows[0]