[CORD-1360] Using new config

Change-Id: I33eab3001c339a9550d0d296e43dbc1eedf4e9f5
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/fabric-synchronizer.py b/xos/synchronizer/fabric-synchronizer.py
index 26b44df..1c45faa 100755
--- a/xos/synchronizer/fabric-synchronizer.py
+++ b/xos/synchronizer/fabric-synchronizer.py
@@ -5,6 +5,11 @@
 import importlib
 import os
 import sys
+from xosconfig import Config
+
+config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/fabric_config.yaml')
+Config.init(config_file, 'synchronizer-config-schema.yaml')
+
 observer_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),"../../synchronizers/new_base")
 sys.path.append(observer_path)
 mod = importlib.import_module("xos-synchronizer")
diff --git a/xos/synchronizer/fabric_config.yaml b/xos/synchronizer/fabric_config.yaml
new file mode 100644
index 0000000..4fdedb5
--- /dev/null
+++ b/xos/synchronizer/fabric_config.yaml
@@ -0,0 +1,7 @@
+name: fabric-synchronizer
+accessor:
+  username: xosadmin@opencord.org
+  password: "@/opt/xos/services/fabric/credentials/xosadmin@opencord.org"
+dependency_graph: "/opt/xos/synchronizers/fabric/model-deps"
+steps_dir: "/opt/xos/synchronizers/fabric/steps"
+sys_dir: "/opt/xos/synchronizers/fabric/sys"
\ No newline at end of file
diff --git a/xos/synchronizer/fabric_from_api_config b/xos/synchronizer/fabric_from_api_config
deleted file mode 100644
index 1c86b6d..0000000
--- a/xos/synchronizer/fabric_from_api_config
+++ /dev/null
@@ -1,20 +0,0 @@
-# Sets options for the synchronizer
-[observer]
-name=fabric
-dependency_graph=/opt/xos/synchronizers/fabric/model-deps
-steps_dir=/opt/xos/synchronizers/fabric/steps
-sys_dir=/opt/xos/synchronizers/fabric/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
-accessor_kind=api
-accessor_password=@/opt/xos/services/fabric/credentials/xosadmin@opencord.org
-
-[networking]
-use_vtn=True
diff --git a/xos/synchronizer/run-from-api.sh b/xos/synchronizer/run-from-api.sh
index 03f8301..af50ebf 100755
--- a/xos/synchronizer/run-from-api.sh
+++ b/xos/synchronizer/run-from-api.sh
@@ -1,2 +1 @@
-export XOS_DIR=/opt/xos
-python fabric-synchronizer.py  -C $XOS_DIR/synchronizers/fabric/fabric_from_api_config
+python fabric-synchronizer.py
diff --git a/xos/synchronizer/steps/sync_vroutertenant.py b/xos/synchronizer/steps/sync_vroutertenant.py
index d549289..d8d99a9 100644
--- a/xos/synchronizer/steps/sync_vroutertenant.py
+++ b/xos/synchronizer/steps/sync_vroutertenant.py
@@ -1,7 +1,6 @@
 import os
 import base64
 from collections import defaultdict
-from xos.config import Config
 from synchronizers.new_base.syncstep import SyncStep, DeferredException
 from synchronizers.new_base.modelaccessor import *
 from xos.logger import observer_logger as logger