Move common/utils.go to device/utils.go.
The utility functions ConvB2S(), OnuToSn(), LoggerWithOnu() in common/utils.go strongly depend on ONU instance specification.
Then, I consider it should be in device package that contains ONU instance , not utils package.
Change-Id: I7fd2b21c5f7c51be8ec4a5c161da9c93e3a3f582
diff --git a/device/device_olt.go b/device/device_olt.go
index 5f34a03..b3dc2c3 100644
--- a/device/device_olt.go
+++ b/device/device_olt.go
@@ -48,8 +48,8 @@
Name string
InternalState DeviceState
OperState string
- NniIntfs []nniIntf
- PonIntfs []ponIntf
+ NniIntfs []nniIntf
+ PonIntfs []ponIntf
HeartbeatSignature uint32
mu *sync.Mutex
}
@@ -186,4 +186,4 @@
func (olt *Olt) UpdatePonPortState(portID uint32, alarmState AlarmState, operState string) {
olt.PonIntfs[portID].AlarmState = alarmState
olt.PonIntfs[portID].OperState = operState
-}
\ No newline at end of file
+}