コード例 #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
コード例 #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]
コード例 #3
0
ファイル: sync_sflowtenant.py プロジェクト: albertoflorez/xos
    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]