Ejemplo n.º 1
0
    def fetch_pending(self, deleted):
        if (not deleted):
            objs = VBNGTenant.get_tenant_objects().filter(Q(enacted__lt=F('updated')) | Q(enacted=None),Q(lazy_blocked=False))
        else:
            objs = VBNGTenant.get_deleted_tenant_objects()

        return objs
Ejemplo n.º 2
0
    def fetch_pending(self, deleted):
        if (not deleted):
            objs = VBNGTenant.get_tenant_objects().filter(Q(enacted__lt=F('updated')) | Q(enacted=None),Q(lazy_blocked=False))
        else:
            objs = VBNGTenant.get_deleted_tenant_objects()

        return objs
Ejemplo n.º 3
0
    def get_vbng_mapping(self, request):
        object_list = VBNGTenant.get_tenant_objects().all()

        mappings = []
        for vbng in object_list:
            if vbng.mapped_ip and vbng.routeable_subnet:
                mappings.append( {"private_ip": vbng.mapped_ip, "routeable_subnet": vbng.routeable_subnet, "mac": vbng.mapped_mac, "hostname": vbng.mapped_hostname} )

        return Response( {"vbng_mapping": mappings} )
Ejemplo n.º 4
0
    def get_vbng_mapping(self, request):
        object_list = VBNGTenant.get_tenant_objects().all()

        mappings = []
        for vbng in object_list:
            if vbng.mapped_ip and vbng.routeable_subnet:
                mappings.append({
                    "private_ip": vbng.mapped_ip,
                    "routeable_subnet": vbng.routeable_subnet,
                    "mac": vbng.mapped_mac,
                    "hostname": vbng.mapped_hostname
                })

        return Response({"vbng_mapping": mappings})