[VOL-4371] Voltha protos cleanup
Change-Id: I089b100a4a6268f455b6554051e21d5ca2578204
diff --git a/internal/pkg/core/device_handler.go b/internal/pkg/core/device_handler.go
index d1bd5c1..87a7410 100755
--- a/internal/pkg/core/device_handler.go
+++ b/internal/pkg/core/device_handler.go
@@ -45,8 +45,9 @@
"github.com/opencord/voltha-openonu-adapter-go/internal/pkg/swupg"
uniprt "github.com/opencord/voltha-openonu-adapter-go/internal/pkg/uniprt"
vc "github.com/opencord/voltha-protos/v5/go/common"
+ ca "github.com/opencord/voltha-protos/v5/go/core_adapter"
"github.com/opencord/voltha-protos/v5/go/extension"
- ic "github.com/opencord/voltha-protos/v5/go/inter_container"
+ ia "github.com/opencord/voltha-protos/v5/go/inter_adapter"
of "github.com/opencord/voltha-protos/v5/go/openflow_13"
"github.com/opencord/voltha-protos/v5/go/openolt"
oop "github.com/opencord/voltha-protos/v5/go/openolt"
@@ -126,7 +127,7 @@
addFlow bool // if true flow to be added, else removed
flowItem *of.OfpFlowStats
uniPort *cmn.OnuUniPort
- flowMetaData *voltha.FlowMetadata
+ flowMetaData *of.FlowMetadata
respChan *chan error // channel to report the Flow handling error
}
@@ -313,7 +314,7 @@
}
-func (dh *deviceHandler) handleOMCIIndication(ctx context.Context, msg *ic.OmciMessage) error {
+func (dh *deviceHandler) handleOMCIIndication(ctx context.Context, msg *ia.OmciMessage) error {
/* msg print moved symmetrically to omci_cc, if wanted here as additional debug, than perhaps only based on additional debug setting!
//assuming omci message content is hex coded!
// with restricted output of 16(?) bytes would be ...omciMsg.Message[:16]
@@ -331,7 +332,7 @@
return fmt.Errorf("no valid OnuDevice: %s", dh.DeviceID)
}
-func (dh *deviceHandler) handleTechProfileDownloadRequest(ctx context.Context, techProfMsg *ic.TechProfileDownloadMessage) error {
+func (dh *deviceHandler) handleTechProfileDownloadRequest(ctx context.Context, techProfMsg *ia.TechProfileDownloadMessage) error {
logger.Infow(ctx, "tech-profile-download-request", log.Fields{"device-id": dh.DeviceID})
pDevEntry := dh.GetOnuDeviceEntry(ctx, true)
@@ -375,7 +376,7 @@
if bTpModify := pDevEntry.UpdateOnuUniTpPath(ctx, uniID, uint8(tpID), techProfMsg.TpInstancePath); bTpModify {
switch tpInst := techProfMsg.TechTpInstance.(type) {
- case *ic.TechProfileDownloadMessage_TpInstance:
+ case *ia.TechProfileDownloadMessage_TpInstance:
logger.Debugw(ctx, "onu-uni-tp-path-modified", log.Fields{"uniID": uniID, "tp-path": techProfMsg.TpInstancePath, "tpID": tpID})
// if there has been some change for some uni TechProfilePath
//in order to allow concurrent calls to other dh instances we do not wait for execution here
@@ -421,7 +422,7 @@
return nil
}
-func (dh *deviceHandler) handleDeleteGemPortRequest(ctx context.Context, delGemPortMsg *ic.DeleteGemPortMessage) error {
+func (dh *deviceHandler) handleDeleteGemPortRequest(ctx context.Context, delGemPortMsg *ia.DeleteGemPortMessage) error {
logger.Infow(ctx, "delete-gem-port-request start", log.Fields{"device-id": dh.DeviceID})
if dh.pOnuTP == nil {
@@ -456,7 +457,7 @@
}
-func (dh *deviceHandler) handleDeleteTcontRequest(ctx context.Context, delTcontMsg *ic.DeleteTcontMessage) error {
+func (dh *deviceHandler) handleDeleteTcontRequest(ctx context.Context, delTcontMsg *ia.DeleteTcontMessage) error {
logger.Infow(ctx, "delete-tcont-request start", log.Fields{"device-id": dh.DeviceID})
pDevEntry := dh.GetOnuDeviceEntry(ctx, true)
@@ -553,7 +554,7 @@
//FlowUpdateIncremental removes and/or adds the flow changes on a given device
func (dh *deviceHandler) FlowUpdateIncremental(ctx context.Context,
apOfFlowChanges *of.FlowChanges,
- apOfGroupChanges *of.FlowGroupChanges, apFlowMetaData *voltha.FlowMetadata) error {
+ apOfGroupChanges *of.FlowGroupChanges, apFlowMetaData *of.FlowMetadata) error {
logger.Debugw(ctx, "FlowUpdateIncremental started", log.Fields{"device-id": dh.DeviceID, "flow": apOfFlowChanges, "metadata": apFlowMetaData})
var errorsList []error
var retError error
@@ -749,7 +750,7 @@
} else {
logger.Debugw(ctx, "DeviceStateUpdate upon disable", log.Fields{"ConnectStatus": voltha.ConnectStatus_REACHABLE,
"OperStatus": voltha.OperStatus_UNKNOWN, "device-id": dh.DeviceID})
- if err := dh.updateDeviceStateInCore(ctx, &ic.DeviceStateFilter{
+ if err := dh.updateDeviceStateInCore(ctx, &ca.DeviceStateFilter{
DeviceId: dh.DeviceID,
ConnStatus: voltha.ConnectStatus_REACHABLE,
OperStatus: voltha.OperStatus_UNKNOWN,
@@ -862,7 +863,7 @@
// Request the TpInstance again from the openolt adapter in case of reconcile
iaTechTpInst, err := dh.getTechProfileInstanceFromParentAdapter(ctx,
dh.device.ProxyAddress.AdapterEndpoint,
- &ic.TechProfileInstanceRequestMessage{
+ &ia.TechProfileInstanceRequestMessage{
DeviceId: dh.device.Id,
TpInstancePath: uniData.PersTpPathMap[tpID],
ParentDeviceId: dh.parentID,
@@ -878,7 +879,7 @@
}
var tpInst tech_profile.TechProfileInstance
switch techTpInst := iaTechTpInst.TechTpInstance.(type) {
- case *ic.TechProfileDownloadMessage_TpInstance: // supports only GPON, XGPON, XGS-PON
+ case *ia.TechProfileDownloadMessage_TpInstance: // supports only GPON, XGPON, XGS-PON
tpInst = *techTpInst.TpInstance
logger.Debugw(ctx, "received-tp-instance-successfully-after-reconcile", log.Fields{
"tp-id": tpID, "tpPath": uniData.PersTpPathMap[tpID], "uni-id": uniData.PersUniID, "device-id": dh.DeviceID})
@@ -1102,7 +1103,7 @@
logger.Debugw(ctx, "call DeviceStateUpdate upon reboot", log.Fields{"ConnectStatus": voltha.ConnectStatus_REACHABLE,
"OperStatus": voltha.OperStatus_DISCOVERED, "device-id": dh.DeviceID})
- if err := dh.updateDeviceStateInCore(ctx, &ic.DeviceStateFilter{
+ if err := dh.updateDeviceStateInCore(ctx, &ca.DeviceStateFilter{
DeviceId: dh.DeviceID,
ConnStatus: voltha.ConnectStatus_REACHABLE,
OperStatus: voltha.OperStatus_DISCOVERED,
@@ -1687,7 +1688,7 @@
// Update onu state as down in onu adapter
onuInd := oop.OnuIndication{}
onuInd.OperState = "down"
- er := dh.adapterProxy.SendInterAdapterMessage(ctx, &onuInd, ic.InterAdapterMessageType_ONU_IND_REQUEST,
+ er := dh.adapterProxy.SendInterAdapterMessage(ctx, &onuInd, ca.InterAdapterMessageType_ONU_IND_REQUEST,
"openolt", onuDevice.Type, onuDevice.Id, onuDevice.ProxyAddress.DeviceId, "")
if er != nil {
logger.Errorw("Failed to send inter-adapter-message", log.Fields{"OnuInd": onuInd,
@@ -1794,7 +1795,7 @@
logger.Debugw(ctx, "call DeviceStateUpdate upon create interface", log.Fields{"ConnectStatus": voltha.ConnectStatus_REACHABLE,
"OperStatus": voltha.OperStatus_ACTIVATING, "device-id": dh.DeviceID})
- if err := dh.updateDeviceStateInCore(ctx, &ic.DeviceStateFilter{
+ if err := dh.updateDeviceStateInCore(ctx, &ca.DeviceStateFilter{
DeviceId: dh.DeviceID,
OperStatus: voltha.OperStatus_ACTIVATING,
ConnStatus: voltha.ConnectStatus_REACHABLE,
@@ -2014,7 +2015,7 @@
}
logger.Debugw(ctx, "call DeviceStateUpdate upon update interface", log.Fields{"ConnectStatus": voltha.ConnectStatus_UNREACHABLE,
"OperStatus": voltha.OperStatus_DISCOVERED, "device-id": dh.DeviceID})
- if err := dh.updateDeviceStateInCore(ctx, &ic.DeviceStateFilter{
+ if err := dh.updateDeviceStateInCore(ctx, &ca.DeviceStateFilter{
DeviceId: dh.DeviceID,
ConnStatus: voltha.ConnectStatus_UNREACHABLE,
OperStatus: voltha.OperStatus_DISCOVERED,
@@ -2198,7 +2199,7 @@
// in case of adapter restart connected to an ONU upgrade I would not rely on the image quality
// maybe some 'forced' commitment can be done in this situation from system management (or upgrade restarted)
dh.checkOnOnuImageCommit(ctx)
- if err := dh.updateDeviceStateInCore(ctx, &ic.DeviceStateFilter{
+ if err := dh.updateDeviceStateInCore(ctx, &ca.DeviceStateFilter{
DeviceId: dh.DeviceID,
ConnStatus: voltha.ConnectStatus_REACHABLE,
OperStatus: voltha.OperStatus_ACTIVE,
@@ -2296,7 +2297,7 @@
logger.Debugw(ctx, "DeviceStateUpdate upon disable", log.Fields{"ConnectStatus": voltha.ConnectStatus_REACHABLE,
"OperStatus": voltha.OperStatus_UNKNOWN, "device-id": dh.DeviceID})
- if err := dh.updateDeviceStateInCore(ctx, &ic.DeviceStateFilter{
+ if err := dh.updateDeviceStateInCore(ctx, &ca.DeviceStateFilter{
DeviceId: dh.DeviceID,
ConnStatus: voltha.ConnectStatus_REACHABLE,
OperStatus: voltha.OperStatus_UNKNOWN,
@@ -2329,7 +2330,7 @@
func (dh *deviceHandler) processUniEnableStateDoneEvent(ctx context.Context, devEvent cmn.OnuDeviceEvent) {
logger.Debugw(ctx, "DeviceStateUpdate upon re-enable", log.Fields{"ConnectStatus": voltha.ConnectStatus_REACHABLE,
"OperStatus": voltha.OperStatus_ACTIVE, "device-id": dh.DeviceID})
- if err := dh.updateDeviceStateInCore(ctx, &ic.DeviceStateFilter{
+ if err := dh.updateDeviceStateInCore(ctx, &ca.DeviceStateFilter{
DeviceId: dh.DeviceID,
ConnStatus: voltha.ConnectStatus_REACHABLE,
OperStatus: voltha.OperStatus_ACTIVE,
@@ -2363,7 +2364,7 @@
func (dh *deviceHandler) processUniEnableStateFailedEvent(ctx context.Context, devEvent cmn.OnuDeviceEvent) {
logger.Debugw(ctx, "DeviceStateUpdate upon re-enable failure. ", log.Fields{
"OperStatus": voltha.OperStatus_FAILED, "device-id": dh.DeviceID})
- if err := dh.updateDeviceStateInCore(ctx, &ic.DeviceStateFilter{
+ if err := dh.updateDeviceStateInCore(ctx, &ca.DeviceStateFilter{
DeviceId: dh.DeviceID,
OperStatus: voltha.OperStatus_FAILED,
}); err != nil {
@@ -2572,7 +2573,7 @@
if !dh.IsReconciling() {
//maybe also use getter functions on uniPort - perhaps later ...
go func(port *cmn.OnuUniPort) {
- if err := dh.updatePortStateInCore(ctx, &ic.PortState{
+ if err := dh.updatePortStateInCore(ctx, &ca.PortState{
DeviceId: dh.DeviceID,
PortType: voltha.Port_ETHERNET_UNI,
PortNo: port.PortNo,
@@ -2601,7 +2602,7 @@
if !dh.IsReconciling() {
//maybe also use getter functions on uniPort - perhaps later ...
go func(port *cmn.OnuUniPort) {
- if err := dh.updatePortStateInCore(ctx, &ic.PortState{
+ if err := dh.updatePortStateInCore(ctx, &ca.PortState{
DeviceId: dh.DeviceID,
PortType: voltha.Port_ETHERNET_UNI,
PortNo: port.PortNo,
@@ -3045,7 +3046,7 @@
//addFlowItemToUniPort parses the actual flow item to add it to the UniPort
func (dh *deviceHandler) addFlowItemToUniPort(ctx context.Context, apFlowItem *of.OfpFlowStats, apUniPort *cmn.OnuUniPort,
- apFlowMetaData *voltha.FlowMetadata, respChan *chan error) {
+ apFlowMetaData *of.FlowMetadata, respChan *chan error) {
var loSetVlan uint16 = uint16(of.OfpVlanId_OFPVID_NONE) //noValidEntry
var loMatchVlan uint16 = uint16(of.OfpVlanId_OFPVID_PRESENT) //reserved VLANID entry
var loAddPcp, loSetPcp uint8
@@ -3105,7 +3106,7 @@
logger.Debugw(ctx, "flow-add vlan-set", log.Fields{"device-id": dh.DeviceID})
}
- var meter *voltha.OfpMeterConfig
+ var meter *of.OfpMeterConfig
if apFlowMetaData != nil {
meter = apFlowMetaData.Meters[0]
}
@@ -3194,7 +3195,7 @@
// if this function is called from possibly concurrent processes it must be mutex-protected from the caller!
// precondition: dh.lockVlanConfig is locked by the caller!
func (dh *deviceHandler) createVlanFilterFsm(ctx context.Context, apUniPort *cmn.OnuUniPort, aTpID uint8, aCookieSlice []uint64,
- aMatchVlan uint16, aSetVlan uint16, aSetPcp uint8, aDevEvent cmn.OnuDeviceEvent, lastFlowToReconcile bool, aMeter *voltha.OfpMeterConfig, respChan *chan error) error {
+ aMatchVlan uint16, aSetVlan uint16, aSetPcp uint8, aDevEvent cmn.OnuDeviceEvent, lastFlowToReconcile bool, aMeter *of.OfpMeterConfig, respChan *chan error) error {
chVlanFilterFsm := make(chan cmn.Message, 2048)
pDevEntry := dh.GetOnuDeviceEntry(ctx, true)
@@ -3379,7 +3380,7 @@
dh.SetDeviceReason(deviceReason)
if notifyCore {
//TODO with VOL-3045/VOL-3046: return the error and stop further processing at calling position
- if err := dh.updateDeviceReasonInCore(ctx, &ic.DeviceReason{
+ if err := dh.updateDeviceReasonInCore(ctx, &ca.DeviceReason{
DeviceId: dh.DeviceID,
Reason: cmn.DeviceReasonMap[deviceReason],
}); err != nil {
@@ -3582,7 +3583,7 @@
}
dh.pOnuMetricsMgr.OnuMetricsManagerLock.Unlock()
} /* else { // metrics are not managed as a group
- // TODO: We currently do not have standalone metrics. When available, add code here to fetch the metric.
+ // TODO: We currently do not have standalone metrics. When available, add code here to fetch the metrca.
} */
}
}
@@ -3835,7 +3836,7 @@
}
logger.Debugw(ctx, "reconciling has been finished in time",
log.Fields{"device-id": dh.DeviceID})
- if err := dh.updateDeviceStateInCore(ctx, &ic.DeviceStateFilter{
+ if err := dh.updateDeviceStateInCore(ctx, &ca.DeviceStateFilter{
DeviceId: dh.DeviceID,
ConnStatus: connectStatus,
OperStatus: operState,
@@ -3941,7 +3942,7 @@
}
logger.Debugw(ctx, "Core DeviceStateUpdate", log.Fields{"connectStatus": connectStatus, "operState": voltha.OperStatus_RECONCILING_FAILED})
- if err := dh.updateDeviceStateInCore(ctx, &ic.DeviceStateFilter{
+ if err := dh.updateDeviceStateInCore(ctx, &ca.DeviceStateFilter{
DeviceId: dh.DeviceID,
ConnStatus: connectStatus,
OperStatus: voltha.OperStatus_RECONCILING_FAILED,
@@ -3966,7 +3967,7 @@
return cClient.GetDevice(subCtx, &vc.ID{Id: deviceID})
}
-func (dh *deviceHandler) updateDeviceStateInCore(ctx context.Context, deviceStateFilter *ic.DeviceStateFilter) error {
+func (dh *deviceHandler) updateDeviceStateInCore(ctx context.Context, deviceStateFilter *ca.DeviceStateFilter) error {
cClient, err := dh.coreClient.GetCoreServiceClient()
if err != nil || cClient == nil {
return err
@@ -4014,7 +4015,7 @@
return err
}
-func (dh *deviceHandler) updatePortStateInCore(ctx context.Context, portState *ic.PortState) error {
+func (dh *deviceHandler) updatePortStateInCore(ctx context.Context, portState *ca.PortState) error {
cClient, err := dh.coreClient.GetCoreServiceClient()
if err != nil || cClient == nil {
return err
@@ -4026,7 +4027,7 @@
return err
}
-func (dh *deviceHandler) updateDeviceReasonInCore(ctx context.Context, reason *ic.DeviceReason) error {
+func (dh *deviceHandler) updateDeviceReasonInCore(ctx context.Context, reason *ca.DeviceReason) error {
cClient, err := dh.coreClient.GetCoreServiceClient()
if err != nil || cClient == nil {
return err
@@ -4043,7 +4044,7 @@
*/
func (dh *deviceHandler) getTechProfileInstanceFromParentAdapter(ctx context.Context, parentEndpoint string,
- request *ic.TechProfileInstanceRequestMessage) (*ic.TechProfileDownloadMessage, error) {
+ request *ia.TechProfileInstanceRequestMessage) (*ia.TechProfileDownloadMessage, error) {
pgClient, err := dh.pOpenOnuAc.getParentAdapterServiceClient(parentEndpoint)
if err != nil || pgClient == nil {
return nil, err
@@ -4084,7 +4085,7 @@
}
}
-func (dh *deviceHandler) SendOMCIRequest(ctx context.Context, parentEndpoint string, request *ic.OmciMessage) error {
+func (dh *deviceHandler) SendOMCIRequest(ctx context.Context, parentEndpoint string, request *ia.OmciMessage) error {
pgClient, err := dh.pOpenOnuAc.getParentAdapterServiceClient(parentEndpoint)
if err != nil || pgClient == nil {
return err
diff --git a/internal/pkg/core/openonu.go b/internal/pkg/core/openonu.go
index f0d9ecc..83ed30f 100755
--- a/internal/pkg/core/openonu.go
+++ b/internal/pkg/core/openonu.go
@@ -25,18 +25,21 @@
"time"
vgrpc "github.com/opencord/voltha-lib-go/v7/pkg/grpc"
- "github.com/opencord/voltha-protos/v5/go/adapter_services"
conf "github.com/opencord/voltha-lib-go/v7/pkg/config"
"github.com/opencord/voltha-protos/v5/go/common"
+ "github.com/opencord/voltha-protos/v5/go/health"
+ "github.com/opencord/voltha-protos/v5/go/olt_inter_adapter_service"
"google.golang.org/grpc"
"github.com/golang/protobuf/ptypes/empty"
"github.com/opencord/voltha-lib-go/v7/pkg/db/kvstore"
"github.com/opencord/voltha-lib-go/v7/pkg/events/eventif"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
+ ca "github.com/opencord/voltha-protos/v5/go/core_adapter"
"github.com/opencord/voltha-protos/v5/go/extension"
- ic "github.com/opencord/voltha-protos/v5/go/inter_container"
+ ia "github.com/opencord/voltha-protos/v5/go/inter_adapter"
+ "github.com/opencord/voltha-protos/v5/go/omci"
"github.com/opencord/voltha-protos/v5/go/voltha"
cmn "github.com/opencord/voltha-openonu-adapter-go/internal/pkg/common"
@@ -209,8 +212,8 @@
}
// GetHealthStatus is used as a service readiness validation as a grpc connection
-func (oo *OpenONUAC) GetHealthStatus(ctx context.Context, empty *empty.Empty) (*voltha.HealthStatus, error) {
- return &voltha.HealthStatus{State: voltha.HealthStatus_HEALTHY}, nil
+func (oo *OpenONUAC) GetHealthStatus(ctx context.Context, empty *empty.Empty) (*health.HealthStatus, error) {
+ return &health.HealthStatus{State: health.HealthStatus_HEALTHY}, nil
}
// AdoptDevice creates a new device handler if not present already and then adopts the device
@@ -248,7 +251,7 @@
handler := newDeviceHandler(ctx, oo.coreClient, oo.eventProxy, device, oo)
oo.addDeviceHandlerToMap(ctx, handler)
handler.device = device
- if err := handler.updateDeviceStateInCore(log.WithSpanFromContext(context.Background(), ctx), &ic.DeviceStateFilter{
+ if err := handler.updateDeviceStateInCore(log.WithSpanFromContext(context.Background(), ctx), &ca.DeviceStateFilter{
DeviceId: device.Id,
OperStatus: voltha.OperStatus_RECONCILING,
ConnStatus: device.ConnectStatus,
@@ -360,7 +363,7 @@
}
//UpdateFlowsIncrementally updates (add/remove) the flows on a given device
-func (oo *OpenONUAC) UpdateFlowsIncrementally(ctx context.Context, incrFlows *ic.IncrementalFlows) (*empty.Empty, error) {
+func (oo *OpenONUAC) UpdateFlowsIncrementally(ctx context.Context, incrFlows *ca.IncrementalFlows) (*empty.Empty, error) {
logger.Infow(ctx, "update-flows-incrementally", log.Fields{"device-id": incrFlows.Device.Id})
//flow config is relayed to handler even if the device might be in some 'inactive' state
@@ -390,7 +393,7 @@
}
//UpdatePmConfig returns PmConfigs nil or error
-func (oo *OpenONUAC) UpdatePmConfig(ctx context.Context, configs *ic.PmConfigsInfo) (*empty.Empty, error) {
+func (oo *OpenONUAC) UpdatePmConfig(ctx context.Context, configs *ca.PmConfigsInfo) (*empty.Empty, error) {
logger.Infow(ctx, "update-pm-config", log.Fields{"device-id": configs.DeviceId})
if handler := oo.getDeviceHandler(ctx, configs.DeviceId, false); handler != nil {
if err := handler.updatePmConfig(log.WithSpanFromContext(context.Background(), ctx), configs.PmConfigs); err != nil {
@@ -404,7 +407,7 @@
//DownloadImage requests downloading some image according to indications as given in request
//The ImageDownload needs to be called `request`due to library reflection requirements
-func (oo *OpenONUAC) DownloadImage(ctx context.Context, imageInfo *ic.ImageDownloadMessage) (*voltha.ImageDownload, error) {
+func (oo *OpenONUAC) DownloadImage(ctx context.Context, imageInfo *ca.ImageDownloadMessage) (*voltha.ImageDownload, error) {
ctx = log.WithSpanFromContext(context.Background(), ctx)
if imageInfo != nil && imageInfo.Image != nil && imageInfo.Image.Name != "" {
if !oo.pDownloadManager.ImageExists(ctx, imageInfo.Image) {
@@ -427,7 +430,7 @@
//ActivateImageUpdate requests downloading some Onu Software image to the ONU via OMCI
// according to indications as given in request and on success activate the image on the ONU
//The ImageDownload needs to be called `request`due to library reflection requirements
-func (oo *OpenONUAC) ActivateImageUpdate(ctx context.Context, imageInfo *ic.ImageDownloadMessage) (*voltha.ImageDownload, error) {
+func (oo *OpenONUAC) ActivateImageUpdate(ctx context.Context, imageInfo *ca.ImageDownloadMessage) (*voltha.ImageDownload, error) {
if imageInfo != nil && imageInfo.Image != nil && imageInfo.Image.Name != "" {
if oo.pDownloadManager.ImageLocallyDownloaded(ctx, imageInfo.Image) {
if handler := oo.getDeviceHandler(ctx, imageInfo.Device.Id, false); handler != nil {
@@ -855,7 +858,7 @@
*/
// OnuIndication is part of the ONU Inter-adapter service API.
-func (oo *OpenONUAC) OnuIndication(ctx context.Context, onuInd *ic.OnuIndicationMessage) (*empty.Empty, error) {
+func (oo *OpenONUAC) OnuIndication(ctx context.Context, onuInd *ia.OnuIndicationMessage) (*empty.Empty, error) {
logger.Debugw(ctx, "onu-indication", log.Fields{"onu-indication": onuInd})
if onuInd == nil || onuInd.OnuIndication == nil {
@@ -896,7 +899,7 @@
}
// OmciIndication is part of the ONU Inter-adapter service API.
-func (oo *OpenONUAC) OmciIndication(ctx context.Context, msg *ic.OmciMessage) (*empty.Empty, error) {
+func (oo *OpenONUAC) OmciIndication(ctx context.Context, msg *ia.OmciMessage) (*empty.Empty, error) {
logger.Debugw(ctx, "omci-response", log.Fields{"parent-device-id": msg.ParentDeviceId, "child-device-id": msg.ChildDeviceId})
if handler := oo.getDeviceHandler(ctx, msg.ChildDeviceId, false); handler != nil {
@@ -909,7 +912,7 @@
}
// DownloadTechProfile is part of the ONU Inter-adapter service API.
-func (oo *OpenONUAC) DownloadTechProfile(ctx context.Context, tProfile *ic.TechProfileDownloadMessage) (*empty.Empty, error) {
+func (oo *OpenONUAC) DownloadTechProfile(ctx context.Context, tProfile *ia.TechProfileDownloadMessage) (*empty.Empty, error) {
logger.Debugw(ctx, "download-tech-profile", log.Fields{"uni-id": tProfile.UniId})
if handler := oo.getDeviceHandler(ctx, tProfile.DeviceId, false); handler != nil {
@@ -922,7 +925,7 @@
}
// DeleteGemPort is part of the ONU Inter-adapter service API.
-func (oo *OpenONUAC) DeleteGemPort(ctx context.Context, gPort *ic.DeleteGemPortMessage) (*empty.Empty, error) {
+func (oo *OpenONUAC) DeleteGemPort(ctx context.Context, gPort *ia.DeleteGemPortMessage) (*empty.Empty, error) {
logger.Debugw(ctx, "delete-gem-port", log.Fields{"device-id": gPort.DeviceId, "uni-id": gPort.UniId})
if handler := oo.getDeviceHandler(ctx, gPort.DeviceId, false); handler != nil {
@@ -935,7 +938,7 @@
}
// DeleteTCont is part of the ONU Inter-adapter service API.
-func (oo *OpenONUAC) DeleteTCont(ctx context.Context, tConf *ic.DeleteTcontMessage) (*empty.Empty, error) {
+func (oo *OpenONUAC) DeleteTCont(ctx context.Context, tConf *ia.DeleteTcontMessage) (*empty.Empty, error) {
logger.Debugw(ctx, "delete-tcont", log.Fields{"tconf": tConf})
if handler := oo.getDeviceHandler(ctx, tConf.DeviceId, false); handler != nil {
@@ -991,7 +994,7 @@
return nil
}
-func (oo *OpenONUAC) getParentAdapterServiceClient(endpoint string) (adapter_services.OltInterAdapterServiceClient, error) {
+func (oo *OpenONUAC) getParentAdapterServiceClient(endpoint string) (olt_inter_adapter_service.OltInterAdapterServiceClient, error) {
// First check from cache
oo.lockParentAdapterClients.RLock()
if pgClient, ok := oo.parentAdapterClients[endpoint]; ok {
@@ -1026,8 +1029,8 @@
// setAndTestAdapterServiceHandler is used to test whether the remote gRPC service is up
func setAndTestAdapterServiceHandler(ctx context.Context, conn *grpc.ClientConn) interface{} {
- svc := adapter_services.NewOltInterAdapterServiceClient(conn)
- if h, err := svc.GetHealthStatus(ctx, &empty.Empty{}); err != nil || h.State != voltha.HealthStatus_HEALTHY {
+ svc := olt_inter_adapter_service.NewOltInterAdapterServiceClient(conn)
+ if h, err := svc.GetHealthStatus(ctx, &empty.Empty{}); err != nil || h.State != health.HealthStatus_HEALTHY {
return nil
}
return svc
@@ -1042,17 +1045,17 @@
//GetOfpDeviceInfo returns OFP information for the given device. Method not implemented as per [VOL-3202].
// OF port info is now to be delivered within UniPort create cmp changes in onu_uni_port.go::CreateVolthaPort()
//
-func (oo *OpenONUAC) GetOfpDeviceInfo(ctx context.Context, device *voltha.Device) (*ic.SwitchCapability, error) {
+func (oo *OpenONUAC) GetOfpDeviceInfo(ctx context.Context, device *voltha.Device) (*ca.SwitchCapability, error) {
return nil, errors.New("unImplemented")
}
//SimulateAlarm is unimplemented
-func (oo *OpenONUAC) SimulateAlarm(context.Context, *ic.SimulateAlarmMessage) (*common.OperationResp, error) {
+func (oo *OpenONUAC) SimulateAlarm(context.Context, *ca.SimulateAlarmMessage) (*common.OperationResp, error) {
return nil, errors.New("unImplemented")
}
//SetExtValue is unimplemented
-func (oo *OpenONUAC) SetExtValue(context.Context, *ic.SetExtValueMessage) (*empty.Empty, error) {
+func (oo *OpenONUAC) SetExtValue(context.Context, *ca.SetExtValueMessage) (*empty.Empty, error) {
return nil, errors.New("unImplemented")
}
@@ -1062,7 +1065,7 @@
}
//StartOmciTest not implemented
-func (oo *OpenONUAC) StartOmciTest(ctx context.Context, test *ic.OMCITest) (*voltha.TestResponse, error) {
+func (oo *OpenONUAC) StartOmciTest(ctx context.Context, test *ca.OMCITest) (*omci.TestResponse, error) {
return nil, errors.New("unImplemented")
}
@@ -1077,22 +1080,22 @@
}
//GetImageDownloadStatus is unimplemented
-func (oo *OpenONUAC) GetImageDownloadStatus(ctx context.Context, imageInfo *ic.ImageDownloadMessage) (*voltha.ImageDownload, error) {
+func (oo *OpenONUAC) GetImageDownloadStatus(ctx context.Context, imageInfo *ca.ImageDownloadMessage) (*voltha.ImageDownload, error) {
return nil, errors.New("unImplemented")
}
//CancelImageDownload is unimplemented
-func (oo *OpenONUAC) CancelImageDownload(ctx context.Context, imageInfo *ic.ImageDownloadMessage) (*voltha.ImageDownload, error) {
+func (oo *OpenONUAC) CancelImageDownload(ctx context.Context, imageInfo *ca.ImageDownloadMessage) (*voltha.ImageDownload, error) {
return nil, errors.New("unImplemented")
}
//RevertImageUpdate is unimplemented
-func (oo *OpenONUAC) RevertImageUpdate(ctx context.Context, imageInfo *ic.ImageDownloadMessage) (*voltha.ImageDownload, error) {
+func (oo *OpenONUAC) RevertImageUpdate(ctx context.Context, imageInfo *ca.ImageDownloadMessage) (*voltha.ImageDownload, error) {
return nil, errors.New("unImplemented")
}
// UpdateFlowsBulk is unimplemented
-func (oo *OpenONUAC) UpdateFlowsBulk(ctx context.Context, flows *ic.BulkFlows) (*empty.Empty, error) {
+func (oo *OpenONUAC) UpdateFlowsBulk(ctx context.Context, flows *ca.BulkFlows) (*empty.Empty, error) {
return nil, errors.New("unImplemented")
}
@@ -1102,7 +1105,7 @@
}
//SendPacketOut sends packet out to the device
-func (oo *OpenONUAC) SendPacketOut(ctx context.Context, packet *ic.PacketOut) (*empty.Empty, error) {
+func (oo *OpenONUAC) SendPacketOut(ctx context.Context, packet *ca.PacketOut) (*empty.Empty, error) {
return nil, errors.New("unImplemented")
}
@@ -1117,7 +1120,7 @@
}
// GetExtValue - unimplemented
-func (oo *OpenONUAC) GetExtValue(ctx context.Context, extInfo *ic.GetExtValueMessage) (*voltha.ReturnValues, error) {
+func (oo *OpenONUAC) GetExtValue(ctx context.Context, extInfo *ca.GetExtValueMessage) (*extension.ReturnValues, error) {
return nil, errors.New("unImplemented")
}