olt reboot, reconnect redesign changes

Change-Id: I512229bd7f8061eaab91a38a7527efb25c2b4726

olt reconnect reboot redesgin changes

Change-Id: I14ef7aac972fb5e3a00e87135f22dba3012594a2
diff --git a/rw_core/test/core_nbi_handler_multi_test.go b/rw_core/test/core_nbi_handler_multi_test.go
index 6f5a37e..f6a2ec7 100755
--- a/rw_core/test/core_nbi_handler_multi_test.go
+++ b/rw_core/test/core_nbi_handler_multi_test.go
@@ -1156,6 +1156,18 @@
 	err = waitUntilDeviceReadiness(oltDevice.Id, nb.maxTimeout, vlFunction0, nbi)
 	assert.Nil(t, err)
 
+	oltAdapter, err := nb.getOLTAdapterInstance(t, nbi, oltDevice.Id)
+	assert.Nil(t, err)
+
+	oltAdapter.SetDeviceRebooted(oltDevice.Id)
+
+	var vlFunctionreb = func(d *voltha.Device) bool {
+		return d.ConnectStatus == voltha.ConnectStatus_REACHABLE && d.OperStatus == voltha.OperStatus_REBOOTED
+	}
+
+	err = waitUntilDeviceReadiness(oltDevice.Id, nb.maxTimeout, vlFunctionreb, nbi)
+	assert.Nil(t, err)
+
 	// Wait for the logical device to satisfy the expected condition
 	var vlFunction1 = func(ld *voltha.LogicalDevice) bool {
 		return ld == nil
@@ -1194,7 +1206,7 @@
 
 	// Update the OLT Connection Status to REACHABLE and operation status to ACTIVE
 	// Normally, in a real adapter this happens after connection regain via a heartbeat mechanism with real hardware
-	oltAdapter, err := nb.getOLTAdapterInstance(t, nbi, oltDevice.Id)
+	oltAdapter, err = nb.getOLTAdapterInstance(t, nbi, oltDevice.Id)
 	assert.Nil(t, err)
 	oltAdapter.SetDeviceActive(oltDevice.Id)
 
@@ -1217,7 +1229,6 @@
 	assert.Nil(t, err)
 	assert.NotNil(t, onuDevices)
 	assert.Equal(t, 0, len(onuDevices.Items))
-
 	//Remove the device
 	err = cleanUpDevices(nb.maxTimeout, nbi, oltDevice.Id, true)
 	assert.Nil(t, err)