[VOL-3228] device-id logging consistancy
Change-Id: Id6fc343bc05aa5a9db27f854c21657b01fdc45ba
diff --git a/pkg/adapters/common/request_handler.go b/pkg/adapters/common/request_handler.go
index a92ed51..f3a93df 100644
--- a/pkg/adapters/common/request_handler.go
+++ b/pkg/adapters/common/request_handler.go
@@ -432,7 +432,7 @@
}
}
}
- logger.Debugw(ctx, "Update_pm_config", log.Fields{"deviceId": device.Id, "pmConfigs": pmConfigs})
+ logger.Debugw(ctx, "Update_pm_config", log.Fields{"device-id": device.Id, "pmConfigs": pmConfigs})
//Invoke the pm config update API of the adapter
if err := rhp.adapter.Update_pm_config(ctx, device, pmConfigs); err != nil {
return nil, status.Errorf(codes.NotFound, "%s", err.Error())
@@ -455,7 +455,7 @@
switch arg.Key {
case "deviceId":
if err := ptypes.UnmarshalAny(arg.Value, deviceId); err != nil {
- logger.Warnw(ctx, "cannot-unmarshal-deviceId", log.Fields{"error": err})
+ logger.Warnw(ctx, "cannot-unmarshal-device-id", log.Fields{"error": err})
return nil, err
}
case "outPort":
@@ -475,7 +475,7 @@
}
}
}
- logger.Debugw(ctx, "Receive_packet_out", log.Fields{"deviceId": deviceId.Val, "outPort": egressPort, "packet": packet})
+ logger.Debugw(ctx, "Receive_packet_out", log.Fields{"device-id": deviceId.Val, "outPort": egressPort, "packet": packet})
//Invoke the adopt device on the adapter
if err := rhp.adapter.Receive_packet_out(ctx, deviceId.Val, int(egressPort.Val), packet); err != nil {
return nil, status.Errorf(codes.NotFound, "%s", err.Error())
@@ -514,7 +514,7 @@
}
}
- logger.Debugw(ctx, "Get_ofp_device_info", log.Fields{"deviceId": device.Id})
+ logger.Debugw(ctx, "Get_ofp_device_info", log.Fields{"device-id": device.Id})
var cap *ic.SwitchCapability
var err error
@@ -582,7 +582,7 @@
logger.Debugw(ctx, "enable_port", log.Fields{"args": args})
deviceId, port, err := rhp.getEnableDisableParams(ctx, args)
if err != nil {
- logger.Warnw(ctx, "enable_port", log.Fields{"args": args, "deviceId": deviceId, "port": port})
+ logger.Warnw(ctx, "enable_port", log.Fields{"args": args, "device-id": deviceId, "port": port})
return err
}
return rhp.adapter.Enable_port(ctx, deviceId, port)
@@ -592,7 +592,7 @@
logger.Debugw(ctx, "disable_port", log.Fields{"args": args})
deviceId, port, err := rhp.getEnableDisableParams(ctx, args)
if err != nil {
- logger.Warnw(ctx, "disable_port", log.Fields{"args": args, "deviceId": deviceId, "port": port})
+ logger.Warnw(ctx, "disable_port", log.Fields{"args": args, "device-id": deviceId, "port": port})
return err
}
return rhp.adapter.Disable_port(ctx, deviceId, port)
@@ -717,7 +717,7 @@
}
case "pDeviceId":
if err := ptypes.UnmarshalAny(arg.Value, pDeviceId); err != nil {
- logger.Warnw(ctx, "cannot-unmarshal-parent-deviceId", log.Fields{"error": err})
+ logger.Warnw(ctx, "cannot-unmarshal-parent-device-id", log.Fields{"error": err})
return nil, err
}
case "valuetype":