def get_vbng_service(self, o):
        if not o.provider_service:
             raise Exception("vBNG tenant %s has no provider_service" % str(o.id))
        services = VBNGService.get_service_objects().filter(id = o.provider_service.id)
        if not services:
             raise Exception("vBNG tenant %s is associated with the wrong kind of provider_service" % str(o.id))
        return services[0]
dataset/ETHPy150Open open-cloud/xos/xos/synchronizers/vbng/steps/sync_vbngtenant.py/SyncVBNGTenant.get_vbng_service/original