[CORD-1360] Using new config

Change-Id: I620da81a1e9babb88133bc8de35de98fbd8c67aa
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..723ef36
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.idea
\ No newline at end of file
diff --git a/xos/synchronizer/exampleservice-synchronizer.py b/xos/synchronizer/exampleservice-synchronizer.py
index aafdb44..0257219 100644
--- a/xos/synchronizer/exampleservice-synchronizer.py
+++ b/xos/synchronizer/exampleservice-synchronizer.py
@@ -5,6 +5,10 @@
 import importlib
 import os
 import sys
+from xosconfig import Config
+
+config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/exampleservice_config.yaml')
+Config.init(config_file, 'synchronizer-config-schema.yaml')
 
 synchronizer_path = os.path.join(os.path.dirname(
     os.path.realpath(__file__)), "../../synchronizers/new_base")
diff --git a/xos/synchronizer/exampleservice_config.yaml b/xos/synchronizer/exampleservice_config.yaml
new file mode 100644
index 0000000..cda8fb9
--- /dev/null
+++ b/xos/synchronizer/exampleservice_config.yaml
@@ -0,0 +1,12 @@
+name: exampleservice-synchronizer
+accessor:
+  username: xosadmin@opencord.org
+  password: "@/opt/xos/services/exampleservice/credentials/xosadmin@opencord.org"
+required_models:
+  - ExampleService
+  - ExampleTenant
+  - ServiceDependency
+  - ServiceMonitoringAgentInfo
+dependency_graph: "/opt/xos/synchronizers/exampleservice/model-deps"
+steps_dir: "/opt/xos/synchronizers/exampleservice/steps"
+sys_dir: "/opt/xos/synchronizers/exampleservice/sys"
\ No newline at end of file
diff --git a/xos/synchronizer/exampleservice_from_api_config b/xos/synchronizer/exampleservice_from_api_config
deleted file mode 100644
index bb76435..0000000
--- a/xos/synchronizer/exampleservice_from_api_config
+++ /dev/null
@@ -1,19 +0,0 @@
-# Sets options for the synchronizer
-[observer]
-name=exampleservice
-dependency_graph=/opt/xos/synchronizers/exampleservice/model-deps
-steps_dir=/opt/xos/synchronizers/exampleservice/steps
-sys_dir=/opt/xos/synchronizers/exampleservice/sys
-#logfile=/var/log/xos_backend.log
-log_file=console
-log_level=debug
-pretend=False
-backoff_disabled=True
-save_ansible_output=True
-proxy_ssh=True
-proxy_ssh_key=/opt/cord_profile/node_key
-proxy_ssh_user=root
-enable_watchers=True
-accessor_kind=api
-accessor_password=@/opt/xos/services/exampleservice/credentials/xosadmin@opencord.org
-required_models=ExampleService, ExampleTenant, ServiceDependency, ServiceMonitoringAgentInfo
diff --git a/xos/synchronizer/run-from-api.sh b/xos/synchronizer/run-from-api.sh
index 1245084..9616890 100755
--- a/xos/synchronizer/run-from-api.sh
+++ b/xos/synchronizer/run-from-api.sh
@@ -1,2 +1 @@
-export XOS_DIR=/opt/xos
-python exampleservice-synchronizer.py  -C $XOS_DIR/synchronizers/exampleservice/exampleservice_from_api_config
+python exampleservice-synchronizer.py