CORD-1520 Update to new Service/Tenancy models
Change-Id: I54a60c9af962aa6fa9216b2d844b03e529a8b984
diff --git a/xos/synchronizer/steps/sync_vcpetenant.py b/xos/synchronizer/steps/sync_vcpetenant.py
index d3b0f11..79aca2c 100644
--- a/xos/synchronizer/steps/sync_vcpetenant.py
+++ b/xos/synchronizer/steps/sync_vcpetenant.py
@@ -29,10 +29,10 @@
super(SyncVSGTenant, self).__init__(*args, **kwargs)
def get_vcpe_service(self, o):
- if not o.provider_service:
+ if not o.owner:
return None
- vcpes = VSGService.objects.filter(id=o.provider_service.id)
+ vcpes = VSGService.objects.filter(id=o.owner.id)
if not vcpes:
return None
@@ -147,7 +147,7 @@
objs = VSGTenant.objects.all()
for obj in objs:
- if obj.provider_service.id != monitoring_agent_info.service.id:
+ if obj.owner.id != monitoring_agent_info.service.id:
logger.info("handle watch notifications for service monitoring agent info...ignoring because service attribute in monitoring agent info:%s is not matching" % (monitoring_agent_info))
return