Bug fixes
diff --git a/xos/synchronizers/fabric/steps/sync_vroutertenant.py b/xos/synchronizers/fabric/steps/sync_vroutertenant.py
index d61a44b..f17dbfa 100644
--- a/xos/synchronizers/fabric/steps/sync_vroutertenant.py
+++ b/xos/synchronizers/fabric/steps/sync_vroutertenant.py
@@ -14,7 +14,7 @@
from services.fabric.models import FabricService
import json
-class SyncVSGTenant(SyncStep):
+class SyncVRouterTenant(SyncStep):
provides=[VRouterTenant]
observes = VRouterTenant
requested_interval=30
@@ -37,7 +37,9 @@
def fetch_pending(self, deleted):
fs = FabricService.get_service_objects().all()[0]
if not fs.autoconfig:
- return None
+ retur
+
+n None
if (not deleted):
objs = VRouterTenant.get_tenant_objects().filter(Q(lazy_blocked=False))
@@ -64,13 +66,13 @@
if (sub.kind == 'vCPE'):
instance_id = sub.get_attribute("instance_id")
if instance_id:
- instance = Instance.objects.filter(id=instance_id)
+ instance = Instance.objects.filter(id=instance_id)[0]
name = str(sub)
else:
# Maybe the VRouterTenant is for an instance
instance_id = vroutertenant.get_attribute("tenant_for_instance_id")
if instance_id:
- instance = Instance.objects.filter(id=instance_id)
+ instance = Instance.objects.filter(id=instance_id)[0]
name = str(instance)
node = instance.node