VOL-1282 BBSim - Add reboot-related features

Change-Id: I9a1ce85eae18e42361956942aaf8d8fae0cc0802
diff --git a/device/device_olt.go b/device/device_olt.go
index a01dda1..b87bc53 100644
--- a/device/device_olt.go
+++ b/device/device_olt.go
@@ -26,7 +26,7 @@
 	SerialNumber       string
 	Manufacture        string
 	Name               string
-	InternalState      oltState
+	InternalState      *oltState
 	OperState          string
 	Intfs              []intf
 	HeartbeatSignature uint32
@@ -51,7 +51,8 @@
 	olt.NumPonIntf = npon
 	olt.NumNniIntf = nnni
 	olt.Name = "BBSIM OLT"
-	olt.InternalState = PRE_ENABLE
+	olt.InternalState = new(oltState)
+	*olt.InternalState = PRE_ENABLE
 	olt.OperState = "up"
 	olt.Intfs = make([]intf, olt.NumPonIntf+olt.NumNniIntf)
 	olt.HeartbeatSignature = oltid
@@ -67,3 +68,18 @@
 	}
 	return &olt
 }
+
+func (olt *Olt)InitializeStatus(){
+	*olt.InternalState = PRE_ENABLE
+	olt.OperState = "up"
+	for i := uint32(0); i < olt.NumNniIntf; i++ {
+		olt.Intfs[i].IntfID = i
+		olt.Intfs[i].OperState = "up"
+		olt.Intfs[i].Type = "nni"
+	}
+	for i := uint32(olt.NumNniIntf); i < olt.NumPonIntf+olt.NumNniIntf; i++ {
+		olt.Intfs[i].IntfID = i
+		olt.Intfs[i].OperState = "up"
+		olt.Intfs[i].Type = "pon"
+	}
+}