[CORD-1360] Using new config

Change-Id: Ibd6a019815dc86e3e4566c31ee46860dfa04167b
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..485dee6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.idea
diff --git a/xos/attic/header.py b/xos/attic/header.py
index c51df3e..802b6b9 100644
--- a/xos/attic/header.py
+++ b/xos/attic/header.py
@@ -11,7 +11,6 @@
 from services.vrouter.models import VRouterService, VRouterTenant
 import traceback
 from xos.exceptions import *
-from xos.config import Config
 from django.contrib.contenttypes.models import ContentType
 
 class ConfigurationError(Exception):
diff --git a/xos/header.py b/xos/header.py
index 91b13e7..db6f030 100755
--- a/xos/header.py
+++ b/xos/header.py
@@ -11,7 +11,6 @@
 from services.vrouter.models import VRouterService, VRouterTenant
 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 14777d6..40577c2 100755
--- a/xos/synchronizer/run-from-api.sh
+++ b/xos/synchronizer/run-from-api.sh
@@ -1,2 +1 @@
-export XOS_DIR=/opt/xos
-python vcpe-synchronizer.py  -C $XOS_DIR/synchronizers/vsg/vsg_from_api_config
+python vcpe-synchronizer.py
diff --git a/xos/synchronizer/steps/sync_vcpetenant.py b/xos/synchronizer/steps/sync_vcpetenant.py
index 6edb55e..5c45cf3 100644
--- a/xos/synchronizer/steps/sync_vcpetenant.py
+++ b/xos/synchronizer/steps/sync_vcpetenant.py
@@ -5,7 +5,6 @@
 import base64
 import time
 from urlparse import urlparse
-from xos.config import Config
 from synchronizers.new_base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
 from synchronizers.new_base.modelaccessor import *
 from synchronizers.new_base.ansible_helper import run_template_ssh
@@ -69,10 +68,7 @@
             s_tags.append(o.volt.s_tag)
             c_tags.append(o.volt.c_tag)
 
-        try:
-            full_setup = Config().observer_full_setup
-        except:
-            full_setup = True
+        full_setup = True
 
         safe_macs=[]
         if vcpe_service.url_filter_kind == "safebrowsing":
diff --git a/xos/synchronizer/vcpe-synchronizer.py b/xos/synchronizer/vcpe-synchronizer.py
index 26b44df..f2c7ce2 100755
--- a/xos/synchronizer/vcpe-synchronizer.py
+++ b/xos/synchronizer/vcpe-synchronizer.py
@@ -5,6 +5,12 @@
 import importlib
 import os
 import sys
+from xosconfig import Config
+
+config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/vsg_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/vsg_config.yaml b/xos/synchronizer/vsg_config.yaml
new file mode 100644
index 0000000..3c97239
--- /dev/null
+++ b/xos/synchronizer/vsg_config.yaml
@@ -0,0 +1,7 @@
+name: vsg-synchronizer
+accessor:
+  username: xosadmin@opencord.org
+  password: "@/opt/xos/services/vsg/credentials/xosadmin@opencord.org"
+dependency_graph: "/opt/xos/synchronizers/vsg/model-deps"
+steps_dir: "/opt/xos/synchronizers/vsg/steps"
+sys_dir: "/opt/xos/synchronizers/vsg/sys"
\ No newline at end of file