CORD-1677: Supporting code for synchronizer-core refactor

Change-Id: I058a883503d9019cab84f56277d32de890389221
diff --git a/containers/xos/pip_requirements.txt b/containers/xos/pip_requirements.txt
index 9a5956b..ac8bdb5 100644
--- a/containers/xos/pip_requirements.txt
+++ b/containers/xos/pip_requirements.txt
@@ -87,6 +87,7 @@
 ndg-httpsclient==0.4.2
 netaddr==0.7.18
 netifaces==0.10.5
+networkx==1.11
 nose==1.3.7
 oauth2client==3.0.0
 openapi-codec==1.0.0
diff --git a/xos/coreapi/orm.py b/xos/coreapi/orm.py
index 1ee84b5..7f1ec68 100644
--- a/xos/coreapi/orm.py
+++ b/xos/coreapi/orm.py
@@ -48,6 +48,7 @@
         super(ORMWrapper, self).__setattr__("_wrapped_class", wrapped_class)
         super(ORMWrapper, self).__setattr__("stub", stub)
         super(ORMWrapper, self).__setattr__("cache", {})
+        super(ORMWrapper, self).__setattr__("synchronizer_step", None)
         super(ORMWrapper, self).__setattr__("reverse_cache", {})
         super(ORMWrapper, self).__setattr__("is_new", is_new)
         fkmap=self.gen_fkmap()
diff --git a/xos/synchronizers/new_base/diag.py b/xos/synchronizers/new_base/diag.py
index 547825c..900af73 100644
--- a/xos/synchronizers/new_base/diag.py
+++ b/xos/synchronizers/new_base/diag.py
@@ -24,7 +24,7 @@
 
 
 def update_diag(diag_class, loop_end=None, loop_start=None, syncrecord_start=None, sync_start=None,
-                backend_status=None):
+                backend_status=None, backend_code=0):
     observer_name = Config.get("name")
 
     try:
diff --git a/xos/synchronizers/new_base/modelaccessor.py b/xos/synchronizers/new_base/modelaccessor.py
index 303b1a8..b53d9d8 100644
--- a/xos/synchronizers/new_base/modelaccessor.py
+++ b/xos/synchronizers/new_base/modelaccessor.py
@@ -90,10 +90,10 @@
         """ Return the current time for timestamping purposes """
         raise Exception("Not Implemented")
 
-    def update_diag(self, loop_end=None, loop_start=None, syncrecord_start=None, sync_start=None, backend_status=None):
+    def update_diag(self, loop_end=None, loop_start=None, syncrecord_start=None, sync_start=None, backend_status=None, backend_code=0):
         if self.has_model_class("Diag"):
             return update_diag(self.get_model_class("Diag"), loop_end, loop_start, syncrecord_start, sync_start,
-                               backend_status)
+                               backend_status,backend_code=0)
 
     def is_type(self, obj, name):
         """ returns True is obj is of model type "name" """
diff --git a/xos/xos_client/xosapi/orm.py b/xos/xos_client/xosapi/orm.py
index 0c28321..84abb3e 100644
--- a/xos/xos_client/xosapi/orm.py
+++ b/xos/xos_client/xosapi/orm.py
@@ -48,6 +48,7 @@
         super(ORMWrapper, self).__setattr__("stub", stub)
         super(ORMWrapper, self).__setattr__("cache", {})
         super(ORMWrapper, self).__setattr__("reverse_cache", {})
+        super(ORMWrapper, self).__setattr__("synchronizer_step", None)
         super(ORMWrapper, self).__setattr__("poisoned", {})
         super(ORMWrapper, self).__setattr__("is_new", is_new)
         fkmap=self.gen_fkmap()