XOS watcher changes to handle routing table updates inside instances
Change-Id: I931da3e21182ff79c86be778bf91ef9854535273
diff --git a/xos/synchronizer/exampleservice_config b/xos/synchronizer/exampleservice_config
index 7e59fdd..604def0 100644
--- a/xos/synchronizer/exampleservice_config
+++ b/xos/synchronizer/exampleservice_config
@@ -21,4 +21,5 @@
backoff_disabled=True
save_ansible_output=True
proxy_ssh=False
+enable_watchers=True
diff --git a/xos/synchronizer/steps/sync_exampletenant.py b/xos/synchronizer/steps/sync_exampletenant.py
index fbde96f..8b969a1 100644
--- a/xos/synchronizer/steps/sync_exampletenant.py
+++ b/xos/synchronizer/steps/sync_exampletenant.py
@@ -1,6 +1,7 @@
import os
import sys
from django.db.models import Q, F
+from core.models import ModelLink, CoarseTenant
from services.exampleservice.models import ExampleService, ExampleTenant
from synchronizers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
@@ -19,6 +20,8 @@
service_key_name = "/opt/xos/synchronizers/exampleservice/exampleservice_private_key"
+ watches = [ModelLink(CoarseTenant,via='coarsetenant')]
+
def __init__(self, *args, **kwargs):
super(SyncExampleTenant, self).__init__(*args, **kwargs)