[CORD-1360] Using new config
Change-Id: I1d5990c5147f6404c0fb2440122c88127ef4734b
diff --git a/xos/attic/header.py b/xos/attic/header.py
index 9e3b924..fe900d8 100644
--- a/xos/attic/header.py
+++ b/xos/attic/header.py
@@ -7,7 +7,6 @@
from django.forms.models import model_to_dict
import traceback
from xos.exceptions import *
-from xos.config import Config
class ConfigurationError(Exception):
pass
diff --git a/xos/synchronizer/run-from-api.sh b/xos/synchronizer/run-from-api.sh
index 4744fc4..9845c8d 100755
--- a/xos/synchronizer/run-from-api.sh
+++ b/xos/synchronizer/run-from-api.sh
@@ -1,2 +1 @@
-export XOS_DIR=/opt/xos
-python vtn-synchronizer.py -C $XOS_DIR/synchronizers/vtn/vtn_from_api_config
+python vtn-synchronizer.py
diff --git a/xos/synchronizer/steps/sync_port_addresses.py b/xos/synchronizer/steps/sync_port_addresses.py
index 029755b..e9152dc 100644
--- a/xos/synchronizer/steps/sync_port_addresses.py
+++ b/xos/synchronizer/steps/sync_port_addresses.py
@@ -3,7 +3,6 @@
import socket
import sys
import base64
-from xos.config import Config
from synchronizers.new_base.syncstep import SyncStep
from synchronizers.new_base.modelaccessor import *
from xos.logger import Logger, logging
diff --git a/xos/synchronizer/steps/sync_vtn_service.py b/xos/synchronizer/steps/sync_vtn_service.py
index 6db26f8..7b7aedb 100644
--- a/xos/synchronizer/steps/sync_vtn_service.py
+++ b/xos/synchronizer/steps/sync_vtn_service.py
@@ -3,7 +3,6 @@
import socket
import sys
import base64
-from xos.config import Config
from services.vtn.vtnnetport import VTNNetwork, VTNPort
from synchronizers.new_base.syncstep import SyncStep
from synchronizers.new_base.modelaccessor import *
diff --git a/xos/synchronizer/vtn-synchronizer.py b/xos/synchronizer/vtn-synchronizer.py
index fb12cbc..9855c72 100755
--- a/xos/synchronizer/vtn-synchronizer.py
+++ b/xos/synchronizer/vtn-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__)) + '/vtn_config.yaml')
+Config.init(config_file, 'synchronizer-config-schema.yaml')
+
sys.path.append('/opt/xos')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings")
diff --git a/xos/synchronizer/vtn_config.yaml b/xos/synchronizer/vtn_config.yaml
new file mode 100644
index 0000000..6f5886b
--- /dev/null
+++ b/xos/synchronizer/vtn_config.yaml
@@ -0,0 +1,7 @@
+name: vtn-synchronizer
+accessor:
+ username: xosadmin@opencord.org
+ password: "@/opt/xos/services/vtn/credentials/xosadmin@opencord.org"
+dependency_graph: "/opt/xos/synchronizers/vtn/model-deps"
+steps_dir: "/opt/xos/synchronizers/vtn/steps"
+sys_dir: "/opt/xos/synchronizers/vtn/sys"
\ No newline at end of file