CORD-714
parameterize node_key path
Change-Id: Ie4b826f82dfe5430577508458b4a62e821624ade
diff --git a/xos/synchronizers/base/SyncInstanceUsingAnsible.py b/xos/synchronizers/base/SyncInstanceUsingAnsible.py
index f5ce1a6..bb7eee5 100644
--- a/xos/synchronizers/base/SyncInstanceUsingAnsible.py
+++ b/xos/synchronizers/base/SyncInstanceUsingAnsible.py
@@ -80,7 +80,7 @@
return o.node
def get_node_key(self, node):
- return "/root/setup/node_key"
+ return getattr(Config(), "observer_node_key", "/opt/cord_profile/node_key")
def get_key_name(self, instance):
if instance.isolation=="vm":
diff --git a/xos/synchronizers/onboarding/onboarding_synchronizer_config b/xos/synchronizers/onboarding/onboarding_synchronizer_config
index 6c08c57..fb33044 100644
--- a/xos/synchronizers/onboarding/onboarding_synchronizer_config
+++ b/xos/synchronizers/onboarding/onboarding_synchronizer_config
@@ -31,4 +31,5 @@
backoff_disabled=True
pretend=False
save_ansible_output=True
+node_key=/opt/cord_profile/node_key
diff --git a/xos/xos_configuration/xos_common_config b/xos/xos_configuration/xos_common_config
index beede12..c1c171c 100755
--- a/xos/xos_configuration/xos_common_config
+++ b/xos/xos_configuration/xos_common_config
@@ -37,6 +37,7 @@
images_directory=/opt/xos/images
dependency_graph=/opt/xos/model-deps
logfile=/var/log/xos_backend.log
+node_key=/opt/cord_profile/node_key
[gui]
disable_minidashboard=True