[VOL-3228] device-id logging consistancy
Change-Id: I24d04dcbb0b40dd0601de5bcdfa57a6ed833ecc9
diff --git a/internal/pkg/onuadaptercore/device_handler.go b/internal/pkg/onuadaptercore/device_handler.go
index 023a1fa..4643e91 100644
--- a/internal/pkg/onuadaptercore/device_handler.go
+++ b/internal/pkg/onuadaptercore/device_handler.go
@@ -178,7 +178,7 @@
// start save the device to the data model
func (dh *DeviceHandler) Start(ctx context.Context) {
- logger.Debugw("starting-device-handler", log.Fields{"device": dh.device, "deviceId": dh.deviceID})
+ logger.Debugw("starting-device-handler", log.Fields{"device": dh.device, "device-id": dh.deviceID})
// Add the initial device to the local model
logger.Debug("device-handler-started")
}
@@ -194,7 +194,7 @@
//AdoptDevice adopts the OLT device
func (dh *DeviceHandler) AdoptDevice(ctx context.Context, device *voltha.Device) {
- logger.Debugw("Adopt_device", log.Fields{"deviceID": device.Id, "Address": device.GetHostAndPort()})
+ logger.Debugw("Adopt_device", log.Fields{"device-id": device.Id, "Address": device.GetHostAndPort()})
logger.Debugw("Device FSM: ", log.Fields{"state": string(dh.pDeviceStateFsm.Current())})
if dh.pDeviceStateFsm.Is(devStNull) {
@@ -206,15 +206,6 @@
logger.Debug("AdoptDevice: Agent/device init already done")
}
- /*
- // Now, set the initial PM configuration for that device
- if err := dh.coreProxy.DevicePMConfigUpdate(nil, dh.metrics.ToPmConfigs()); err != nil {
- logger.Errorw("error-updating-PMs", log.Fields{"deviceId": device.Id, "error": err})
- }
-
- go startCollector(dh)
- go startHeartbeatCheck(dh)
- */
}
//ProcessInterAdapterMessage sends the proxied messages to the target device
@@ -237,20 +228,20 @@
omciMsg := &ic.InterAdapterOmciMessage{}
if err := ptypes.UnmarshalAny(msgBody, omciMsg); err != nil {
logger.Warnw("cannot-unmarshal-omci-msg-body", log.Fields{
- "deviceID": dh.deviceID, "error": err})
+ "device-id": dh.deviceID, "error": err})
return err
}
//assuming omci message content is hex coded!
// with restricted output of 16(?) bytes would be ...omciMsg.Message[:16]
logger.Debugw("inter-adapter-recv-omci", log.Fields{
- "deviceID": dh.deviceID, "RxOmciMessage": hex.EncodeToString(omciMsg.Message)})
+ "device-id": dh.deviceID, "RxOmciMessage": hex.EncodeToString(omciMsg.Message)})
//receive_message(omci_msg.message)
pDevEntry := dh.GetOnuDeviceEntry(true)
if pDevEntry != nil {
return pDevEntry.PDevOmciCC.ReceiveMessage(context.TODO(), omciMsg.Message)
} else {
- logger.Errorw("No valid OnuDevice -aborting", log.Fields{"deviceID": dh.deviceID})
+ logger.Errorw("No valid OnuDevice -aborting", log.Fields{"device-id": dh.deviceID})
return errors.New("No valid OnuDevice")
}
}
@@ -260,7 +251,7 @@
onu_indication := &oop.OnuIndication{}
if err := ptypes.UnmarshalAny(msgBody, onu_indication); err != nil {
logger.Warnw("cannot-unmarshal-onu-indication-msg-body", log.Fields{
- "deviceID": dh.deviceID, "error": err})
+ "device-id": dh.deviceID, "error": err})
return err
}
@@ -284,12 +275,12 @@
if dh.pOnuTP == nil {
//should normally not happen ...
logger.Warnw("onuTechProf instance not set up for DLMsg request - ignoring request",
- log.Fields{"deviceID": dh.deviceID})
+ log.Fields{"device-id": dh.deviceID})
return errors.New("TechProfile DLMsg request while onuTechProf instance not setup")
}
if (dh.deviceReason == "stopping-openomci") || (dh.deviceReason == "omci-admin-lock") {
// I've seen cases for this request, where the device was already stopped
- logger.Warnw("TechProf stopped: device-unreachable", log.Fields{"deviceId": dh.deviceID})
+ logger.Warnw("TechProf stopped: device-unreachable", log.Fields{"device-id": dh.deviceID})
return errors.New("device-unreachable")
}
@@ -297,7 +288,7 @@
techProfMsg := &ic.InterAdapterTechProfileDownloadMessage{}
if err := ptypes.UnmarshalAny(msgBody, techProfMsg); err != nil {
logger.Warnw("cannot-unmarshal-techprof-msg-body", log.Fields{
- "deviceID": dh.deviceID, "error": err})
+ "device-id": dh.deviceID, "error": err})
return err
}
@@ -338,7 +329,7 @@
if dh.pOnuTP == nil {
//should normally not happen ...
logger.Warnw("onuTechProf instance not set up for DelGem request - ignoring request",
- log.Fields{"deviceID": dh.deviceID})
+ log.Fields{"device-id": dh.deviceID})
return errors.New("TechProfile DelGem request while onuTechProf instance not setup")
}
@@ -346,7 +337,7 @@
delGemPortMsg := &ic.InterAdapterDeleteGemPortMessage{}
if err := ptypes.UnmarshalAny(msgBody, delGemPortMsg); err != nil {
logger.Warnw("cannot-unmarshal-delete-gem-msg-body", log.Fields{
- "deviceID": dh.deviceID, "error": err})
+ "device-id": dh.deviceID, "error": err})
return err
}
@@ -371,7 +362,7 @@
if dh.pOnuTP == nil {
//should normally not happen ...
logger.Warnw("onuTechProf instance not set up for DelTcont request - ignoring request",
- log.Fields{"deviceID": dh.deviceID})
+ log.Fields{"device-id": dh.deviceID})
return errors.New("TechProfile DelTcont request while onuTechProf instance not setup")
}
@@ -379,7 +370,7 @@
delTcontMsg := &ic.InterAdapterDeleteTcontMessage{}
if err := ptypes.UnmarshalAny(msgBody, delTcontMsg); err != nil {
logger.Warnw("cannot-unmarshal-delete-tcont-msg-body", log.Fields{
- "deviceID": dh.deviceID, "error": err})
+ "device-id": dh.deviceID, "error": err})
return err
}
@@ -408,7 +399,7 @@
default:
{
logger.Errorw("inter-adapter-unhandled-type", log.Fields{
- "deviceID": dh.deviceID, "msgType": msg.Header.Type})
+ "device-id": dh.deviceID, "msgType": msg.Header.Type})
return errors.New("unimplemented")
}
}
@@ -419,7 +410,7 @@
// TODO!!! Clarify usage of this method, it is for sure not used within ONOS (OLT) device disable
// maybe it is obsolete by now
func (dh *DeviceHandler) DisableDevice(device *voltha.Device) {
- logger.Debugw("disable-device", log.Fields{"DeviceId": device.Id, "SerialNumber": device.SerialNumber})
+ logger.Debugw("disable-device", log.Fields{"device-id": device.Id, "SerialNumber": device.SerialNumber})
//admin-lock reason can also be used uniquely for setting the DeviceState accordingly - inblock
//state checking to prevent unneeded processing (eg. on ONU 'unreachable' and 'down')
@@ -435,13 +426,13 @@
}
if err := dh.coreProxy.DeviceReasonUpdate(context.TODO(), dh.deviceID, "omci-admin-lock"); err != nil {
- logger.Errorw("error-updating-reason-state", log.Fields{"deviceID": dh.deviceID, "error": err})
+ logger.Errorw("error-updating-reason-state", log.Fields{"device-id": dh.deviceID, "error": err})
}
dh.deviceReason = "omci-admin-lock"
//200604: ConnState improved to 'unreachable' (was not set in python-code), OperState 'unknown' seems to be best choice
if err := dh.coreProxy.DeviceStateUpdate(context.TODO(), dh.deviceID, voltha.ConnectStatus_UNREACHABLE,
voltha.OperStatus_UNKNOWN); err != nil {
- logger.Errorw("error-updating-device-state", log.Fields{"deviceID": dh.deviceID, "error": err})
+ logger.Errorw("error-updating-device-state", log.Fields{"device-id": dh.deviceID, "error": err})
}
}
}
@@ -450,17 +441,17 @@
// TODO!!! Clarify usage of this method, compare above DisableDevice, usage may clarify resulting states
// maybe it is obsolete by now
func (dh *DeviceHandler) ReenableDevice(device *voltha.Device) {
- logger.Debugw("reenable-device", log.Fields{"DeviceId": device.Id, "SerialNumber": device.SerialNumber})
+ logger.Debugw("reenable-device", log.Fields{"device-id": device.Id, "SerialNumber": device.SerialNumber})
// TODO!!! ConnectStatus and OperStatus to be set here could be more accurate, for now just ...(like python code)
if err := dh.coreProxy.DeviceStateUpdate(context.TODO(), dh.deviceID, voltha.ConnectStatus_REACHABLE,
voltha.OperStatus_ACTIVE); err != nil {
- logger.Errorw("error-updating-device-state", log.Fields{"deviceID": dh.deviceID, "error": err})
+ logger.Errorw("error-updating-device-state", log.Fields{"device-id": dh.deviceID, "error": err})
}
// TODO!!! DeviceReason to be set here could be more accurate, for now just ...(like python code)
if err := dh.coreProxy.DeviceReasonUpdate(context.TODO(), dh.deviceID, "initial-mib-downloaded"); err != nil {
- logger.Errorw("error-updating-reason-state", log.Fields{"deviceID": dh.deviceID, "error": err})
+ logger.Errorw("error-updating-reason-state", log.Fields{"device-id": dh.deviceID, "error": err})
}
dh.deviceReason = "initial-mib-downloaded"
@@ -476,7 +467,7 @@
}
func (dh *DeviceHandler) ReconcileDevice(device *voltha.Device) error {
- logger.Debugw("reconcile-device", log.Fields{"DeviceId": device.Id, "SerialNumber": device.SerialNumber})
+ logger.Debugw("reconcile-device", log.Fields{"device-id": device.Id, "SerialNumber": device.SerialNumber})
if err := dh.pOnuTP.restoreFromOnuTpPathKvStore(context.TODO()); err != nil {
return err
}
@@ -485,7 +476,7 @@
}
func (dh *DeviceHandler) DeleteDevice(device *voltha.Device) error {
- logger.Debugw("delete-device", log.Fields{"DeviceId": device.Id, "SerialNumber": device.SerialNumber})
+ logger.Debugw("delete-device", log.Fields{"device-id": device.Id, "SerialNumber": device.SerialNumber})
if err := dh.pOnuTP.deleteOnuTpPathKvStore(context.TODO()); err != nil {
return err
}
@@ -494,19 +485,19 @@
}
func (dh *DeviceHandler) RebootDevice(device *voltha.Device) error {
- logger.Debugw("reboot-device", log.Fields{"DeviceId": device.Id, "SerialNumber": device.SerialNumber})
+ logger.Debugw("reboot-device", log.Fields{"device-id": device.Id, "SerialNumber": device.SerialNumber})
if device.ConnectStatus != voltha.ConnectStatus_REACHABLE {
- logger.Errorw("device-unreachable", log.Fields{"DeviceId": device.Id, "SerialNumber": device.SerialNumber})
+ logger.Errorw("device-unreachable", log.Fields{"device-id": device.Id, "SerialNumber": device.SerialNumber})
return errors.New("device-unreachable")
}
dh.pOnuOmciDevice.Reboot(context.TODO())
if err := dh.coreProxy.DeviceStateUpdate(context.TODO(), dh.deviceID, voltha.ConnectStatus_UNREACHABLE,
voltha.OperStatus_DISCOVERED); err != nil {
- logger.Errorw("error-updating-device-state", log.Fields{"deviceID": dh.deviceID, "error": err})
+ logger.Errorw("error-updating-device-state", log.Fields{"device-id": dh.deviceID, "error": err})
return err
}
if err := dh.coreProxy.DeviceReasonUpdate(context.TODO(), dh.deviceID, "rebooting-onu"); err != nil {
- logger.Errorw("error-updating-reason-state", log.Fields{"deviceID": dh.deviceID, "error": err})
+ logger.Errorw("error-updating-reason-state", log.Fields{"device-id": dh.deviceID, "error": err})
return err
}
dh.deviceReason = "rebooting-onu"
@@ -593,7 +584,7 @@
// store proxy parameters for later communication - assumption: invariant, else they have to be requested dynamically!!
dh.ProxyAddressID = dh.device.ProxyAddress.GetDeviceId()
dh.ProxyAddressType = dh.device.ProxyAddress.GetDeviceType()
- logger.Debugw("device-updated", log.Fields{"deviceID": dh.deviceID, "proxyAddressID": dh.ProxyAddressID,
+ logger.Debugw("device-updated", log.Fields{"device-id": dh.deviceID, "proxyAddressID": dh.ProxyAddressID,
"proxyAddressType": dh.ProxyAddressType, "SNR": dh.device.SerialNumber,
"ParentId": dh.parentId, "ParentPortNo": dh.ponPortNumber})
@@ -802,15 +793,15 @@
if aWait && pOnuDeviceEntry == nil {
//keep the read sema short to allow for subsequent write
dh.lockDevice.RUnlock()
- logger.Debugw("Waiting for DeviceEntry to be set ...", log.Fields{"deviceID": dh.deviceID})
+ logger.Debugw("Waiting for DeviceEntry to be set ...", log.Fields{"device-id": dh.deviceID})
// based on concurrent processing the deviceEntry setup may not yet be finished at his point
// so it might be needed to wait here for that event with some timeout
select {
case <-time.After(60 * time.Second): //timer may be discussed ...
- logger.Errorw("No valid DeviceEntry set after maxTime", log.Fields{"deviceID": dh.deviceID})
+ logger.Errorw("No valid DeviceEntry set after maxTime", log.Fields{"device-id": dh.deviceID})
return nil
case <-dh.deviceEntrySet:
- logger.Debugw("devicEntry ready now - continue", log.Fields{"deviceID": dh.deviceID})
+ logger.Debugw("devicEntry ready now - continue", log.Fields{"device-id": dh.deviceID})
// if written now, we can return the written value without sema
return dh.pOnuOmciDevice
}
@@ -831,7 +822,7 @@
//AddOnuDeviceEntry creates a new ONU device or returns the existing
func (dh *DeviceHandler) AddOnuDeviceEntry(ctx context.Context) error {
- logger.Debugw("adding-deviceEntry", log.Fields{"for deviceId": dh.deviceID})
+ logger.Debugw("adding-deviceEntry", log.Fields{"device-id": dh.deviceID})
deviceEntry := dh.GetOnuDeviceEntry(false)
if deviceEntry == nil {
@@ -848,9 +839,9 @@
dh.SetOnuDeviceEntry(deviceEntry, onuTechProfProc)
// fire deviceEntry ready event to spread to possibly waiting processing
dh.deviceEntrySet <- true
- logger.Infow("onuDeviceEntry-added", log.Fields{"for deviceId": dh.deviceID})
+ logger.Infow("onuDeviceEntry-added", log.Fields{"device-id": dh.deviceID})
} else {
- logger.Infow("onuDeviceEntry-add: Device already exists", log.Fields{"for deviceId": dh.deviceID})
+ logger.Infow("onuDeviceEntry-add: Device already exists", log.Fields{"device-id": dh.deviceID})
}
// might be updated with some error handling !!!
return nil
@@ -865,7 +856,7 @@
if err := dh.coreProxy.DeviceStateUpdate(context.TODO(), dh.deviceID,
voltha.ConnectStatus_REACHABLE, voltha.OperStatus_ACTIVATING); err != nil {
- logger.Errorw("error-updating-device-state", log.Fields{"deviceID": dh.deviceID, "error": err})
+ logger.Errorw("error-updating-device-state", log.Fields{"device-id": dh.deviceID, "error": err})
}
// It does not look to me as if makes sense to work with the real core device here, (not the stored clone)?
// in this code the GetDevice would just make a check if the DeviceID's Device still exists in core
@@ -885,11 +876,11 @@
if pDevEntry != nil {
pDevEntry.Start(context.TODO())
} else {
- logger.Errorw("No valid OnuDevice -aborting", log.Fields{"deviceID": dh.deviceID})
+ logger.Errorw("No valid OnuDevice -aborting", log.Fields{"device-id": dh.deviceID})
return errors.New("No valid OnuDevice")
}
if err := dh.coreProxy.DeviceReasonUpdate(context.TODO(), dh.deviceID, "starting-openomci"); err != nil {
- logger.Errorw("error-DeviceReasonUpdate to starting-openomci", log.Fields{"deviceID": dh.deviceID, "error": err})
+ logger.Errorw("error-DeviceReasonUpdate to starting-openomci", log.Fields{"device-id": dh.deviceID, "error": err})
}
dh.deviceReason = "starting-openomci"
@@ -1019,7 +1010,7 @@
return errors.New("wrong state of MibSyncFsm")
}
} else {
- logger.Errorw("MibSyncFsm invalid - cannot be executed!!", log.Fields{"deviceID": dh.deviceID})
+ logger.Errorw("MibSyncFsm invalid - cannot be executed!!", log.Fields{"device-id": dh.deviceID})
return errors.New("cannot execut MibSync")
}
return nil
@@ -1028,11 +1019,11 @@
func (dh *DeviceHandler) updateInterface(onuind *oop.OnuIndication) error {
//state checking to prevent unneeded processing (eg. on ONU 'unreachable' and 'down')
if dh.deviceReason != "stopping-openomci" {
- logger.Debugw("updateInterface-started - stopping-device", log.Fields{"deviceID": dh.deviceID})
+ logger.Debugw("updateInterface-started - stopping-device", log.Fields{"device-id": dh.deviceID})
//stop all running SM processing - make use of the DH-state as mirrored in the deviceReason
pDevEntry := dh.GetOnuDeviceEntry(false)
if pDevEntry == nil {
- logger.Errorw("No valid OnuDevice -aborting", log.Fields{"deviceID": dh.deviceID})
+ logger.Errorw("No valid OnuDevice -aborting", log.Fields{"device-id": dh.deviceID})
return errors.New("No valid OnuDevice")
}
@@ -1090,7 +1081,7 @@
if err := dh.coreProxy.DeviceReasonUpdate(context.TODO(), dh.deviceID, "stopping-openomci"); err != nil {
logger.Errorw("error-DeviceReasonUpdate to 'stopping-openomci'",
- log.Fields{"deviceID": dh.deviceID, "error": err})
+ log.Fields{"device-id": dh.deviceID, "error": err})
// abort: system behavior is just unstable ...
return err
}
@@ -1099,12 +1090,12 @@
if err := dh.coreProxy.DeviceStateUpdate(context.TODO(), dh.deviceID,
voltha.ConnectStatus_UNREACHABLE, voltha.OperStatus_DISCOVERED); err != nil {
logger.Errorw("error-updating-device-state unreachable-discovered",
- log.Fields{"deviceID": dh.deviceID, "error": err})
+ log.Fields{"device-id": dh.deviceID, "error": err})
// abort: system behavior is just unstable ...
return err
}
} else {
- logger.Debugw("updateInterface - device already stopped", log.Fields{"deviceID": dh.deviceID})
+ logger.Debugw("updateInterface - device already stopped", log.Fields{"device-id": dh.deviceID})
}
return nil
}
@@ -1114,13 +1105,13 @@
switch dev_Event {
case MibDatabaseSync:
{
- logger.Debugw("MibInSync event received", log.Fields{"deviceID": dh.deviceID})
+ logger.Debugw("MibInSync event received", log.Fields{"device-id": dh.deviceID})
//initiate DevStateUpdate
if err := dh.coreProxy.DeviceReasonUpdate(context.TODO(), dh.deviceID, "discovery-mibsync-complete"); err != nil {
logger.Errorw("error-DeviceReasonUpdate to 'mibsync-complete'", log.Fields{
- "deviceID": dh.deviceID, "error": err})
+ "device-id": dh.deviceID, "error": err})
} else {
- logger.Infow("dev reason updated to 'MibSync complete'", log.Fields{"deviceID": dh.deviceID})
+ logger.Infow("dev reason updated to 'MibSync complete'", log.Fields{"device-id": dh.deviceID})
}
//set internal state anyway - as it was done
dh.deviceReason = "discovery-mibsync-complete"
@@ -1130,25 +1121,25 @@
if unigInstKeys := pDevEntry.pOnuDB.GetSortedInstKeys(me.UniGClassID); len(unigInstKeys) > 0 {
for _, mgmtEntityId := range unigInstKeys {
logger.Debugw("Add UNI port for stored UniG instance:", log.Fields{
- "deviceId": dh.deviceID, "UnigMe EntityID": mgmtEntityId})
+ "device-id": dh.deviceID, "UnigMe EntityID": mgmtEntityId})
dh.addUniPort(mgmtEntityId, i, UniPPTP)
i++
}
} else {
- logger.Debugw("No UniG instances found", log.Fields{"deviceId": dh.deviceID})
+ logger.Debugw("No UniG instances found", log.Fields{"device-id": dh.deviceID})
}
if veipInstKeys := pDevEntry.pOnuDB.GetSortedInstKeys(me.VirtualEthernetInterfacePointClassID); len(veipInstKeys) > 0 {
for _, mgmtEntityId := range veipInstKeys {
logger.Debugw("Add VEIP acc. to stored VEIP instance:", log.Fields{
- "deviceId": dh.deviceID, "VEIP EntityID": mgmtEntityId})
+ "device-id": dh.deviceID, "VEIP EntityID": mgmtEntityId})
dh.addUniPort(mgmtEntityId, i, UniVEIP)
i++
}
} else {
- logger.Debugw("No VEIP instances found", log.Fields{"deviceId": dh.deviceID})
+ logger.Debugw("No VEIP instances found", log.Fields{"device-id": dh.deviceID})
}
if i == 0 {
- logger.Warnw("No PPTP instances found", log.Fields{"deviceId": dh.deviceID})
+ logger.Warnw("No PPTP instances found", log.Fields{"device-id": dh.deviceID})
}
/* 200605: lock processing after initial MIBUpload removed now as the ONU should be in the lock state per default here
@@ -1165,7 +1156,7 @@
}
case UniLockStateDone:
{
- logger.Infow("UniLockStateDone event: Starting MIB download", log.Fields{"deviceID": dh.deviceID})
+ logger.Infow("UniLockStateDone event: Starting MIB download", log.Fields{"device-id": dh.deviceID})
* lockState processing commented out
*/
/* Mib download procedure -
@@ -1193,25 +1184,25 @@
}
/***** Mib download started */
} else {
- logger.Errorw("MibDownloadFsm invalid - cannot be executed!!", log.Fields{"deviceID": dh.deviceID})
+ logger.Errorw("MibDownloadFsm invalid - cannot be executed!!", log.Fields{"device-id": dh.deviceID})
}
}
case MibDownloadDone:
{
- logger.Debugw("MibDownloadDone event received", log.Fields{"deviceID": dh.deviceID})
+ logger.Debugw("MibDownloadDone event received", log.Fields{"device-id": dh.deviceID})
//initiate DevStateUpdate
if err := dh.coreProxy.DeviceStateUpdate(context.TODO(), dh.deviceID,
voltha.ConnectStatus_REACHABLE, voltha.OperStatus_ACTIVE); err != nil {
- logger.Errorw("error-updating-device-state", log.Fields{"deviceID": dh.deviceID, "error": err})
+ logger.Errorw("error-updating-device-state", log.Fields{"device-id": dh.deviceID, "error": err})
} else {
- logger.Debugw("dev state updated to 'Oper.Active'", log.Fields{"deviceID": dh.deviceID})
+ logger.Debugw("dev state updated to 'Oper.Active'", log.Fields{"device-id": dh.deviceID})
}
if err := dh.coreProxy.DeviceReasonUpdate(context.TODO(), dh.deviceID, "initial-mib-downloaded"); err != nil {
logger.Errorw("error-DeviceReasonUpdate to 'initial-mib-downloaded'",
- log.Fields{"deviceID": dh.deviceID, "error": err})
+ log.Fields{"device-id": dh.deviceID, "error": err})
} else {
- logger.Infow("dev reason updated to 'initial-mib-downloaded'", log.Fields{"deviceID": dh.deviceID})
+ logger.Infow("dev reason updated to 'initial-mib-downloaded'", log.Fields{"device-id": dh.deviceID})
}
//set internal state anyway - as it was done
dh.deviceReason = "initial-mib-downloaded"
@@ -1227,13 +1218,13 @@
{
go dh.enableUniPortStateUpdate() //cmp python yield self.enable_ports()
- logger.Infow("UniUnlockStateDone event: Sending OnuUp event", log.Fields{"deviceID": dh.deviceID})
+ logger.Infow("UniUnlockStateDone event: Sending OnuUp event", log.Fields{"device-id": dh.deviceID})
raisedTs := time.Now().UnixNano()
go dh.sendOnuOperStateEvent(voltha.OperStatus_ACTIVE, dh.deviceID, raisedTs) //cmp python onu_active_event
}
case OmciAniConfigDone:
{
- logger.Debugw("OmciAniConfigDone event received", log.Fields{"deviceID": dh.deviceID})
+ logger.Debugw("OmciAniConfigDone event received", log.Fields{"device-id": dh.deviceID})
//TODO!: it might be needed to check some 'cached' pending flow configuration (vlan setting)
// - to consider with outstanding flow implementation
// attention: the device reason update is done based on ONU-UNI-Port related activity
@@ -1242,10 +1233,10 @@
// which may be the case from some previous actvity on another UNI Port of the ONU
if err := dh.coreProxy.DeviceReasonUpdate(context.TODO(), dh.deviceID, "tech-profile-config-download-success"); err != nil {
logger.Errorw("error-DeviceReasonUpdate to 'tech-profile-config-download-success'",
- log.Fields{"deviceID": dh.deviceID, "error": err})
+ log.Fields{"device-id": dh.deviceID, "error": err})
} else {
logger.Infow("update dev reason to 'tech-profile-config-download-success'",
- log.Fields{"deviceID": dh.deviceID})
+ log.Fields{"device-id": dh.deviceID})
}
//set internal state anyway - as it was done
dh.deviceReason = "tech-profile-config-download-success"
@@ -1253,7 +1244,7 @@
}
default:
{
- logger.Warnw("unhandled-device-event", log.Fields{"deviceID": dh.deviceID, "event": dev_Event})
+ logger.Warnw("unhandled-device-event", log.Fields{"device-id": dh.deviceID, "event": dev_Event})
}
} //switch
}
@@ -1354,10 +1345,10 @@
/* Send event to KAFKA */
if err := dh.EventProxy.SendDeviceEvent(&de, equipment, pon, raisedTs); err != nil {
logger.Warnw("could not send ONU_ACTIVATED event",
- log.Fields{"DeviceId": a_deviceID, "error": err})
+ log.Fields{"device-id": a_deviceID, "error": err})
}
logger.Debugw("ONU_ACTIVATED event sent to KAFKA",
- log.Fields{"DeviceId": a_deviceID, "with-EventName": de.DeviceEventName})
+ log.Fields{"device-id": a_deviceID, "with-EventName": de.DeviceEventName})
}
// createUniLockFsm initialises and runs the UniLock FSM to transfer teh OMCi related commands for port lock/unlock
@@ -1365,16 +1356,16 @@
chLSFsm := make(chan Message, 2048)
var sFsmName string
if aAdminState == true {
- logger.Infow("createLockStateFSM", log.Fields{"deviceID": dh.deviceID})
+ logger.Infow("createLockStateFSM", log.Fields{"device-id": dh.deviceID})
sFsmName = "LockStateFSM"
} else {
- logger.Infow("createUnlockStateFSM", log.Fields{"deviceID": dh.deviceID})
+ logger.Infow("createUnlockStateFSM", log.Fields{"device-id": dh.deviceID})
sFsmName = "UnLockStateFSM"
}
pDevEntry := dh.GetOnuDeviceEntry(true)
if pDevEntry == nil {
- logger.Errorw("No valid OnuDevice -aborting", log.Fields{"deviceID": dh.deviceID})
+ logger.Errorw("No valid OnuDevice -aborting", log.Fields{"device-id": dh.deviceID})
return
}
pLSFsm := NewLockStateFsm(pDevEntry.PDevOmciCC, aAdminState, devEvent,
@@ -1387,7 +1378,7 @@
}
dh.runUniLockFsm(aAdminState)
} else {
- logger.Errorw("LockStateFSM could not be created - abort!!", log.Fields{"deviceID": dh.deviceID})
+ logger.Errorw("LockStateFSM could not be created - abort!!", log.Fields{"device-id": dh.deviceID})
}
}
@@ -1420,15 +1411,15 @@
} else {
/***** LockStateFSM started */
logger.Debugw("LockStateFSM started", log.Fields{
- "state": pLSStatemachine.Current(), "deviceID": dh.deviceID})
+ "state": pLSStatemachine.Current(), "device-id": dh.deviceID})
}
} else {
logger.Warnw("wrong state of LockStateFSM - want: disabled", log.Fields{
- "have": pLSStatemachine.Current(), "deviceID": dh.deviceID})
+ "have": pLSStatemachine.Current(), "device-id": dh.deviceID})
// maybe try a FSM reset and then again ... - TODO!!!
}
} else {
- logger.Errorw("LockStateFSM StateMachine invalid - cannot be executed!!", log.Fields{"deviceID": dh.deviceID})
+ logger.Errorw("LockStateFSM StateMachine invalid - cannot be executed!!", log.Fields{"device-id": dh.deviceID})
// maybe try a FSM reset and then again ... - TODO!!!
}
}
@@ -1437,7 +1428,7 @@
func (dh *DeviceHandler) SetBackend(aBasePathKvStore string) *db.Backend {
addr := dh.pOpenOnuAc.KVStoreHost + ":" + strconv.Itoa(dh.pOpenOnuAc.KVStorePort)
logger.Debugw("SetKVStoreBackend", log.Fields{"IpTarget": addr,
- "BasePathKvStore": aBasePathKvStore, "deviceId": dh.deviceID})
+ "BasePathKvStore": aBasePathKvStore, "device-id": dh.deviceID})
kvbackend := &db.Backend{
Client: dh.pOpenOnuAc.kvClient,
StoreType: dh.pOpenOnuAc.KVStoreType,
diff --git a/internal/pkg/onuadaptercore/mib_download.go b/internal/pkg/onuadaptercore/mib_download.go
index d271a16..58c5c9a 100644
--- a/internal/pkg/onuadaptercore/mib_download.go
+++ b/internal/pkg/onuadaptercore/mib_download.go
@@ -157,7 +157,7 @@
logger.Error("Omci Msg layer could not be assigned for CreateResponse")
return
}
- logger.Debugw("CreateResponse Data", log.Fields{"deviceId": onuDeviceEntry.deviceID, "data-fields": msgObj})
+ logger.Debugw("CreateResponse Data", log.Fields{"device-id": onuDeviceEntry.deviceID, "data-fields": msgObj})
if msgObj.Result != me.Success {
logger.Errorw("Omci CreateResponse Error - later: drive FSM to abort state ?", log.Fields{"Error": msgObj.Result})
// possibly force FSM into abort or ignore some errors for some messages? store error for mgmt display?
@@ -205,7 +205,7 @@
logger.Error("Omci Msg layer could not be assigned for SetResponse")
return
}
- logger.Debugw("SetResponse Data", log.Fields{"deviceId": onuDeviceEntry.deviceID, "data-fields": msgObj})
+ logger.Debugw("SetResponse Data", log.Fields{"device-id": onuDeviceEntry.deviceID, "data-fields": msgObj})
if msgObj.Result != me.Success {
logger.Errorw("Omci SetResponse Error - later: drive FSM to abort state ?", log.Fields{"Error": msgObj.Result})
// possibly force FSM into abort or ignore some errors for some messages? store error for mgmt display?
@@ -238,7 +238,7 @@
func (onuDeviceEntry *OnuDeviceEntry) performInitialBridgeSetup() {
for uniNo, uniPort := range onuDeviceEntry.baseDeviceHandler.uniEntityMap {
logger.Debugw("Starting IntialBridgeSetup", log.Fields{
- "deviceId": onuDeviceEntry.deviceID, "for PortNo": uniNo})
+ "device-id": onuDeviceEntry.deviceID, "for PortNo": uniNo})
//create MBSP
meInstance := onuDeviceEntry.PDevOmciCC.sendCreateMBServiceProfile(
@@ -278,7 +278,7 @@
}
// if Config has been done for all UNI related instances let the FSM proceed
// while we did not check here, if there is some port at all - !?
- logger.Infow("IntialBridgeSetup finished", log.Fields{"deviceId": onuDeviceEntry.deviceID})
+ logger.Infow("IntialBridgeSetup finished", log.Fields{"device-id": onuDeviceEntry.deviceID})
onuDeviceEntry.pMibDownloadFsm.pFsm.Event(dlEvRxBridgeResp)
return
}
diff --git a/internal/pkg/onuadaptercore/omci_ani_config.go b/internal/pkg/onuadaptercore/omci_ani_config.go
index c4bc235..6b5457c 100644
--- a/internal/pkg/onuadaptercore/omci_ani_config.go
+++ b/internal/pkg/onuadaptercore/omci_ani_config.go
@@ -224,7 +224,7 @@
logger.Debugw("Used TcontId:", log.Fields{"TcontId": strconv.FormatInt(int64(oFsm.tcont0ID), 16),
"device-id": oFsm.pAdaptFsm.deviceID})
} else {
- logger.Warnw("No TCont instances found", log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID})
+ logger.Warnw("No TCont instances found", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
}
oFsm.alloc0ID = (*(oFsm.pUniTechProf.mapPonAniConfig[uint32(oFsm.pOnuUniPort.uniId)]))[0].tcontParams.allocID
loGemPortAttribs := ponAniGemPortAttribs{}
@@ -257,27 +257,27 @@
if relatedPort == usQrelPortMask {
loGemPortAttribs.upQueueID = mgmtEntityId
logger.Debugw("UpQueue for GemPort found:", log.Fields{"gemPortID": loGemPortAttribs.gemPortID,
- "upQueueID": strconv.FormatInt(int64(loGemPortAttribs.upQueueID), 16), "deviceId": oFsm.pAdaptFsm.deviceID})
+ "upQueueID": strconv.FormatInt(int64(loGemPortAttribs.upQueueID), 16), "device-id": oFsm.pAdaptFsm.deviceID})
usQueueFound = true
} else if (relatedPort&0xFFFFFF) == dsQrelPortMask && mgmtEntityId < 0x8000 {
loGemPortAttribs.downQueueID = mgmtEntityId
logger.Debugw("DownQueue for GemPort found:", log.Fields{"gemPortID": loGemPortAttribs.gemPortID,
- "downQueueID": strconv.FormatInt(int64(loGemPortAttribs.downQueueID), 16), "deviceId": oFsm.pAdaptFsm.deviceID})
+ "downQueueID": strconv.FormatInt(int64(loGemPortAttribs.downQueueID), 16), "device-id": oFsm.pAdaptFsm.deviceID})
dsQueueFound = true
}
if usQueueFound && dsQueueFound {
break
}
} else {
- logger.Warnw("'relatedPort' not found in meAttributes:", log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID})
+ logger.Warnw("'relatedPort' not found in meAttributes:", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
}
} else {
logger.Warnw("No attributes available in DB:", log.Fields{"meClassID": me.PriorityQueueClassID,
- "mgmtEntityId": mgmtEntityId, "deviceId": oFsm.pAdaptFsm.deviceID})
+ "mgmtEntityId": mgmtEntityId, "device-id": oFsm.pAdaptFsm.deviceID})
}
}
} else {
- logger.Warnw("No PriorityQueue instances found", log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID})
+ logger.Warnw("No PriorityQueue instances found", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
}
loGemPortAttribs.direction = gemEntry.direction
loGemPortAttribs.qosPolicy = gemEntry.queueSchedPolicy
@@ -591,7 +591,7 @@
logger.Error("Omci Msg layer could not be assigned for CreateResponse")
return
}
- logger.Debugw("CreateResponse Data", log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID, "data-fields": msgObj})
+ logger.Debugw("CreateResponse Data", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID, "data-fields": msgObj})
if msgObj.Result != me.Success {
logger.Errorw("Omci CreateResponse Error - later: drive FSM to abort state ?", log.Fields{"Error": msgObj.Result})
// possibly force FSM into abort or ignore some errors for some messages? store error for mgmt display?
@@ -633,7 +633,7 @@
logger.Error("UniPonAniConfigFsm - Omci Msg layer could not be assigned for SetResponse")
return
}
- logger.Debugw("UniPonAniConfigFsm SetResponse Data", log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID, "data-fields": msgObj})
+ logger.Debugw("UniPonAniConfigFsm SetResponse Data", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID, "data-fields": msgObj})
if msgObj.Result != me.Success {
logger.Errorw("UniPonAniConfigFsm - Omci SetResponse Error - later: drive FSM to abort state ?", log.Fields{"Error": msgObj.Result})
// possibly force FSM into abort or ignore some errors for some messages? store error for mgmt display?
@@ -698,14 +698,14 @@
err := oFsm.waitforOmciResponse()
if err != nil {
logger.Errorw("GemNWCtp create failed, aborting AniConfig FSM!",
- log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID, "GemIndex": gemIndex})
+ log.Fields{"device-id": oFsm.pAdaptFsm.deviceID, "GemIndex": gemIndex})
oFsm.pAdaptFsm.pFsm.Event(aniEvReset)
return
}
} //for all GemPorts of this T-Cont
// if Config has been done for all GemPort instances let the FSM proceed
- logger.Debugw("GemNWCtp create loop finished", log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID})
+ logger.Debugw("GemNWCtp create loop finished", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
oFsm.pAdaptFsm.pFsm.Event(aniEvRxGemntcpsResp)
return
}
@@ -737,14 +737,14 @@
err := oFsm.waitforOmciResponse()
if err != nil {
logger.Errorw("GemIwTp create failed, aborting AniConfig FSM!",
- log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID, "GemIndex": gemIndex})
+ log.Fields{"device-id": oFsm.pAdaptFsm.deviceID, "GemIndex": gemIndex})
oFsm.pAdaptFsm.pFsm.Event(aniEvReset)
return
}
} //for all GemPort's of this T-Cont
// if Config has been done for all GemPort instances let the FSM proceed
- logger.Debugw("GemIwTp create loop finished", log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID})
+ logger.Debugw("GemIwTp create loop finished", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
oFsm.pAdaptFsm.pFsm.Event(aniEvRxGemiwsResp)
return
}
@@ -806,7 +806,7 @@
err := oFsm.waitforOmciResponse()
if err != nil {
logger.Errorw("PrioQueue set failed, aborting AniConfig FSM!",
- log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID, "QueueId": strconv.FormatInt(int64(queueIndex), 16)})
+ log.Fields{"device-id": oFsm.pAdaptFsm.deviceID, "QueueId": strconv.FormatInt(int64(queueIndex), 16)})
oFsm.pAdaptFsm.pFsm.Event(aniEvReset)
return
}
@@ -819,7 +819,7 @@
} //for all upstream prioQueues
// if Config has been done for all PrioQueue instances let the FSM proceed
- logger.Debugw("PrioQueue set loop finished", log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID})
+ logger.Debugw("PrioQueue set loop finished", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
oFsm.pAdaptFsm.pFsm.Event(aniEvRxPrioqsResp)
return
}
diff --git a/internal/pkg/onuadaptercore/omci_cc.go b/internal/pkg/onuadaptercore/omci_cc.go
index 04d8a39..5ee61f1 100644
--- a/internal/pkg/onuadaptercore/omci_cc.go
+++ b/internal/pkg/onuadaptercore/omci_cc.go
@@ -110,7 +110,7 @@
func NewOmciCC(ctx context.Context, onu_device_entry *OnuDeviceEntry,
device_id string, device_handler *DeviceHandler,
core_proxy adapterif.CoreProxy, adapter_proxy adapterif.AdapterProxy) *OmciCC {
- logger.Infow("init-omciCC", log.Fields{"deviceId": device_id})
+ logger.Infow("init-omciCC", log.Fields{"device-id": device_id})
var omciCC OmciCC
omciCC.enabled = false
omciCC.pOnuDeviceEntry = onu_device_entry
@@ -535,11 +535,11 @@
func (oo *OmciCC) receiveOmciResponse(omciMsg *omci.OMCI, packet *gp.Packet, respChan chan Message) error {
logger.Debugw("omci-message-response - transfer on omciRespChannel", log.Fields{"omciMsgType": omciMsg.MessageType,
- "transCorrId": strconv.FormatInt(int64(omciMsg.TransactionID), 16), "deviceId": oo.deviceID})
+ "transCorrId": strconv.FormatInt(int64(omciMsg.TransactionID), 16), "device-id": oo.deviceID})
if oo.pOnuDeviceEntry == nil {
logger.Errorw("Abort receiving OMCI response, DeviceEntryPointer is nil", log.Fields{
- "deviceId": oo.deviceID})
+ "device-id": oo.deviceID})
return errors.New("DeviceEntryPointer is nil")
}
@@ -560,7 +560,7 @@
func (oo *OmciCC) sendMibReset(ctx context.Context, timeout int, highPrio bool) error {
- logger.Debugw("send MibReset-msg to:", log.Fields{"deviceId": oo.deviceID})
+ logger.Debugw("send MibReset-msg to:", log.Fields{"device-id": oo.deviceID})
request := &omci.MibResetRequest{
MeBasePacket: omci.MeBasePacket{
EntityClass: me.OnuDataClassID,
@@ -570,7 +570,7 @@
pkt, err := serialize(omci.MibResetRequestType, request, tid)
if err != nil {
logger.Errorw("Cannot serialize MibResetRequest", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return err
}
omciRxCallbackPair := CallbackPair{
@@ -581,7 +581,7 @@
}
func (oo *OmciCC) sendReboot(ctx context.Context, timeout int, highPrio bool, responseChannel chan Message) error {
- logger.Debugw("send Reboot-msg to:", log.Fields{"deviceId": oo.deviceID})
+ logger.Debugw("send Reboot-msg to:", log.Fields{"device-id": oo.deviceID})
request := &omci.RebootRequest{
MeBasePacket: omci.MeBasePacket{
EntityClass: me.OnuGClassID,
@@ -591,7 +591,7 @@
pkt, err := serialize(omci.RebootRequestType, request, tid)
if err != nil {
logger.Errorw("Cannot serialize RebootRequest", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return err
}
omciRxCallbackPair := CallbackPair{
@@ -602,7 +602,7 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send RebootRequest", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return err
}
err = oo.pOnuDeviceEntry.waitForRebootResponse(responseChannel)
@@ -615,7 +615,7 @@
}
func (oo *OmciCC) sendMibUpload(ctx context.Context, timeout int, highPrio bool) error {
- logger.Debugw("send MibUpload-msg to:", log.Fields{"deviceId": oo.deviceID})
+ logger.Debugw("send MibUpload-msg to:", log.Fields{"device-id": oo.deviceID})
request := &omci.MibUploadRequest{
MeBasePacket: omci.MeBasePacket{
EntityClass: me.OnuDataClassID,
@@ -625,7 +625,7 @@
pkt, err := serialize(omci.MibUploadRequestType, request, tid)
if err != nil {
logger.Errorw("Cannot serialize MibUploadRequest", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return err
}
oo.uploadSequNo = 0
@@ -639,7 +639,7 @@
}
func (oo *OmciCC) sendMibUploadNext(ctx context.Context, timeout int, highPrio bool) error {
- logger.Debugw("send MibUploadNext-msg to:", log.Fields{"deviceId": oo.deviceID, "uploadSequNo": oo.uploadSequNo})
+ logger.Debugw("send MibUploadNext-msg to:", log.Fields{"device-id": oo.deviceID, "uploadSequNo": oo.uploadSequNo})
request := &omci.MibUploadNextRequest{
MeBasePacket: omci.MeBasePacket{
EntityClass: me.OnuDataClassID,
@@ -650,7 +650,7 @@
pkt, err := serialize(omci.MibUploadNextRequestType, request, tid)
if err != nil {
logger.Errorw("Cannot serialize MibUploadNextRequest", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return err
}
oo.uploadSequNo++
@@ -664,7 +664,7 @@
func (oo *OmciCC) sendCreateGalEthernetProfile(ctx context.Context, timeout int, highPrio bool) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
- logger.Debugw("send GalEnetProfile-Create-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send GalEnetProfile-Create-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16)})
meParams := me.ParamData{
@@ -677,14 +677,14 @@
omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid))
if err != nil {
logger.Errorw("Cannot encode GalEnetProfileInstance for create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize GalEnetProfile create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -695,21 +695,21 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send GalEnetProfile create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send GalEnetProfile-Create-msg done")
return meInstance
}
logger.Errorw("Cannot generate GalEnetProfileInstance", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
// might be needed to extend for parameter arguments, here just for setting the ConnectivityMode!!
func (oo *OmciCC) sendSetOnu2g(ctx context.Context, timeout int, highPrio bool) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
- logger.Debugw("send ONU2-G-Set-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send ONU2-G-Set-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16)})
// ONU-G ME-ID is defined to be 0, but we could verify, if the ONU really supports the desired
@@ -725,14 +725,14 @@
omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
if err != nil {
logger.Errorw("Cannot encode ONU2-G instance for set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize ONU2-G set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -743,14 +743,14 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send ONU2-G set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send ONU2-G-Set-msg done")
return meInstance
}
logger.Errorw("Cannot generate ONU2-G", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
@@ -758,7 +758,7 @@
a_pUniPort *OnuUniPort, timeout int, highPrio bool) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
instID := macBridgeServiceProfileEID + uint16(a_pUniPort.macBpNo)
- logger.Debugw("send MBSP-Create-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send MBSP-Create-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16), "InstId": strconv.FormatInt(int64(instID), 16)})
meParams := me.ParamData{
@@ -781,14 +781,14 @@
omci.TransactionID(tid), omci.AddDefaults(true))
if err != nil {
logger.Errorw("Cannot encode MBSP for create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize MBSP create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -799,14 +799,14 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send MBSP create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send MBSP-Create-msg done")
return meInstance
}
logger.Errorw("Cannot generate MBSP Instance", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
@@ -814,7 +814,7 @@
a_pUniPort *OnuUniPort, timeout int, highPrio bool) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
instID := macBridgePortAniEID + a_pUniPort.entityId
- logger.Debugw("send MBPCD-Create-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send MBPCD-Create-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16), "InstId": strconv.FormatInt(int64(instID), 16)})
meParams := me.ParamData{
@@ -833,14 +833,14 @@
omci.TransactionID(tid), omci.AddDefaults(true))
if err != nil {
logger.Errorw("Cannot encode MBPCD for create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize MBPCD create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -851,14 +851,14 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send MBPCD create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send MBPCD-Create-msg done")
return meInstance
}
logger.Errorw("Cannot generate MBPCD Instance", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
@@ -867,7 +867,7 @@
tid := oo.GetNextTid(highPrio)
//same entityId is used as for MBSP (see there), but just arbitrary ...
instID := macBridgeServiceProfileEID + uint16(a_pUniPort.macBpNo)
- logger.Debugw("send EVTOCD-Create-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send EVTOCD-Create-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16), "InstId": strconv.FormatInt(int64(instID), 16)})
// compare python adapter code WA VOL-1311: this is not done here!
@@ -890,14 +890,14 @@
omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid))
if err != nil {
logger.Errorw("Cannot encode EVTOCD for create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize EVTOCD create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -908,21 +908,21 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send EVTOCD create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send EVTOCD-Create-msg done")
return meInstance
}
logger.Errorw("Cannot generate EVTOCD Instance", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
func (oo *OmciCC) sendSetOnuGLS(ctx context.Context, timeout int,
highPrio bool, requestedAttributes me.AttributeValueMap, rxChan chan Message) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
- logger.Debugw("send ONU-G-Set-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send ONU-G-Set-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16)})
// ONU-G ME-ID is defined to be 0, no need to perform a DB lookup
@@ -935,14 +935,14 @@
omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
if err != nil {
logger.Errorw("Cannot encode ONU-G instance for set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize ONU-G set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -953,21 +953,21 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send ONU-G set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send ONU-G-Set-msg done")
return meInstance
}
logger.Errorw("Cannot generate ONU-G", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
func (oo *OmciCC) sendSetUniGLS(ctx context.Context, aInstNo uint16, timeout int,
highPrio bool, requestedAttributes me.AttributeValueMap, rxChan chan Message) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
- logger.Debugw("send UNI-G-Set-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send UNI-G-Set-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16)})
// UNI-G ME-ID is taken from Mib Upload stored OnuUniPort instance (argument)
@@ -980,14 +980,14 @@
omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
if err != nil {
logger.Errorw("Cannot encode UNI-G instance for set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize UNI-G-Set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -998,21 +998,21 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send UNIG-G-Set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send UNI-G-Set-msg done")
return meInstance
}
logger.Errorw("Cannot generate UNI-G", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
func (oo *OmciCC) sendSetVeipLS(ctx context.Context, aInstNo uint16, timeout int,
highPrio bool, requestedAttributes me.AttributeValueMap, rxChan chan Message) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
- logger.Debugw("send VEIP-Set-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send VEIP-Set-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16)})
// ONU-G ME-ID is defined to be 0, no need to perform a DB lookup
@@ -1025,14 +1025,14 @@
omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
if err != nil {
logger.Errorw("Cannot encode VEIP instance for set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize VEIP-Set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -1043,14 +1043,14 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send VEIP-Set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send VEIP-Set-msg done")
return meInstance
}
logger.Errorw("Cannot generate VEIP", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
@@ -1058,7 +1058,7 @@
timeout int, highPrio bool) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
- logger.Debugw("send get-request-msg", log.Fields{"classID": classID, "deviceId": oo.deviceID,
+ logger.Debugw("send get-request-msg", log.Fields{"classID": classID, "device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16)})
meParams := me.ParamData{
@@ -1070,12 +1070,12 @@
meClassIdName := meInstance.GetName()
omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.GetRequestType, omci.TransactionID(tid))
if err != nil {
- logger.Errorf("Cannot encode instance for get-request", log.Fields{"meClassIdName": meClassIdName, "Err": err, "deviceId": oo.deviceID})
+ logger.Errorf("Cannot encode instance for get-request", log.Fields{"meClassIdName": meClassIdName, "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
- logger.Errorw("Cannot serialize get-request", log.Fields{"meClassIdName": meClassIdName, "Err": err, "deviceId": oo.deviceID})
+ logger.Errorw("Cannot serialize get-request", log.Fields{"meClassIdName": meClassIdName, "Err": err, "device-id": oo.deviceID})
return nil
}
omciRxCallbackPair := CallbackPair{
@@ -1084,20 +1084,20 @@
}
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
- logger.Errorw("Cannot send get-request-msg", log.Fields{"meClassIdName": meClassIdName, "Err": err, "deviceId": oo.deviceID})
+ logger.Errorw("Cannot send get-request-msg", log.Fields{"meClassIdName": meClassIdName, "Err": err, "device-id": oo.deviceID})
return nil
}
- logger.Debugw("send get-request-msg done", log.Fields{"meClassIdName": meClassIdName, "deviceId": oo.deviceID})
+ logger.Debugw("send get-request-msg done", log.Fields{"meClassIdName": meClassIdName, "device-id": oo.deviceID})
return meInstance
}
- logger.Errorw("Cannot generate meDefinition", log.Fields{"classID": classID, "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ logger.Errorw("Cannot generate meDefinition", log.Fields{"classID": classID, "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
func (oo *OmciCC) sendCreateDot1PMapper(ctx context.Context, timeout int, highPrio bool,
aInstID uint16, rxChan chan Message) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
- logger.Debugw("send .1pMapper-Create-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send .1pMapper-Create-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16), "InstId": strconv.FormatInt(int64(aInstID), 16)})
meParams := me.ParamData{
@@ -1111,14 +1111,14 @@
omci.TransactionID(tid), omci.AddDefaults(true))
if err != nil {
logger.Errorw("Cannot encode .1pMapper for create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize .1pMapper create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -1129,21 +1129,21 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send .1pMapper create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send .1pMapper-create-msg done")
return meInstance
}
logger.Errorw("Cannot generate .1pMapper", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
func (oo *OmciCC) sendCreateMBPConfigDataVar(ctx context.Context, timeout int, highPrio bool,
rxChan chan Message, params ...me.ParamData) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
- logger.Debugw("send MBPCD-Create-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send MBPCD-Create-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16),
"InstId": strconv.FormatInt(int64(params[0].EntityID), 16)})
@@ -1154,14 +1154,14 @@
omci.TransactionID(tid), omci.AddDefaults(true))
if err != nil {
logger.Errorw("Cannot encode MBPCD for create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize MBPCD create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -1172,21 +1172,21 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send MBPCD create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send MBPCD-Create-msg done")
return meInstance
}
logger.Errorw("Cannot generate MBPCD Instance", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
func (oo *OmciCC) sendCreateGemNCTPVar(ctx context.Context, timeout int, highPrio bool,
rxChan chan Message, params ...me.ParamData) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
- logger.Debugw("send GemNCTP-Create-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send GemNCTP-Create-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16),
"InstId": strconv.FormatInt(int64(params[0].EntityID), 16)})
@@ -1197,14 +1197,14 @@
omci.TransactionID(tid), omci.AddDefaults(true))
if err != nil {
logger.Errorw("Cannot encode GemNCTP for create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize GemNCTP create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -1215,21 +1215,21 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send GemNCTP create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send GemNCTP-Create-msg done")
return meInstance
}
logger.Errorw("Cannot generate GemNCTP Instance", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
func (oo *OmciCC) sendCreateGemIWTPVar(ctx context.Context, timeout int, highPrio bool,
rxChan chan Message, params ...me.ParamData) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
- logger.Debugw("send GemIwTp-Create-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send GemIwTp-Create-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16),
"InstId": strconv.FormatInt(int64(params[0].EntityID), 16)})
@@ -1240,14 +1240,14 @@
omci.TransactionID(tid))
if err != nil {
logger.Errorw("Cannot encode GemIwTp for create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize GemIwTp create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -1258,21 +1258,21 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send GemIwTp create", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send GemIwTp-Create-msg done")
return meInstance
}
logger.Errorw("Cannot generate GemIwTp Instance", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
func (oo *OmciCC) sendSetTcontVar(ctx context.Context, timeout int, highPrio bool,
rxChan chan Message, params ...me.ParamData) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
- logger.Debugw("send TCont-Set-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send TCont-Set-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16),
"InstId": strconv.FormatInt(int64(params[0].EntityID), 16)})
@@ -1281,14 +1281,14 @@
omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
if err != nil {
logger.Errorw("Cannot encode TCont for set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize TCont set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -1299,21 +1299,21 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send TCont set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send TCont-set msg done")
return meInstance
}
logger.Errorw("Cannot generate TCont Instance", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
func (oo *OmciCC) sendSetPrioQueueVar(ctx context.Context, timeout int, highPrio bool,
rxChan chan Message, params ...me.ParamData) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
- logger.Debugw("send PrioQueue-Set-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send PrioQueue-Set-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16),
"InstId": strconv.FormatInt(int64(params[0].EntityID), 16)})
@@ -1322,14 +1322,14 @@
omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
if err != nil {
logger.Errorw("Cannot encode PrioQueue for set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize PrioQueue set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -1340,21 +1340,21 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send PrioQueue set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send PrioQueue-set msg done")
return meInstance
}
logger.Errorw("Cannot generate PrioQueue Instance", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
func (oo *OmciCC) sendSetDot1PMapperVar(ctx context.Context, timeout int, highPrio bool,
rxChan chan Message, params ...me.ParamData) *me.ManagedEntity {
tid := oo.GetNextTid(highPrio)
- logger.Debugw("send 1PMapper-Set-msg:", log.Fields{"deviceId": oo.deviceID,
+ logger.Debugw("send 1PMapper-Set-msg:", log.Fields{"device-id": oo.deviceID,
"SequNo": strconv.FormatInt(int64(tid), 16),
"InstId": strconv.FormatInt(int64(params[0].EntityID), 16)})
@@ -1363,14 +1363,14 @@
omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
if err != nil {
logger.Errorw("Cannot encode 1PMapper for set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
pkt, err := serializeOmciLayer(omciLayer, msgLayer)
if err != nil {
logger.Errorw("Cannot serialize 1PMapper set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
@@ -1381,13 +1381,13 @@
err = oo.Send(ctx, pkt, timeout, 0, highPrio, omciRxCallbackPair)
if err != nil {
logger.Errorw("Cannot send 1PMapper set", log.Fields{
- "Err": err, "deviceId": oo.deviceID})
+ "Err": err, "device-id": oo.deviceID})
return nil
}
logger.Debug("send 1PMapper-set msg done")
return meInstance
}
logger.Errorw("Cannot generate 1PMapper Instance", log.Fields{
- "Err": omciErr.GetError(), "deviceId": oo.deviceID})
+ "Err": omciErr.GetError(), "device-id": oo.deviceID})
return nil
}
diff --git a/internal/pkg/onuadaptercore/omci_test_request.go b/internal/pkg/onuadaptercore/omci_test_request.go
index cfb3096..a1600fd 100644
--- a/internal/pkg/onuadaptercore/omci_test_request.go
+++ b/internal/pkg/onuadaptercore/omci_test_request.go
@@ -78,12 +78,12 @@
cbEntry: CallbackPairEntry{nil, oo.ReceiveOmciVerifyResponse},
}
- logger.Debugw("performOmciTest-start sending frame", log.Fields{"for deviceId": oo.deviceID})
+ logger.Debugw("performOmciTest-start sending frame", log.Fields{"for device-id": oo.deviceID})
// send with default timeout and normal prio
go oo.pDevOmciCC.Send(ctx, onu2gBaseGet, ConstDefaultOmciTimeout, 0, false, omciRxCallbackPair)
} else {
- logger.Errorw("performOmciTest: Device does not exist", log.Fields{"for deviceId": oo.deviceID})
+ logger.Errorw("performOmciTest: Device does not exist", log.Fields{"for device-id": oo.deviceID})
}
}
diff --git a/internal/pkg/onuadaptercore/onu_device_db.go b/internal/pkg/onuadaptercore/onu_device_db.go
index 6f38584..63ad543 100644
--- a/internal/pkg/onuadaptercore/onu_device_db.go
+++ b/internal/pkg/onuadaptercore/onu_device_db.go
@@ -36,7 +36,7 @@
//OnuDeviceDB returns a new instance for a specific ONU_Device_Entry
func NewOnuDeviceDB(ctx context.Context, a_pOnuDeviceEntry *OnuDeviceEntry) *OnuDeviceDB {
- logger.Debugw("Init OnuDeviceDB for:", log.Fields{"deviceId": a_pOnuDeviceEntry.deviceID})
+ logger.Debugw("Init OnuDeviceDB for:", log.Fields{"device-id": a_pOnuDeviceEntry.deviceID})
var onuDeviceDB OnuDeviceDB
onuDeviceDB.ctx = ctx
onuDeviceDB.pOnuDeviceEntry = a_pOnuDeviceEntry
@@ -55,23 +55,23 @@
//logger.Debugw("Search for key data :", log.Fields{"deviceId": onuDeviceDB.pOnuDeviceEntry.deviceID, "meClassId": meClassId, "meEntityId": meEntityId})
meInstMap, ok := onuDeviceDB.meDb[meClassId]
if !ok {
- logger.Debugw("meClassId not found - add to db :", log.Fields{"deviceId": onuDeviceDB.pOnuDeviceEntry.deviceID})
+ logger.Debugw("meClassId not found - add to db :", log.Fields{"device-id": onuDeviceDB.pOnuDeviceEntry.deviceID})
meInstMap = make(map[uint16]me.AttributeValueMap)
onuDeviceDB.meDb[meClassId] = meInstMap
onuDeviceDB.meDb[meClassId][meEntityId] = meAttributes
} else {
meAttribs, ok := onuDeviceDB.meDb[meClassId][meEntityId]
if !ok {
- logger.Debugw("meEntityId not found - add to db :", log.Fields{"deviceId": onuDeviceDB.pOnuDeviceEntry.deviceID})
+ logger.Debugw("meEntityId not found - add to db :", log.Fields{"device-id": onuDeviceDB.pOnuDeviceEntry.deviceID})
onuDeviceDB.meDb[meClassId][meEntityId] = meAttributes
} else {
- logger.Debugw("ME-Instance exists already: merge attribute data :", log.Fields{"deviceId": onuDeviceDB.pOnuDeviceEntry.deviceID, "meAttribs": meAttribs})
+ logger.Debugw("ME-Instance exists already: merge attribute data :", log.Fields{"device-id": onuDeviceDB.pOnuDeviceEntry.deviceID, "meAttribs": meAttribs})
for k, v := range meAttributes {
meAttribs[k] = v
}
onuDeviceDB.meDb[meClassId][meEntityId] = meAttribs
- logger.Debugw("ME-Instance updated :", log.Fields{"deviceId": onuDeviceDB.pOnuDeviceEntry.deviceID, "meAttribs": meAttribs})
+ logger.Debugw("ME-Instance updated :", log.Fields{"device-id": onuDeviceDB.pOnuDeviceEntry.deviceID, "meAttribs": meAttribs})
}
}
}
@@ -80,7 +80,7 @@
if meAttributes, present := onuDeviceDB.meDb[meClassId][meEntityId]; present {
logger.Debugw("ME found:", log.Fields{"meClassId": meClassId, "meEntityId": meEntityId, "meAttributes": meAttributes,
- "deviceId": onuDeviceDB.pOnuDeviceEntry.deviceID})
+ "device-id": onuDeviceDB.pOnuDeviceEntry.deviceID})
return meAttributes
} else {
return nil
@@ -103,10 +103,10 @@
}
func (onuDeviceDB *OnuDeviceDB) LogMeDb() {
- logger.Debugw("ME instances stored for :", log.Fields{"deviceId": onuDeviceDB.pOnuDeviceEntry.deviceID})
+ logger.Debugw("ME instances stored for :", log.Fields{"device-id": onuDeviceDB.pOnuDeviceEntry.deviceID})
for meClassId, meInstMap := range onuDeviceDB.meDb {
for meEntityId, meAttribs := range meInstMap {
- logger.Debugw("ME instance: ", log.Fields{"meClassId": meClassId, "meEntityId": meEntityId, "meAttribs": meAttribs, "deviceId": onuDeviceDB.pOnuDeviceEntry.deviceID})
+ logger.Debugw("ME instance: ", log.Fields{"meClassId": meClassId, "meEntityId": meEntityId, "meAttribs": meAttribs, "device-id": onuDeviceDB.pOnuDeviceEntry.deviceID})
}
}
}
diff --git a/internal/pkg/onuadaptercore/onu_device_entry.go b/internal/pkg/onuadaptercore/onu_device_entry.go
index 53101be..7c7e3d1 100644
--- a/internal/pkg/onuadaptercore/onu_device_entry.go
+++ b/internal/pkg/onuadaptercore/onu_device_entry.go
@@ -207,7 +207,7 @@
func NewOnuDeviceEntry(ctx context.Context, device_id string, kVStoreHost string, kVStorePort int, kvStoreType string, device_Handler *DeviceHandler,
core_proxy adapterif.CoreProxy, adapter_proxy adapterif.AdapterProxy,
supported_Fsms_Ptr *OmciDeviceFsms) *OnuDeviceEntry {
- logger.Infow("init-onuDeviceEntry", log.Fields{"deviceId": device_id})
+ logger.Infow("init-onuDeviceEntry", log.Fields{"device-id": device_id})
var onuDeviceEntry OnuDeviceEntry
onuDeviceEntry.started = false
onuDeviceEntry.deviceID = device_id
@@ -359,7 +359,7 @@
onuDeviceEntry.mibTemplateKVStore = onuDeviceEntry.baseDeviceHandler.SetBackend(cBasePathMibTemplateKvStore)
if onuDeviceEntry.mibTemplateKVStore == nil {
- logger.Errorw("Failed to setup mibTemplateKVStore", log.Fields{"deviceID": device_id})
+ logger.Errorw("Failed to setup mibTemplateKVStore", log.Fields{"device-id": device_id})
}
// Alarm Synchronization Database
@@ -375,7 +375,7 @@
oo.PDevOmciCC = NewOmciCC(ctx, oo, oo.deviceID, oo.baseDeviceHandler,
oo.coreProxy, oo.adapterProxy)
if oo.PDevOmciCC == nil {
- logger.Errorw("Could not create devOmciCc - abort", log.Fields{"for device": oo.deviceID})
+ logger.Errorw("Could not create devOmciCc - abort", log.Fields{"for device-id": oo.deviceID})
return errors.New("Could not create devOmciCc")
}
@@ -397,7 +397,7 @@
func (oo *OnuDeviceEntry) Reboot(ctx context.Context) error {
logger.Info("reboot-OnuDeviceEntry")
if err := oo.PDevOmciCC.sendReboot(context.TODO(), ConstDefaultOmciTimeout, true, oo.omciRebootMessageReceivedChannel); err != nil {
- logger.Errorw("onu didn't reboot", log.Fields{"for device": oo.deviceID})
+ logger.Errorw("onu didn't reboot", log.Fields{"for device-id": oo.deviceID})
return err
}
logger.Info("OnuDeviceEntry-reboot")
@@ -421,7 +421,7 @@
if !msgOk {
return errors.New("Omci Msg layer could not be assigned for RebootResponseType")
}
- logger.Debugw("CreateResponse Data", log.Fields{"deviceId": oo.deviceID, "data-fields": msgObj})
+ logger.Debugw("CreateResponse Data", log.Fields{"device-id": oo.deviceID, "data-fields": msgObj})
if msgObj.Result != me.Success {
logger.Errorw("Omci RebootResponseType Error ", log.Fields{"Error": msgObj.Result})
// possibly force FSM into abort or ignore some errors for some messages? store error for mgmt display?
diff --git a/internal/pkg/onuadaptercore/onu_uni_port.go b/internal/pkg/onuadaptercore/onu_uni_port.go
index 2deecc3..568c1d0 100644
--- a/internal/pkg/onuadaptercore/onu_uni_port.go
+++ b/internal/pkg/onuadaptercore/onu_uni_port.go
@@ -83,7 +83,7 @@
//CreateVolthaPort creates the Voltha port based on ONU UNI Port and informs the core about it
func (oo *OnuUniPort) CreateVolthaPort(apDeviceHandler *DeviceHandler) error {
logger.Debugw("creating-voltha-uni-port", log.Fields{
- "deviceID": apDeviceHandler.device.Id, "portNo": oo.portNo})
+ "device-id": apDeviceHandler.device.Id, "portNo": oo.portNo})
//200630: per [VOL-3202] OF port info is now to be delivered within UniPort create
// not doing so crashes rw_core processing (at least still in 200630 version)
name := apDeviceHandler.device.SerialNumber + "-" + strconv.FormatUint(uint64(oo.macBpNo), 10)
@@ -137,12 +137,12 @@
return err
}
logger.Infow("Voltha onuUniPort-added", log.Fields{
- "deviceID": apDeviceHandler.device.Id, "PortNo": oo.portNo})
+ "device-id": apDeviceHandler.device.Id, "PortNo": oo.portNo})
oo.pPort = pUniPort
oo.operState = vc.OperStatus_DISCOVERED
} else {
logger.Warnw("could not create Voltha UniPort", log.Fields{
- "deviceID": apDeviceHandler.device.Id, "PortNo": oo.portNo})
+ "device-id": apDeviceHandler.device.Id, "PortNo": oo.portNo})
return errors.New("create Voltha UniPort failed")
}
return nil
diff --git a/internal/pkg/onuadaptercore/onu_uni_tp.go b/internal/pkg/onuadaptercore/onu_uni_tp.go
index ec94e37..728cac8 100644
--- a/internal/pkg/onuadaptercore/onu_uni_tp.go
+++ b/internal/pkg/onuadaptercore/onu_uni_tp.go
@@ -118,7 +118,7 @@
//NewOnuUniTechProf returns the instance of a OnuUniTechProf
//(one instance per ONU/deviceHandler for all possible UNI's)
func NewOnuUniTechProf(ctx context.Context, aDeviceID string, aDeviceHandler *DeviceHandler) *OnuUniTechProf {
- logger.Infow("init-OnuUniTechProf", log.Fields{"deviceId": aDeviceID})
+ logger.Infow("init-OnuUniTechProf", log.Fields{"device-id": aDeviceID})
var onuTP OnuUniTechProf
onuTP.deviceID = aDeviceID
onuTP.baseDeviceHandler = aDeviceHandler
@@ -133,14 +133,14 @@
onuTP.techProfileKVStore = aDeviceHandler.SetBackend(cBasePathTechProfileKVStore)
if onuTP.techProfileKVStore == nil {
logger.Errorw("Can't access techProfileKVStore - no backend connection to service",
- log.Fields{"deviceID": aDeviceID, "service": cBasePathTechProfileKVStore})
+ log.Fields{"device-id": aDeviceID, "service": cBasePathTechProfileKVStore})
}
onuTP.onuKVStorePath = onuTP.deviceID
onuTP.onuKVStore = aDeviceHandler.SetBackend(cBasePathOnuKVStore)
if onuTP.onuKVStore == nil {
logger.Errorw("Can't access onuKVStore - no backend connection to service",
- log.Fields{"deviceID": aDeviceID, "service": cBasePathOnuKVStore})
+ log.Fields{"device-id": aDeviceID, "service": cBasePathOnuKVStore})
}
return &onuTP
}
@@ -174,31 +174,31 @@
if aPathString == "" {
//existing entry to be deleted
logger.Debugw("UniTp path delete", log.Fields{
- "deviceID": onuTP.deviceID, "uniID": aUniID, "path": aPathString})
+ "device-id": onuTP.deviceID, "uniID": aUniID, "path": aPathString})
delete(onuTP.mapUniTpPath, aUniID)
} else {
//existing entry to be modified
logger.Debugw("UniTp path modify", log.Fields{
- "deviceID": onuTP.deviceID, "uniID": aUniID, "path": aPathString})
+ "device-id": onuTP.deviceID, "uniID": aUniID, "path": aPathString})
onuTP.mapUniTpPath[aUniID] = aPathString
}
return true
}
//entry already exists
logger.Debugw("UniTp path already exists", log.Fields{
- "deviceID": onuTP.deviceID, "uniID": aUniID, "path": aPathString})
+ "device-id": onuTP.deviceID, "uniID": aUniID, "path": aPathString})
return false
}
//uni entry does not exist
if aPathString == "" {
//delete request in non-existing state , accept as no change
logger.Debugw("UniTp path already removed", log.Fields{
- "deviceID": onuTP.deviceID, "uniID": aUniID})
+ "device-id": onuTP.deviceID, "uniID": aUniID})
return false
}
//new entry to be set
logger.Debugw("New UniTp path set", log.Fields{
- "deviceID": onuTP.deviceID, "uniID": aUniID, "path": aPathString})
+ "device-id": onuTP.deviceID, "uniID": aUniID, "path": aPathString})
onuTP.mapUniTpPath[aUniID] = aPathString
return true
}
@@ -219,7 +219,7 @@
aUniID uint32, aPathString string, wg *sync.WaitGroup) {
defer wg.Done() //always decrement the waitGroup on return
logger.Debugw("configure the Uni according to TpPath", log.Fields{
- "deviceID": onuTP.deviceID, "uniID": aUniID, "path": aPathString})
+ "device-id": onuTP.deviceID, "uniID": aUniID, "path": aPathString})
if onuTP.techProfileKVStore == nil {
logger.Debug("techProfileKVStore not set - abort")
@@ -291,13 +291,13 @@
} else {
// strange: UNI entry exists, but no ANI data, maybe such situation should be cleared up (if observed)
logger.Debugw("no Tcont/Gem data for this UNI found - abort", log.Fields{
- "deviceID": onuTP.deviceID, "uniID": aUniID})
+ "device-id": onuTP.deviceID, "uniID": aUniID})
onuTP.procResult = errors.New("TechProfile config aborted: no Tcont/Gem data found for this UNI")
return
}
} else {
logger.Debugw("no PonAni data for this UNI found - abort", log.Fields{
- "deviceID": onuTP.deviceID, "uniID": aUniID})
+ "device-id": onuTP.deviceID, "uniID": aUniID})
onuTP.procResult = errors.New("TechProfile config aborted: no AniSide data found for this UNI")
return
}
@@ -351,7 +351,7 @@
wg *sync.WaitGroup) {
defer wg.Done()
logger.Debugw("this would remove TP resources from ONU's UNI", log.Fields{
- "deviceID": onuTP.deviceID, "uniID": aUniID, "path": aPathString, "Resource": aResource})
+ "device-id": onuTP.deviceID, "uniID": aUniID, "path": aPathString, "Resource": aResource})
//TODO!!!
//delete the given resource from ONU OMCI config and data base - as background routine
/*
@@ -381,7 +381,7 @@
onuTP.sOnuPersistentData.PersUniTpPath =
append(onuTP.sOnuPersistentData.PersUniTpPath, uniPersData{PersUniId: k, PersTpPath: v})
}
- logger.Debugw("Update ONU/TP-data in KVStore", log.Fields{"deviceID": onuTP.deviceID, "onuTP.sOnuPersistentData": onuTP.sOnuPersistentData})
+ logger.Debugw("Update ONU/TP-data in KVStore", log.Fields{"device-id": onuTP.deviceID, "onuTP.sOnuPersistentData": onuTP.sOnuPersistentData})
Value, err := json.Marshal(onuTP.sOnuPersistentData)
if err != nil {
@@ -436,7 +436,7 @@
func (onuTP *OnuUniTechProf) deletePersistentData(ctx context.Context) error {
- logger.Debugw("delete ONU/TP-data in KVStore", log.Fields{"deviceID": onuTP.deviceID})
+ logger.Debugw("delete ONU/TP-data in KVStore", log.Fields{"device-id": onuTP.deviceID})
err := onuTP.onuKVStore.Delete(ctx, onuTP.onuKVStorePath)
if err != nil {
logger.Errorw("unable to delete in KVstore", log.Fields{"device-id": onuTP.deviceID, "err": err})
@@ -631,7 +631,7 @@
select {
case <-ctx.Done():
logger.Warnw("processing not completed in-time: force release of TpProcMutex!",
- log.Fields{"deviceID": onuTP.deviceID, "error": ctx.Err()})
+ log.Fields{"device-id": onuTP.deviceID, "error": ctx.Err()})
return false
case rxStep := <-onuTP.chTpProcessingStep:
if rxStep == aProcessingStep {
@@ -639,7 +639,7 @@
}
//all other values are not accepted - including 0 for error indication
logger.Warnw("Invalid processing step received: abort and force release of TpProcMutex!",
- log.Fields{"deviceID": onuTP.deviceID,
+ log.Fields{"device-id": onuTP.deviceID,
"wantedStep": aProcessingStep, "haveStep": rxStep})
return false
}
@@ -648,11 +648,11 @@
// createUniLockFsm initialises and runs the AniConfig FSM to transfer the OMCI related commands for ANI side configuration
func (onuTP *OnuUniTechProf) createAniConfigFsm(aUniID uint32,
apCurrentUniPort *OnuUniPort, devEvent OnuDeviceEvent, aProcessingStep uint8) {
- logger.Debugw("createAniConfigFsm", log.Fields{"deviceID": onuTP.deviceID})
+ logger.Debugw("createAniConfigFsm", log.Fields{"device-id": onuTP.deviceID})
chAniConfigFsm := make(chan Message, 2048)
pDevEntry := onuTP.baseDeviceHandler.GetOnuDeviceEntry(true)
if pDevEntry == nil {
- logger.Errorw("No valid OnuDevice - aborting", log.Fields{"deviceID": onuTP.deviceID})
+ logger.Errorw("No valid OnuDevice - aborting", log.Fields{"device-id": onuTP.deviceID})
return
}
pAniCfgFsm := NewUniPonAniConfigFsm(pDevEntry.PDevOmciCC, apCurrentUniPort, onuTP,
@@ -662,7 +662,7 @@
onuTP.pAniConfigFsm = pAniCfgFsm
onuTP.runAniConfigFsm(aProcessingStep)
} else {
- logger.Errorw("AniConfigFSM could not be created - abort!!", log.Fields{"deviceID": onuTP.deviceID})
+ logger.Errorw("AniConfigFSM could not be created - abort!!", log.Fields{"device-id": onuTP.deviceID})
}
}
@@ -683,15 +683,15 @@
} else {
/***** AniConfigFSM started */
logger.Debugw("AniConfigFSM started", log.Fields{
- "state": pACStatemachine.Current(), "deviceID": onuTP.deviceID})
+ "state": pACStatemachine.Current(), "device-id": onuTP.deviceID})
}
} else {
logger.Warnw("wrong state of AniConfigFSM - want: disabled", log.Fields{
- "have": pACStatemachine.Current(), "deviceID": onuTP.deviceID})
+ "have": pACStatemachine.Current(), "device-id": onuTP.deviceID})
// maybe try a FSM reset and then again ... - TODO!!!
}
} else {
- logger.Errorw("AniConfigFSM StateMachine invalid - cannot be executed!!", log.Fields{"deviceID": onuTP.deviceID})
+ logger.Errorw("AniConfigFSM StateMachine invalid - cannot be executed!!", log.Fields{"device-id": onuTP.deviceID})
// maybe try a FSM reset and then again ... - TODO!!!
}
}
diff --git a/internal/pkg/onuadaptercore/openonu.go b/internal/pkg/onuadaptercore/openonu.go
index 7250e18..fae3144 100644
--- a/internal/pkg/onuadaptercore/openonu.go
+++ b/internal/pkg/onuadaptercore/openonu.go
@@ -152,7 +152,7 @@
return errors.New("nil-device")
}
ctx := context.Background()
- logger.Infow("adopt-device", log.Fields{"deviceId": device.Id})
+ logger.Infow("adopt-device", log.Fields{"device-id": device.Id})
var handler *DeviceHandler
if handler = oo.getDeviceHandler(device.Id); handler == nil {
handler := NewDeviceHandler(oo.coreProxy, oo.adapterProxy, oo.eventProxy, device, oo)
@@ -166,7 +166,7 @@
//Get_ofp_device_info returns OFP information for the given device
func (oo *OpenONUAC) Get_ofp_device_info(device *voltha.Device) (*ic.SwitchCapability, error) {
- logger.Errorw("device-handler-not-set", log.Fields{"deviceId": device.Id})
+ logger.Errorw("device-handler-not-set", log.Fields{"device-id": device.Id})
return nil, errors.New("device-handler-not-set")
}
@@ -217,13 +217,13 @@
//Reconcile_device is called once when the adapter needs to re-create device - usually on core restart
func (oo *OpenONUAC) Reconcile_device(device *voltha.Device) error {
- logger.Debugw("Reconcile_device", log.Fields{"deviceId": device.Id})
+ logger.Debugw("Reconcile_device", log.Fields{"device-id": device.Id})
if handler := oo.getDeviceHandler(device.Id); handler != nil {
if err := handler.ReconcileDevice(device); err != nil {
return err
}
} else {
- logger.Warnw("no handler found for device-reconcilement", log.Fields{"deviceId": device.Id})
+ logger.Warnw("no handler found for device-reconcilement", log.Fields{"device-id": device.Id})
return fmt.Errorf(fmt.Sprintf("handler-not-found-%s", device.Id))
}
return nil
@@ -236,34 +236,34 @@
//Disable_device disables the given device
func (oo *OpenONUAC) Disable_device(device *voltha.Device) error {
- logger.Debugw("Disable_device", log.Fields{"deviceId": device.Id})
+ logger.Debugw("Disable_device", log.Fields{"device-id": device.Id})
if handler := oo.getDeviceHandler(device.Id); handler != nil {
go handler.DisableDevice(device)
return nil
}
- logger.Warnw("no handler found for device-disable", log.Fields{"deviceId": device.Id})
+ logger.Warnw("no handler found for device-disable", log.Fields{"device-id": device.Id})
return fmt.Errorf(fmt.Sprintf("handler-not-found-%s", device.Id))
}
//Reenable_device enables the onu device after disable
func (oo *OpenONUAC) Reenable_device(device *voltha.Device) error {
- logger.Debugw("Reenable_device", log.Fields{"deviceId": device.Id})
+ logger.Debugw("Reenable_device", log.Fields{"device-id": device.Id})
if handler := oo.getDeviceHandler(device.Id); handler != nil {
go handler.ReenableDevice(device)
return nil
}
- logger.Warnw("no handler found for device-reenable", log.Fields{"deviceId": device.Id})
+ logger.Warnw("no handler found for device-reenable", log.Fields{"device-id": device.Id})
return fmt.Errorf(fmt.Sprintf("handler-not-found-%s", device.Id))
}
//Reboot_device reboots the given device
func (oo *OpenONUAC) Reboot_device(device *voltha.Device) error {
- logger.Debugw("Reboot-device", log.Fields{"deviceId": device.Id})
+ logger.Debugw("Reboot-device", log.Fields{"device-id": device.Id})
if handler := oo.getDeviceHandler(device.Id); handler != nil {
go handler.RebootDevice(device)
return nil
}
- logger.Warnw("no handler found for device-reboot", log.Fields{"deviceId": device.Id})
+ logger.Warnw("no handler found for device-reboot", log.Fields{"device-id": device.Id})
return fmt.Errorf(fmt.Sprintf("handler-not-found-#{device.Id}"))
}
@@ -273,13 +273,13 @@
}
func (oo *OpenONUAC) Delete_device(device *voltha.Device) error {
- logger.Debugw("Delete_device", log.Fields{"deviceId": device.Id})
+ logger.Debugw("Delete_device", log.Fields{"device-id": device.Id})
if handler := oo.getDeviceHandler(device.Id); handler != nil {
if err := handler.DeleteDevice(device); err != nil {
return err
}
} else {
- logger.Warnw("no handler found for device-reconcilement", log.Fields{"deviceId": device.Id})
+ logger.Warnw("no handler found for device-reconcilement", log.Fields{"device-id": device.Id})
return fmt.Errorf(fmt.Sprintf("handler-not-found-%s", device.Id))
}
return nil
diff --git a/internal/pkg/onuadaptercore/uniportadmin.go b/internal/pkg/onuadaptercore/uniportadmin.go
index 6761ea7..8ff64ce 100644
--- a/internal/pkg/onuadaptercore/uniportadmin.go
+++ b/internal/pkg/onuadaptercore/uniportadmin.go
@@ -303,7 +303,7 @@
logger.Error("LockStateFsm - Omci Msg layer could not be assigned for SetResponse")
return
}
- logger.Debugw("LockStateFsm SetResponse Data", log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID, "data-fields": msgObj})
+ logger.Debugw("LockStateFsm SetResponse Data", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID, "data-fields": msgObj})
if msgObj.Result != me.Success {
logger.Errorw("LockStateFsm - Omci SetResponse Error - later: drive FSM to abort state ?", log.Fields{"Error": msgObj.Result})
// possibly force FSM into abort or ignore some errors for some messages? store error for mgmt display?
@@ -343,7 +343,7 @@
for uniNo, uniPort := range oFsm.pOmciCC.pBaseDeviceHandler.uniEntityMap {
logger.Debugw("Setting PPTP admin state", log.Fields{
- "deviceId": oFsm.pAdaptFsm.deviceID, "for PortNo": uniNo})
+ "device-id": oFsm.pAdaptFsm.deviceID, "for PortNo": uniNo})
var meInstance *me.ManagedEntity
if uniPort.portType == UniPPTP {
@@ -356,7 +356,7 @@
oFsm.pOmciCC.pLastTxMeInstance = meInstance
} else {
logger.Warnw("Unsupported PPTP type - skip",
- log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID, "Port": uniNo})
+ log.Fields{"device-id": oFsm.pAdaptFsm.deviceID, "Port": uniNo})
continue
}
@@ -364,14 +364,14 @@
err := oFsm.waitforOmciResponse(meInstance)
if err != nil {
logger.Errorw("PPTP Admin State set failed, aborting LockState set!",
- log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID, "Port": uniNo})
+ log.Fields{"device-id": oFsm.pAdaptFsm.deviceID, "Port": uniNo})
oFsm.pAdaptFsm.pFsm.Event(uniEvReset)
return
}
} //for all UNI ports
// if Config has been done for all UNI related instances let the FSM proceed
// while we did not check here, if there is some port at all - !?
- logger.Infow("PPTP config loop finished", log.Fields{"deviceId": oFsm.pAdaptFsm.deviceID})
+ logger.Infow("PPTP config loop finished", log.Fields{"device-id": oFsm.pAdaptFsm.deviceID})
oFsm.pAdaptFsm.pFsm.Event(uniEvRxUnisResp)
return
}