Adding serial_number information to OLTDevice

Change-Id: Ied682803092f0538cf5beaf59dcaeedd65be14c5
diff --git a/xos/synchronizer/steps/sync_olt_device.py b/xos/synchronizer/steps/sync_olt_device.py
index 301f123..1140173 100644
--- a/xos/synchronizer/steps/sync_olt_device.py
+++ b/xos/synchronizer/steps/sync_olt_device.py
@@ -84,7 +84,9 @@
             raise Exception(
                 'VOLTHA Device Id is empty. This probably means that the OLT device is already provisioned in VOLTHA')
         else:
-            model.device_id = res['id'];
+            model.device_id = res['id']
+            model.serial_number = res['serial_number']
+
 
         return model
 
diff --git a/xos/synchronizer/steps/test_sync_olt_device.py b/xos/synchronizer/steps/test_sync_olt_device.py
index dd3f249..3b7e6cb 100644
--- a/xos/synchronizer/steps/test_sync_olt_device.py
+++ b/xos/synchronizer/steps/test_sync_olt_device.py
@@ -122,6 +122,8 @@
 
         self.o = o
 
+        self.voltha_devices_response = {"id": "123", "serial_number": "foobar"}
+
     def tearDown(self):
         self.o = None
         sys.path = self.sys_path_save
@@ -172,7 +174,7 @@
         """
         Should print an error if device.enable fails
         """
-        m.post("http://voltha_url:1234/api/v1/devices", status_code=200, json={"id": "123"})
+        m.post("http://voltha_url:1234/api/v1/devices", status_code=200, json=self.voltha_devices_response)
         m.post("http://voltha_url:1234/api/v1/devices/123/enable", status_code=500, text="EnableError")
 
         with self.assertRaises(Exception) as e:
@@ -191,7 +193,7 @@
             "host_and_port": "%s:%s" % (self.o.host, self.o.port)
         }
 
-        m.post("http://voltha_url:1234/api/v1/devices", status_code=200, json={"id": "123"}, additional_matcher=functools.partial(match_json, expected_conf))
+        m.post("http://voltha_url:1234/api/v1/devices", status_code=200, json=self.voltha_devices_response, additional_matcher=functools.partial(match_json, expected_conf))
         m.post("http://voltha_url:1234/api/v1/devices/123/enable", status_code=200)
         m.get("http://voltha_url:1234/api/v1/devices/123", json={"oper_status": "ACTIVE", "admin_state": "ENABLED"})
         logical_devices = {
@@ -247,7 +249,7 @@
         m.post("http://onos:4321/onos/v1/network/configuration/", status_code=200, json=onos_expected_conf,
                additional_matcher=functools.partial(match_json, onos_expected_conf))
 
-        m.post("http://voltha_url:1234/api/v1/devices", status_code=200, json={"id": "123"},
+        m.post("http://voltha_url:1234/api/v1/devices", status_code=200, json=self.voltha_devices_response,
                additional_matcher=functools.partial(match_json, expected_conf))
         m.post("http://voltha_url:1234/api/v1/devices/123/enable", status_code=200)
         m.get("http://voltha_url:1234/api/v1/devices/123", json={"oper_status": "ACTIVE", "admin_state": "ENABLED"})
@@ -276,7 +278,7 @@
             "host_and_port": "%s:%s" % (self.o.host, self.o.port)
         }
 
-        m.post("http://voltha_url:1234/api/v1/devices", status_code=200, json={"id": "123"},
+        m.post("http://voltha_url:1234/api/v1/devices", status_code=200, json=self.voltha_devices_response,
                additional_matcher=functools.partial(match_json, expected_conf))
         m.post("http://voltha_url:1234/api/v1/devices/123/enable", status_code=200)
         m.get("http://voltha_url:1234/api/v1/devices/123", [