[SEBA-80] Listening for authentication.events

Change-Id: Ibc9a4379072b40d1b25791bc3af8d57dc708efbe
diff --git a/xos/synchronizer/models/rcord.xproto b/xos/synchronizer/models/rcord.xproto
index a8974bc..3e7391a 100644
--- a/xos/synchronizer/models/rcord.xproto
+++ b/xos/synchronizer/models/rcord.xproto
@@ -22,7 +22,7 @@
     optional bool cdn_enable = 6 [default = False, null = False, db_index = False, blank = True];
     optional int32 uplink_speed = 8 [default = 1000000000, null = False, db_index = False, blank = False];
     optional int32 downlink_speed = 9 [default = 1000000000, null = False, db_index = False, blank = False];
-    optional string status = 11 [default = "enabled", choices = "(('enabled', 'Enabled'), ('disabled', 'Disabled'), ('pre-provisioned', 'Pre Provisioned'), ('awaiting-auth', 'Awaiting Authentication'))", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
+    optional string status = 11 [default = "enabled", choices = "(('enabled', 'Enabled'), ('disabled', 'Disabled'), ('pre-provisioned', 'Pre Provisioned'), ('awaiting-auth', 'Awaiting Authentication'), ('auth-failed', 'Authentication Failed'))", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
 
     // parameters for r-cord lite
     optional int32 c_tag = 12 [null = True, db_index = False, blank = False];
diff --git a/xos/synchronizer/models/test_models.py b/xos/synchronizer/models/test_models.py
index 1f7186a..bbbbd18 100644
--- a/xos/synchronizer/models/test_models.py
+++ b/xos/synchronizer/models/test_models.py
@@ -13,8 +13,16 @@
 # limitations under the License.
 
 import unittest
+import os, sys
 from mock import patch, Mock, MagicMock
 
+test_path=os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
+service_dir=os.path.join(test_path, "../../../..")
+xos_dir=os.path.join(test_path, "../../..")
+if not os.path.exists(os.path.join(test_path, "new_base")):
+    xos_dir=os.path.join(test_path, "../../../../../../orchestration/xos/xos")
+    services_dir=os.path.join(xos_dir, "../../xos_services")
+
 # mocking XOS exception, as they're based in Django
 class Exceptions:
     XOSValidationError = Exception
@@ -26,6 +34,10 @@
 
 class TestRCORDModels(unittest.TestCase):
     def setUp(self):
+
+        self.sys_path_save = sys.path
+        sys.path.append(xos_dir)
+
         self.xos = XOS
 
         self.models_decl = Mock()
@@ -59,6 +71,8 @@
         self.rcord_subscriber.owner.leaf_model.access = "voltha"
         self.rcord_subscriber.owner.provider_services = [self.volt]
 
+    def tearDown(self):
+        sys.path = self.sys_path_save
 
     def test_save(self):
         self.rcord_subscriber.save()
diff --git a/xos/synchronizer/test_config.yaml b/xos/synchronizer/test_config.yaml
index 270d0a9..3f7046a 100644
--- a/xos/synchronizer/test_config.yaml
+++ b/xos/synchronizer/test_config.yaml
@@ -28,3 +28,4 @@
     'multistructlog':
       handlers:
           - console
+      # level: DEBUG
diff --git a/xos/unittest.cfg b/xos/unittest.cfg
index 9a7a380..27f75a5 100644
--- a/xos/unittest.cfg
+++ b/xos/unittest.cfg
@@ -3,7 +3,7 @@
 code-directories=synchronizer
                  model_policies
                  steps
-                 pull_steps
+                 models
 
 [coverage]
 always-on = True