diff --git a/rw_core/core/device/agent.go b/rw_core/core/device/agent.go
index a33765b..ad7b523 100755
--- a/rw_core/core/device/agent.go
+++ b/rw_core/core/device/agent.go
@@ -25,8 +25,9 @@
 	"sync"
 	"time"
 
-	"github.com/opencord/voltha-protos/v5/go/adapter_services"
+	"github.com/opencord/voltha-protos/v5/go/adapter_service"
 	"github.com/opencord/voltha-protos/v5/go/core"
+	"github.com/opencord/voltha-protos/v5/go/omci"
 
 	"github.com/cenkalti/backoff/v3"
 	"github.com/gogo/protobuf/proto"
@@ -44,8 +45,8 @@
 	coreutils "github.com/opencord/voltha-go/rw_core/utils"
 	"github.com/opencord/voltha-lib-go/v7/pkg/log"
 	"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"
 	ofp "github.com/opencord/voltha-protos/v5/go/openflow_13"
 	"github.com/opencord/voltha-protos/v5/go/voltha"
 )
@@ -453,7 +454,7 @@
 
 //addFlowsAndGroups adds the "newFlows" and "newGroups" from the existing flows/groups and sends the update to the
 //adapters
-func (agent *Agent) addFlowsAndGroups(ctx context.Context, newFlows []*ofp.OfpFlowStats, newGroups []*ofp.OfpGroupEntry, flowMetadata *voltha.FlowMetadata) error {
+func (agent *Agent) addFlowsAndGroups(ctx context.Context, newFlows []*ofp.OfpFlowStats, newGroups []*ofp.OfpGroupEntry, flowMetadata *ofp.FlowMetadata) error {
 	var flwResponse, grpResponse coreutils.Response
 	var err error
 	//if new flow list is empty then the called function returns quickly
@@ -473,7 +474,7 @@
 
 //deleteFlowsAndGroups removes the "flowsToDel" and "groupsToDel" from the existing flows/groups and sends the update to the
 //adapters
-func (agent *Agent) deleteFlowsAndGroups(ctx context.Context, flowsToDel []*ofp.OfpFlowStats, groupsToDel []*ofp.OfpGroupEntry, flowMetadata *voltha.FlowMetadata) error {
+func (agent *Agent) deleteFlowsAndGroups(ctx context.Context, flowsToDel []*ofp.OfpFlowStats, groupsToDel []*ofp.OfpGroupEntry, flowMetadata *ofp.FlowMetadata) error {
 	var flwResponse, grpResponse coreutils.Response
 	var err error
 	if flwResponse, err = agent.deleteFlowsFromAdapter(ctx, flowsToDel, flowMetadata); err != nil {
@@ -491,7 +492,7 @@
 
 //updateFlowsAndGroups replaces the existing flows and groups with "updatedFlows" and "updatedGroups" respectively. It
 //also sends the updates to the adapters
-func (agent *Agent) updateFlowsAndGroups(ctx context.Context, updatedFlows []*ofp.OfpFlowStats, updatedGroups []*ofp.OfpGroupEntry, flowMetadata *voltha.FlowMetadata) error {
+func (agent *Agent) updateFlowsAndGroups(ctx context.Context, updatedFlows []*ofp.OfpFlowStats, updatedGroups []*ofp.OfpGroupEntry, flowMetadata *ofp.FlowMetadata) error {
 	var flwResponse, grpResponse coreutils.Response
 	var err error
 	if flwResponse, err = agent.updateFlowsToAdapter(ctx, updatedFlows, flowMetadata); err != nil {
@@ -644,7 +645,7 @@
 
 	previousAdminState := device.AdminState
 	if previousAdminState != common.AdminState_PREPROVISIONED {
-		var client adapter_services.AdapterServiceClient
+		var client adapter_service.AdapterServiceClient
 		client, err = agent.adapterMgr.GetAdapterClient(ctx, agent.adapterEndpoint)
 		if err != nil {
 			logger.Errorw(ctx, "grpc-client-nil",
@@ -713,7 +714,7 @@
 	// If the device was in pre-prov state (only parent device are in that state) then do not send the request to the
 	// adapter
 	if previousAdminState != common.AdminState_PREPROVISIONED {
-		var client adapter_services.AdapterServiceClient
+		var client adapter_service.AdapterServiceClient
 		client, err = agent.adapterMgr.GetAdapterClient(ctx, agent.adapterEndpoint)
 		if err != nil {
 			logger.Errorw(ctx, "grpc-client-nil",
@@ -761,7 +762,7 @@
 }
 
 // getSwitchCapability retrieves the switch capability of a parent device
-func (agent *Agent) getSwitchCapability(ctx context.Context) (*ic.SwitchCapability, error) {
+func (agent *Agent) getSwitchCapability(ctx context.Context) (*ca.SwitchCapability, error) {
 	logger.Debugw(ctx, "get-switch-capability", log.Fields{"device-id": agent.deviceID})
 
 	device, err := agent.getDeviceReadOnly(ctx)
@@ -807,7 +808,7 @@
 	subCtx, cancel := context.WithTimeout(coreutils.WithAllMetadataFromContext(ctx), agent.rpcTimeout)
 	go func() {
 		defer cancel()
-		_, err := client.SendPacketOut(subCtx, &ic.PacketOut{
+		_, err := client.SendPacketOut(subCtx, &ca.PacketOut{
 			DeviceId:     agent.deviceID,
 			EgressPortNo: outPort,
 			Packet:       packet,
@@ -945,7 +946,7 @@
 	requestStatus.Code = common.OperationResp_OPERATION_IN_PROGRESS
 	go func() {
 		defer cancel()
-		_, err := client.SimulateAlarm(subCtx, &ic.SimulateAlarmMessage{Device: device, Request: simulateReq})
+		_, err := client.SimulateAlarm(subCtx, &ca.SimulateAlarmMessage{Device: device, Request: simulateReq})
 		if err == nil {
 			agent.onSuccess(subCtx, nil, nil, false)
 		} else {
@@ -1120,7 +1121,7 @@
 	return nil
 }
 
-func (agent *Agent) startOmciTest(ctx context.Context, omcitestrequest *voltha.OmciTestRequest) (*voltha.TestResponse, error) {
+func (agent *Agent) startOmciTest(ctx context.Context, omcitestrequest *omci.OmciTestRequest) (*omci.TestResponse, error) {
 	var err error
 	var desc string
 	requestStatus := &common.OperationResp{Code: common.OperationResp_OPERATION_FAILURE}
@@ -1156,7 +1157,7 @@
 		return nil, err
 	}
 
-	res, err := client.StartOmciTest(ctx, &ic.OMCITest{
+	res, err := client.StartOmciTest(ctx, &ca.OMCITest{
 		Device:  cloned,
 		Request: omcitestrequest,
 	})
@@ -1166,7 +1167,7 @@
 	return res, err
 }
 
-func (agent *Agent) getExtValue(ctx context.Context, pdevice *voltha.Device, cdevice *voltha.Device, valueparam *voltha.ValueSpecifier) (*voltha.ReturnValues, error) {
+func (agent *Agent) getExtValue(ctx context.Context, pdevice *voltha.Device, cdevice *voltha.Device, valueparam *extension.ValueSpecifier) (*extension.ReturnValues, error) {
 	logger.Debugw(ctx, "get-ext-value", log.Fields{"device-id": agent.deviceID, "onu-id": valueparam.Id, "value-type": valueparam.Value})
 	var err error
 	var desc string
@@ -1194,7 +1195,7 @@
 	// Release lock before sending to adapter
 	agent.requestQueue.RequestComplete()
 
-	retVal, err := client.GetExtValue(ctx, &ic.GetExtValueMessage{
+	retVal, err := client.GetExtValue(ctx, &ca.GetExtValueMessage{
 		ParentDevice: pdevice,
 		ChildDevice:  cdevice,
 		ValueType:    valueparam.Value,
@@ -1205,7 +1206,7 @@
 	return retVal, err
 }
 
-func (agent *Agent) setExtValue(ctx context.Context, device *voltha.Device, value *voltha.ValueSet) (*empty.Empty, error) {
+func (agent *Agent) setExtValue(ctx context.Context, device *voltha.Device, value *extension.ValueSet) (*empty.Empty, error) {
 	logger.Debugw(ctx, "set-ext-value", log.Fields{"device-id": value.Id})
 
 	var err error
@@ -1234,7 +1235,7 @@
 	// Release lock before sending request to adapter
 	agent.requestQueue.RequestComplete()
 
-	retVal, err := client.SetExtValue(ctx, &ic.SetExtValueMessage{
+	retVal, err := client.SetExtValue(ctx, &ca.SetExtValueMessage{
 		Device: device,
 		Value:  value,
 	})
diff --git a/rw_core/core/device/agent_flow.go b/rw_core/core/device/agent_flow.go
index 6ad4488..f53cb7d 100644
--- a/rw_core/core/device/agent_flow.go
+++ b/rw_core/core/device/agent_flow.go
@@ -20,7 +20,7 @@
 	"context"
 	"fmt"
 
-	ic "github.com/opencord/voltha-protos/v5/go/inter_container"
+	ca "github.com/opencord/voltha-protos/v5/go/core_adapter"
 
 	"github.com/gogo/protobuf/proto"
 	coreutils "github.com/opencord/voltha-go/rw_core/utils"
@@ -46,7 +46,7 @@
 	return flows
 }
 
-func (agent *Agent) addFlowsToAdapter(ctx context.Context, newFlows []*ofp.OfpFlowStats, flowMetadata *voltha.FlowMetadata) (coreutils.Response, error) {
+func (agent *Agent) addFlowsToAdapter(ctx context.Context, newFlows []*ofp.OfpFlowStats, flowMetadata *ofp.FlowMetadata) (coreutils.Response, error) {
 	logger.Debugw(ctx, "add-flows-to-adapters", log.Fields{"device-id": agent.deviceID, "flows": newFlows, "flow-metadata": flowMetadata})
 
 	var err error
@@ -118,16 +118,16 @@
 			flowSlice[ctr] = flow
 			ctr++
 		}
-		go agent.sendBulkFlows(subCtx, device, &voltha.Flows{Items: flowSlice}, nil, flowMetadata, response)
+		go agent.sendBulkFlows(subCtx, device, &ofp.Flows{Items: flowSlice}, nil, flowMetadata, response)
 	} else {
 		flowChanges := &ofp.FlowChanges{
-			ToAdd:    &voltha.Flows{Items: flowsToAdd},
-			ToRemove: &voltha.Flows{Items: flowsToDelete},
+			ToAdd:    &ofp.Flows{Items: flowsToAdd},
+			ToRemove: &ofp.Flows{Items: flowsToDelete},
 		}
 		groupChanges := &ofp.FlowGroupChanges{
-			ToAdd:    &voltha.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
-			ToRemove: &voltha.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
-			ToUpdate: &voltha.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
+			ToAdd:    &ofp.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
+			ToRemove: &ofp.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
+			ToUpdate: &ofp.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
 		}
 		go agent.sendIncrementalFlows(subCtx, device, flowChanges, groupChanges, flowMetadata, response)
 	}
@@ -138,9 +138,9 @@
 func (agent *Agent) sendBulkFlows(
 	ctx context.Context,
 	device *voltha.Device,
-	flows *voltha.Flows,
-	groups *voltha.FlowGroups,
-	flowMetadata *voltha.FlowMetadata,
+	flows *ofp.Flows,
+	groups *ofp.FlowGroups,
+	flowMetadata *ofp.FlowMetadata,
 	response coreutils.Response,
 ) {
 	var err error
@@ -164,7 +164,7 @@
 	subCtx, cancel := context.WithTimeout(ctx, agent.rpcTimeout)
 	defer cancel()
 
-	if _, err = client.UpdateFlowsBulk(subCtx, &ic.BulkFlows{
+	if _, err = client.UpdateFlowsBulk(subCtx, &ca.BulkFlows{
 		Device:       device,
 		Flows:        flows,
 		Groups:       groups,
@@ -182,7 +182,7 @@
 	device *voltha.Device,
 	flowChanges *ofp.FlowChanges,
 	groupChanges *ofp.FlowGroupChanges,
-	flowMetadata *voltha.FlowMetadata,
+	flowMetadata *ofp.FlowMetadata,
 	response coreutils.Response,
 ) {
 	var err error
@@ -205,7 +205,7 @@
 	}
 	subCtx, cancel := context.WithTimeout(ctx, agent.rpcTimeout)
 	defer cancel()
-	if _, err = client.UpdateFlowsIncrementally(subCtx, &ic.IncrementalFlows{
+	if _, err = client.UpdateFlowsIncrementally(subCtx, &ca.IncrementalFlows{
 		Device:       device,
 		Flows:        flowChanges,
 		Groups:       groupChanges,
@@ -218,7 +218,7 @@
 	}
 }
 
-func (agent *Agent) deleteFlowsFromAdapter(ctx context.Context, flowsToDel []*ofp.OfpFlowStats, flowMetadata *voltha.FlowMetadata) (coreutils.Response, error) {
+func (agent *Agent) deleteFlowsFromAdapter(ctx context.Context, flowsToDel []*ofp.OfpFlowStats, flowMetadata *ofp.FlowMetadata) (coreutils.Response, error) {
 	logger.Debugw(ctx, "delete-flows-from-adapter", log.Fields{"device-id": agent.deviceID, "flows": flowsToDel})
 
 	var desc string
@@ -269,16 +269,16 @@
 			flowSlice[ctr] = flow
 			ctr++
 		}
-		go agent.sendBulkFlows(subCtx, device, &voltha.Flows{Items: flowSlice}, nil, flowMetadata, response)
+		go agent.sendBulkFlows(subCtx, device, &ofp.Flows{Items: flowSlice}, nil, flowMetadata, response)
 	} else {
 		flowChanges := &ofp.FlowChanges{
-			ToAdd:    &voltha.Flows{Items: []*ofp.OfpFlowStats{}},
-			ToRemove: &voltha.Flows{Items: flowsToDel},
+			ToAdd:    &ofp.Flows{Items: []*ofp.OfpFlowStats{}},
+			ToRemove: &ofp.Flows{Items: flowsToDel},
 		}
 		groupChanges := &ofp.FlowGroupChanges{
-			ToAdd:    &voltha.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
-			ToRemove: &voltha.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
-			ToUpdate: &voltha.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
+			ToAdd:    &ofp.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
+			ToRemove: &ofp.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
+			ToUpdate: &ofp.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
 		}
 		go agent.sendIncrementalFlows(subCtx, device, flowChanges, groupChanges, flowMetadata, response)
 	}
@@ -286,7 +286,7 @@
 	return response, nil
 }
 
-func (agent *Agent) updateFlowsToAdapter(ctx context.Context, updatedFlows []*ofp.OfpFlowStats, flowMetadata *voltha.FlowMetadata) (coreutils.Response, error) {
+func (agent *Agent) updateFlowsToAdapter(ctx context.Context, updatedFlows []*ofp.OfpFlowStats, flowMetadata *ofp.FlowMetadata) (coreutils.Response, error) {
 	logger.Debugw(ctx, "update-flows-to-adapter", log.Fields{"device-id": agent.deviceID, "flows": updatedFlows})
 
 	var err error
@@ -347,7 +347,7 @@
 			flowSlice[ctr] = flow
 			ctr++
 		}
-		go agent.sendBulkFlows(subCtx, device, &voltha.Flows{Items: flowSlice}, nil, flowMetadata, response)
+		go agent.sendBulkFlows(subCtx, device, &ofp.Flows{Items: flowSlice}, nil, flowMetadata, response)
 	} else {
 		logger.Debugw(ctx, "updating-flows-and-groups",
 			log.Fields{
@@ -363,13 +363,13 @@
 		}
 
 		flowChanges := &ofp.FlowChanges{
-			ToAdd:    &voltha.Flows{Items: flowsToAdd},
-			ToRemove: &voltha.Flows{Items: flowsToDelete},
+			ToAdd:    &ofp.Flows{Items: flowsToAdd},
+			ToRemove: &ofp.Flows{Items: flowsToDelete},
 		}
 		groupChanges := &ofp.FlowGroupChanges{
-			ToAdd:    &voltha.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
-			ToRemove: &voltha.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
-			ToUpdate: &voltha.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
+			ToAdd:    &ofp.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
+			ToRemove: &ofp.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
+			ToUpdate: &ofp.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
 		}
 		go agent.sendIncrementalFlows(subCtx, device, flowChanges, groupChanges, flowMetadata, response)
 	}
@@ -378,7 +378,7 @@
 }
 
 //filterOutFlows removes flows from a device using the uni-port as filter
-func (agent *Agent) filterOutFlows(ctx context.Context, uniPort uint32, flowMetadata *voltha.FlowMetadata) error {
+func (agent *Agent) filterOutFlows(ctx context.Context, uniPort uint32, flowMetadata *ofp.FlowMetadata) error {
 	var flowsToDelete []*ofp.OfpFlowStats
 	// If an existing flow has the uniPort as an InPort or OutPort or as a Tunnel ID then it needs to be removed
 	for flowID := range agent.flowCache.ListIDs() {
diff --git a/rw_core/core/device/agent_group.go b/rw_core/core/device/agent_group.go
index 43a8929..ad95e9c 100644
--- a/rw_core/core/device/agent_group.go
+++ b/rw_core/core/device/agent_group.go
@@ -42,7 +42,7 @@
 	return groups
 }
 
-func (agent *Agent) addGroupsToAdapter(ctx context.Context, newGroups []*ofp.OfpGroupEntry, flowMetadata *voltha.FlowMetadata) (coreutils.Response, error) {
+func (agent *Agent) addGroupsToAdapter(ctx context.Context, newGroups []*ofp.OfpGroupEntry, flowMetadata *ofp.FlowMetadata) (coreutils.Response, error) {
 	logger.Debugw(ctx, "add-groups-to-adapters", log.Fields{"device-id": agent.deviceID, "groups": newGroups, "flow-metadata": flowMetadata})
 
 	var err error
@@ -116,16 +116,16 @@
 			groupSlice[ctr] = group
 			ctr++
 		}
-		go agent.sendBulkFlows(subCtx, device, nil, &voltha.FlowGroups{Items: groupSlice}, flowMetadata, response)
+		go agent.sendBulkFlows(subCtx, device, nil, &ofp.FlowGroups{Items: groupSlice}, flowMetadata, response)
 	} else {
 		flowChanges := &ofp.FlowChanges{
-			ToAdd:    &voltha.Flows{Items: []*ofp.OfpFlowStats{}},
-			ToRemove: &voltha.Flows{Items: []*ofp.OfpFlowStats{}},
+			ToAdd:    &ofp.Flows{Items: []*ofp.OfpFlowStats{}},
+			ToRemove: &ofp.Flows{Items: []*ofp.OfpFlowStats{}},
 		}
 		groupChanges := &ofp.FlowGroupChanges{
-			ToAdd:    &voltha.FlowGroups{Items: groupsToAdd},
-			ToRemove: &voltha.FlowGroups{Items: groupsToDelete},
-			ToUpdate: &voltha.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
+			ToAdd:    &ofp.FlowGroups{Items: groupsToAdd},
+			ToRemove: &ofp.FlowGroups{Items: groupsToDelete},
+			ToUpdate: &ofp.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
 		}
 		go agent.sendIncrementalFlows(subCtx, device, flowChanges, groupChanges, flowMetadata, response)
 	}
@@ -133,7 +133,7 @@
 	return response, nil
 }
 
-func (agent *Agent) deleteGroupsFromAdapter(ctx context.Context, groupsToDel []*ofp.OfpGroupEntry, flowMetadata *voltha.FlowMetadata) (coreutils.Response, error) {
+func (agent *Agent) deleteGroupsFromAdapter(ctx context.Context, groupsToDel []*ofp.OfpGroupEntry, flowMetadata *ofp.FlowMetadata) (coreutils.Response, error) {
 	logger.Debugw(ctx, "delete-groups-from-adapter", log.Fields{"device-id": agent.deviceID, "groups": groupsToDel})
 
 	var desc string
@@ -183,16 +183,16 @@
 			groupSlice[ctr] = group
 			ctr++
 		}
-		go agent.sendBulkFlows(subCtx, device, nil, &voltha.FlowGroups{Items: groupSlice}, flowMetadata, response)
+		go agent.sendBulkFlows(subCtx, device, nil, &ofp.FlowGroups{Items: groupSlice}, flowMetadata, response)
 	} else {
 		flowChanges := &ofp.FlowChanges{
-			ToAdd:    &voltha.Flows{Items: []*ofp.OfpFlowStats{}},
-			ToRemove: &voltha.Flows{Items: []*ofp.OfpFlowStats{}},
+			ToAdd:    &ofp.Flows{Items: []*ofp.OfpFlowStats{}},
+			ToRemove: &ofp.Flows{Items: []*ofp.OfpFlowStats{}},
 		}
 		groupChanges := &ofp.FlowGroupChanges{
-			ToAdd:    &voltha.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
-			ToRemove: &voltha.FlowGroups{Items: groupsToDel},
-			ToUpdate: &voltha.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
+			ToAdd:    &ofp.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
+			ToRemove: &ofp.FlowGroups{Items: groupsToDel},
+			ToUpdate: &ofp.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
 		}
 		go agent.sendIncrementalFlows(subCtx, device, flowChanges, groupChanges, flowMetadata, response)
 	}
@@ -200,7 +200,7 @@
 	return response, nil
 }
 
-func (agent *Agent) updateGroupsToAdapter(ctx context.Context, updatedGroups []*ofp.OfpGroupEntry, flowMetadata *voltha.FlowMetadata) (coreutils.Response, error) {
+func (agent *Agent) updateGroupsToAdapter(ctx context.Context, updatedGroups []*ofp.OfpGroupEntry, flowMetadata *ofp.FlowMetadata) (coreutils.Response, error) {
 	logger.Debugw(ctx, "update-groups-to-adapter", log.Fields{"device-id": agent.deviceID, "groups": updatedGroups})
 
 	var desc string
@@ -258,7 +258,7 @@
 			groupSlice[ctr] = group
 			ctr++
 		}
-		go agent.sendBulkFlows(subCtx, device, nil, &voltha.FlowGroups{Items: groupSlice}, flowMetadata, response)
+		go agent.sendBulkFlows(subCtx, device, nil, &ofp.FlowGroups{Items: groupSlice}, flowMetadata, response)
 	} else {
 		logger.Debugw(ctx, "updating-groups",
 			log.Fields{
@@ -274,13 +274,13 @@
 		}
 
 		flowChanges := &ofp.FlowChanges{
-			ToAdd:    &voltha.Flows{Items: []*ofp.OfpFlowStats{}},
-			ToRemove: &voltha.Flows{Items: []*ofp.OfpFlowStats{}},
+			ToAdd:    &ofp.Flows{Items: []*ofp.OfpFlowStats{}},
+			ToRemove: &ofp.Flows{Items: []*ofp.OfpFlowStats{}},
 		}
 		groupChanges := &ofp.FlowGroupChanges{
-			ToAdd:    &voltha.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
-			ToRemove: &voltha.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
-			ToUpdate: &voltha.FlowGroups{Items: groupsToUpdate},
+			ToAdd:    &ofp.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
+			ToRemove: &ofp.FlowGroups{Items: []*ofp.OfpGroupEntry{}},
+			ToUpdate: &ofp.FlowGroups{Items: groupsToUpdate},
 		}
 		go agent.sendIncrementalFlows(subCtx, device, flowChanges, groupChanges, flowMetadata, response)
 	}
diff --git a/rw_core/core/device/agent_image.go b/rw_core/core/device/agent_image.go
index 2fa8dac..7c86e08 100644
--- a/rw_core/core/device/agent_image.go
+++ b/rw_core/core/device/agent_image.go
@@ -21,7 +21,7 @@
 	"errors"
 	"time"
 
-	ic "github.com/opencord/voltha-protos/v5/go/inter_container"
+	ca "github.com/opencord/voltha-protos/v5/go/core_adapter"
 
 	"github.com/opencord/voltha-protos/v5/go/common"
 
@@ -100,7 +100,7 @@
 	operStatus.Code = common.OperationResp_OPERATION_IN_PROGRESS
 	go func() {
 		defer cancel()
-		response, err := client.DownloadImage(subCtx, &ic.ImageDownloadMessage{
+		response, err := client.DownloadImage(subCtx, &ca.ImageDownloadMessage{
 			Device: cloned,
 			Image:  clonedImg,
 		})
@@ -181,7 +181,7 @@
 	operStatus.Code = common.OperationResp_OPERATION_IN_PROGRESS
 	go func() {
 		defer cancel()
-		response, err := client.CancelImageDownload(subCtx, &ic.ImageDownloadMessage{
+		response, err := client.CancelImageDownload(subCtx, &ca.ImageDownloadMessage{
 			Device: cloned,
 			Image:  img,
 		})
@@ -262,7 +262,7 @@
 	operStatus.Code = common.OperationResp_OPERATION_IN_PROGRESS
 	go func() {
 		defer cancel()
-		response, err := client.ActivateImageUpdate(subCtx, &ic.ImageDownloadMessage{
+		response, err := client.ActivateImageUpdate(subCtx, &ca.ImageDownloadMessage{
 			Device: cloned,
 			Image:  img,
 		})
@@ -333,7 +333,7 @@
 	operStatus.Code = common.OperationResp_OPERATION_IN_PROGRESS
 	go func() {
 		defer cancel()
-		_, err := client.RevertImageUpdate(subCtx, &ic.ImageDownloadMessage{
+		_, err := client.RevertImageUpdate(subCtx, &ca.ImageDownloadMessage{
 			Device: cloned,
 			Image:  img,
 		})
@@ -379,7 +379,7 @@
 		return nil, err
 	}
 	agent.requestQueue.RequestComplete()
-	return client.GetImageDownloadStatus(ctx, &ic.ImageDownloadMessage{
+	return client.GetImageDownloadStatus(ctx, &ca.ImageDownloadMessage{
 		Device: device,
 		Image:  img,
 	})
diff --git a/rw_core/core/device/agent_pm_config.go b/rw_core/core/device/agent_pm_config.go
index ba1005a..0e5bf7c 100644
--- a/rw_core/core/device/agent_pm_config.go
+++ b/rw_core/core/device/agent_pm_config.go
@@ -22,7 +22,7 @@
 
 	"github.com/gogo/protobuf/proto"
 	"github.com/opencord/voltha-lib-go/v7/pkg/log"
-	ic "github.com/opencord/voltha-protos/v5/go/inter_container"
+	ca "github.com/opencord/voltha-protos/v5/go/core_adapter"
 	"github.com/opencord/voltha-protos/v5/go/voltha"
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
@@ -60,7 +60,7 @@
 			})
 		return err
 	}
-	_, pmErr := client.UpdatePmConfig(ctx, &ic.PmConfigsInfo{
+	_, pmErr := client.UpdatePmConfig(ctx, &ca.PmConfigsInfo{
 		DeviceId:  agent.deviceID,
 		PmConfigs: pmConfigs,
 	})
diff --git a/rw_core/core/device/agent_test.go b/rw_core/core/device/agent_test.go
index 0577c1e..35142d3 100755
--- a/rw_core/core/device/agent_test.go
+++ b/rw_core/core/device/agent_test.go
@@ -27,7 +27,7 @@
 	"time"
 
 	ver "github.com/opencord/voltha-lib-go/v7/pkg/version"
-	ic "github.com/opencord/voltha-protos/v5/go/inter_container"
+	ca "github.com/opencord/voltha-protos/v5/go/core_adapter"
 
 	"github.com/gogo/protobuf/proto"
 	"github.com/opencord/voltha-go/db/model"
@@ -347,7 +347,7 @@
 		{Id: 124, TableId: 1240, Priority: 1000, IdleTimeout: 0, Flags: 0, Cookie: 1240000, PacketCount: 0},
 		{Id: 125, TableId: 1250, Priority: 1000, IdleTimeout: 0, Flags: 0, Cookie: 1250000, PacketCount: 0},
 	}
-	err := da.addFlowsAndGroups(context.Background(), newFlows, []*ofp.OfpGroupEntry{}, &voltha.FlowMetadata{})
+	err := da.addFlowsAndGroups(context.Background(), newFlows, []*ofp.OfpGroupEntry{}, &ofp.FlowMetadata{})
 	// Expect specific error as adapter communication, for unit tests, are not set
 	assert.NotNil(t, err)
 	assert.True(t, strings.Contains(err.Error(), "flow-failure-device-"))
@@ -368,7 +368,7 @@
 		{Id: 127, TableId: 1270, Priority: 1000, IdleTimeout: 0, Flags: 0, Cookie: 1270000, PacketCount: 0},
 	}
 
-	err = da.addFlowsAndGroups(context.Background(), newFlows, []*ofp.OfpGroupEntry{}, &voltha.FlowMetadata{})
+	err = da.addFlowsAndGroups(context.Background(), newFlows, []*ofp.OfpGroupEntry{}, &ofp.FlowMetadata{})
 	assert.NotNil(t, err)
 	assert.True(t, strings.Contains(err.Error(), "flow-failure-device-"))
 	daFlows = changeToFlowList(da.listDeviceFlows())
@@ -390,7 +390,7 @@
 		{Id: 128, TableId: 1280, Priority: 1000, IdleTimeout: 0, Flags: 0, Cookie: 1280000, PacketCount: 0},
 	}
 
-	err = da.addFlowsAndGroups(context.Background(), newFlows, []*ofp.OfpGroupEntry{}, &voltha.FlowMetadata{})
+	err = da.addFlowsAndGroups(context.Background(), newFlows, []*ofp.OfpGroupEntry{}, &ofp.FlowMetadata{})
 	assert.NotNil(t, err)
 	assert.True(t, strings.Contains(err.Error(), "Aborted"))
 	daFlows = changeToFlowList(da.listDeviceFlows())
@@ -412,7 +412,7 @@
 		{Id: 128, TableId: 1280, Priority: 1000, IdleTimeout: 0, Flags: 0, Cookie: 1280000, PacketCount: 0},
 	}
 
-	err = da.addFlowsAndGroups(context.Background(), newFlows, []*ofp.OfpGroupEntry{}, &voltha.FlowMetadata{})
+	err = da.addFlowsAndGroups(context.Background(), newFlows, []*ofp.OfpGroupEntry{}, &ofp.FlowMetadata{})
 	assert.Nil(t, err)
 	daFlows = changeToFlowList(da.listDeviceFlows())
 	assert.True(t, isFlowSliceEqual(expectedFlows, daFlows))
@@ -430,7 +430,7 @@
 		{Id: 125, TableId: 1250, Priority: 1000, IdleTimeout: 0, Flags: 0, Cookie: 1250000, PacketCount: 0},
 	}
 
-	err = da.deleteFlowsAndGroups(context.Background(), flowsToDelete, []*ofp.OfpGroupEntry{}, &voltha.FlowMetadata{})
+	err = da.deleteFlowsAndGroups(context.Background(), flowsToDelete, []*ofp.OfpGroupEntry{}, &ofp.FlowMetadata{})
 	assert.NotNil(t, err)
 	assert.True(t, strings.Contains(err.Error(), "Aborted"))
 	daFlows = changeToFlowList(da.listDeviceFlows())
@@ -446,7 +446,7 @@
 		{Id: 124, TableId: 1240, Priority: 1000, IdleTimeout: 0, Flags: 0, Cookie: 1240000, PacketCount: 0},
 	}
 
-	err = da.deleteFlowsAndGroups(context.Background(), flowsToDelete, []*ofp.OfpGroupEntry{}, &voltha.FlowMetadata{})
+	err = da.deleteFlowsAndGroups(context.Background(), flowsToDelete, []*ofp.OfpGroupEntry{}, &ofp.FlowMetadata{})
 	assert.NotNil(t, err)
 	assert.True(t, strings.Contains(err.Error(), "Aborted"))
 	daFlows = changeToFlowList(da.listDeviceFlows())
@@ -459,7 +459,7 @@
 		{Desc: &ofp.OfpGroupDesc{Type: 1, GroupId: 10, Buckets: nil}},
 		{Desc: &ofp.OfpGroupDesc{Type: 2, GroupId: 20, Buckets: nil}},
 	}
-	err := da.addFlowsAndGroups(context.Background(), []*ofp.OfpFlowStats{}, newGroups, &voltha.FlowMetadata{})
+	err := da.addFlowsAndGroups(context.Background(), []*ofp.OfpFlowStats{}, newGroups, &ofp.FlowMetadata{})
 	assert.NotNil(t, err)
 	assert.True(t, strings.Contains(err.Error(), "flow-failure-device-"))
 	daGroups := changeToGroupList(da.listDeviceGroups())
@@ -476,7 +476,7 @@
 		{Desc: &ofp.OfpGroupDesc{Type: 3, GroupId: 30, Buckets: nil}},
 		{Desc: &ofp.OfpGroupDesc{Type: 4, GroupId: 40, Buckets: nil}},
 	}
-	err = da.addFlowsAndGroups(context.Background(), []*ofp.OfpFlowStats{}, newGroups, &voltha.FlowMetadata{})
+	err = da.addFlowsAndGroups(context.Background(), []*ofp.OfpFlowStats{}, newGroups, &ofp.FlowMetadata{})
 	assert.NotNil(t, err)
 	assert.True(t, strings.Contains(err.Error(), "Aborted"))
 	daGroups = changeToGroupList(da.listDeviceGroups())
@@ -495,7 +495,7 @@
 		{Desc: &ofp.OfpGroupDesc{Type: 44, GroupId: 40, Buckets: nil}},
 		{Desc: &ofp.OfpGroupDesc{Type: 5, GroupId: 50, Buckets: nil}},
 	}
-	err = da.addFlowsAndGroups(context.Background(), []*ofp.OfpFlowStats{}, newGroups, &voltha.FlowMetadata{})
+	err = da.addFlowsAndGroups(context.Background(), []*ofp.OfpFlowStats{}, newGroups, &ofp.FlowMetadata{})
 	assert.NotNil(t, err)
 	assert.True(t, strings.Contains(err.Error(), "Aborted"))
 	daGroups = changeToGroupList(da.listDeviceGroups())
@@ -512,7 +512,7 @@
 		{Desc: &ofp.OfpGroupDesc{Type: 44, GroupId: 40, Buckets: nil}},
 		{Desc: &ofp.OfpGroupDesc{Type: 5, GroupId: 50, Buckets: nil}},
 	}
-	err = da.updateFlowsAndGroups(context.Background(), []*ofp.OfpFlowStats{}, updtGroups, &voltha.FlowMetadata{})
+	err = da.updateFlowsAndGroups(context.Background(), []*ofp.OfpFlowStats{}, updtGroups, &ofp.FlowMetadata{})
 	assert.NotNil(t, err)
 	assert.True(t, strings.Contains(err.Error(), "Aborted"))
 	daGroups = changeToGroupList(da.listDeviceGroups())
@@ -528,7 +528,7 @@
 		{Desc: &ofp.OfpGroupDesc{Type: 44, GroupId: 40, Buckets: nil}},
 		{Desc: &ofp.OfpGroupDesc{Type: 5, GroupId: 50, Buckets: nil}},
 	}
-	err = da.deleteFlowsAndGroups(context.Background(), []*ofp.OfpFlowStats{}, delGroups, &voltha.FlowMetadata{})
+	err = da.deleteFlowsAndGroups(context.Background(), []*ofp.OfpFlowStats{}, delGroups, &ofp.FlowMetadata{})
 	assert.NotNil(t, err)
 	assert.True(t, strings.Contains(err.Error(), "Aborted"))
 	daGroups = changeToGroupList(da.listDeviceGroups())
@@ -543,7 +543,7 @@
 		{Desc: &ofp.OfpGroupDesc{Type: 2, GroupId: 20, Buckets: nil}},
 		{Desc: &ofp.OfpGroupDesc{Type: 5, GroupId: 50, Buckets: nil}},
 	}
-	err = da.deleteFlowsAndGroups(context.Background(), []*ofp.OfpFlowStats{}, delGroups, &voltha.FlowMetadata{})
+	err = da.deleteFlowsAndGroups(context.Background(), []*ofp.OfpFlowStats{}, delGroups, &ofp.FlowMetadata{})
 	assert.NotNil(t, err)
 	assert.True(t, strings.Contains(err.Error(), "Aborted"))
 	daGroups = changeToGroupList(da.listDeviceGroups())
@@ -563,7 +563,7 @@
 	}
 	types := []*voltha.DeviceType{{Id: "olt-mock-device-type", AdapterType: "olt-mock-adapter-type", AcceptsAddRemoveFlowUpdates: true}}
 	deviceTypes := &voltha.DeviceTypes{Items: types}
-	_, err := dat.adapterMgr.RegisterAdapter(ctx, &ic.AdapterRegistration{
+	_, err := dat.adapterMgr.RegisterAdapter(ctx, &ca.AdapterRegistration{
 		Adapter: oltAdapter,
 		DTypes:  deviceTypes,
 	})
@@ -582,7 +582,7 @@
 	}
 	types = []*voltha.DeviceType{{Id: "onu-mock-device-type", AdapterType: "onu-mock-adapter-type", AcceptsAddRemoveFlowUpdates: true}}
 	deviceTypes = &voltha.DeviceTypes{Items: types}
-	_, err = dat.adapterMgr.RegisterAdapter(ctx, &ic.AdapterRegistration{
+	_, err = dat.adapterMgr.RegisterAdapter(ctx, &ca.AdapterRegistration{
 		Adapter: onuAdapter,
 		DTypes:  deviceTypes,
 	})
diff --git a/rw_core/core/device/logical_agent.go b/rw_core/core/device/logical_agent.go
index cbf2625..f175305 100644
--- a/rw_core/core/device/logical_agent.go
+++ b/rw_core/core/device/logical_agent.go
@@ -33,7 +33,7 @@
 	coreutils "github.com/opencord/voltha-go/rw_core/utils"
 	fu "github.com/opencord/voltha-lib-go/v7/pkg/flows"
 	"github.com/opencord/voltha-lib-go/v7/pkg/log"
-	ic "github.com/opencord/voltha-protos/v5/go/inter_container"
+	ca "github.com/opencord/voltha-protos/v5/go/core_adapter"
 	ofp "github.com/opencord/voltha-protos/v5/go/openflow_13"
 	"github.com/opencord/voltha-protos/v5/go/voltha"
 	"google.golang.org/grpc/codes"
@@ -106,7 +106,7 @@
 	var ld *voltha.LogicalDevice
 	if !logicalDeviceExist {
 		//Build the logical device based on information retrieved from the device adapter
-		var switchCap *ic.SwitchCapability
+		var switchCap *ca.SwitchCapability
 		var err error
 		if switchCap, err = agent.deviceMgr.getSwitchCapability(ctx, agent.rootDeviceID); err != nil {
 			return err
@@ -298,7 +298,7 @@
 	return responses
 }
 
-func (agent *LogicalAgent) updateFlowsAndGroupsOfDevice(ctx context.Context, deviceRules *fu.DeviceRules, flowMetadata *voltha.FlowMetadata) []coreutils.Response {
+func (agent *LogicalAgent) updateFlowsAndGroupsOfDevice(ctx context.Context, deviceRules *fu.DeviceRules, flowMetadata *ofp.FlowMetadata) []coreutils.Response {
 	logger.Debugw(ctx, "send-update-flows-to-device-manager", log.Fields{"logical-device-id": agent.logicalDeviceID})
 
 	responses := make([]coreutils.Response, 0)
@@ -341,7 +341,7 @@
 			continue
 		}
 		logger.Debugw(ctx, "uni-port", log.Fields{"flows": flows, "uni-port": uniPort})
-		go func(uniPort uint32, metadata *voltha.FlowMetadata) {
+		go func(uniPort uint32, metadata *ofp.FlowMetadata) {
 			subCtx, cancel := context.WithTimeout(log.WithSpanFromContext(context.Background(), ctx), agent.internalTimeout)
 			subCtx = coreutils.WithRPCMetadataFromContext(subCtx, ctx)
 
diff --git a/rw_core/core/device/logical_agent_flow.go b/rw_core/core/device/logical_agent_flow.go
index 85b78ef..fa1a19a 100644
--- a/rw_core/core/device/logical_agent_flow.go
+++ b/rw_core/core/device/logical_agent_flow.go
@@ -517,13 +517,13 @@
 }
 
 // TODO: Remove this helper, just pass the map through to functions directly
-func toMetadata(meters map[uint32]*ofp.OfpMeterConfig) *voltha.FlowMetadata {
+func toMetadata(meters map[uint32]*ofp.OfpMeterConfig) *ofp.FlowMetadata {
 	ctr, ret := 0, make([]*ofp.OfpMeterConfig, len(meters))
 	for _, meter := range meters {
 		ret[ctr] = meter
 		ctr++
 	}
-	return &voltha.FlowMetadata{Meters: ret}
+	return &ofp.FlowMetadata{Meters: ret}
 }
 
 func (agent *LogicalAgent) deleteFlowsHavingMeter(ctx context.Context, meterID uint32) error {
diff --git a/rw_core/core/device/logical_agent_group.go b/rw_core/core/device/logical_agent_group.go
index 9a47d81..cbf296b 100644
--- a/rw_core/core/device/logical_agent_group.go
+++ b/rw_core/core/device/logical_agent_group.go
@@ -231,7 +231,7 @@
 	}
 
 	// Update the devices
-	respChnls := agent.updateFlowsAndGroupsOfDevice(ctx, deviceRules, &voltha.FlowMetadata{})
+	respChnls := agent.updateFlowsAndGroupsOfDevice(ctx, deviceRules, &ofp.FlowMetadata{})
 
 	// Wait for completion
 	go func() {
diff --git a/rw_core/core/device/manager.go b/rw_core/core/device/manager.go
index 5519cab..9f7e656 100755
--- a/rw_core/core/device/manager.go
+++ b/rw_core/core/device/manager.go
@@ -33,7 +33,7 @@
 	"github.com/opencord/voltha-go/rw_core/utils"
 	"github.com/opencord/voltha-lib-go/v7/pkg/events"
 	"github.com/opencord/voltha-lib-go/v7/pkg/log"
-	ic "github.com/opencord/voltha-protos/v5/go/inter_container"
+	ca "github.com/opencord/voltha-protos/v5/go/core_adapter"
 	ofp "github.com/opencord/voltha-protos/v5/go/openflow_13"
 	"github.com/opencord/voltha-protos/v5/go/voltha"
 	"google.golang.org/grpc/codes"
@@ -477,7 +477,7 @@
 	return nil
 }
 
-func (dMgr *Manager) addFlowsAndGroups(ctx context.Context, deviceID string, flows []*ofp.OfpFlowStats, groups []*ofp.OfpGroupEntry, flowMetadata *voltha.FlowMetadata) error {
+func (dMgr *Manager) addFlowsAndGroups(ctx context.Context, deviceID string, flows []*ofp.OfpFlowStats, groups []*ofp.OfpGroupEntry, flowMetadata *ofp.FlowMetadata) error {
 	logger.Debugw(ctx, "add-flows-and-groups", log.Fields{"device-id": deviceID, "groups:": groups, "flow-metadata": flowMetadata})
 	if agent := dMgr.getDeviceAgent(ctx, deviceID); agent != nil {
 		return agent.addFlowsAndGroups(ctx, flows, groups, flowMetadata)
@@ -486,7 +486,7 @@
 }
 
 // deleteParentFlows removes flows from the parent device based on  specific attributes
-func (dMgr *Manager) deleteParentFlows(ctx context.Context, deviceID string, uniPort uint32, metadata *voltha.FlowMetadata) error {
+func (dMgr *Manager) deleteParentFlows(ctx context.Context, deviceID string, uniPort uint32, metadata *ofp.FlowMetadata) error {
 	logger.Debugw(ctx, "delete-parent-flows", log.Fields{"device-id": deviceID, "uni-port": uniPort, "metadata": metadata})
 	if agent := dMgr.getDeviceAgent(ctx, deviceID); agent != nil {
 		if !agent.isRootDevice {
@@ -497,7 +497,7 @@
 	return status.Errorf(codes.NotFound, "%s", deviceID)
 }
 
-func (dMgr *Manager) deleteFlowsAndGroups(ctx context.Context, deviceID string, flows []*ofp.OfpFlowStats, groups []*ofp.OfpGroupEntry, flowMetadata *voltha.FlowMetadata) error {
+func (dMgr *Manager) deleteFlowsAndGroups(ctx context.Context, deviceID string, flows []*ofp.OfpFlowStats, groups []*ofp.OfpGroupEntry, flowMetadata *ofp.FlowMetadata) error {
 	logger.Debugw(ctx, "delete-flows-and-groups", log.Fields{"device-id": deviceID})
 	if agent := dMgr.getDeviceAgent(ctx, deviceID); agent != nil {
 		return agent.deleteFlowsAndGroups(ctx, flows, groups, flowMetadata)
@@ -505,7 +505,7 @@
 	return status.Errorf(codes.NotFound, "%s", deviceID)
 }
 
-func (dMgr *Manager) updateFlowsAndGroups(ctx context.Context, deviceID string, flows []*ofp.OfpFlowStats, groups []*ofp.OfpGroupEntry, flowMetadata *voltha.FlowMetadata) error {
+func (dMgr *Manager) updateFlowsAndGroups(ctx context.Context, deviceID string, flows []*ofp.OfpFlowStats, groups []*ofp.OfpGroupEntry, flowMetadata *ofp.FlowMetadata) error {
 	logger.Debugw(ctx, "update-flows-and-groups", log.Fields{"device-id": deviceID})
 	if agent := dMgr.getDeviceAgent(ctx, deviceID); agent != nil {
 		return agent.updateFlowsAndGroups(ctx, flows, groups, flowMetadata)
@@ -524,7 +524,7 @@
 	return status.Errorf(codes.NotFound, "%s", deviceID)
 }
 
-func (dMgr *Manager) getSwitchCapability(ctx context.Context, deviceID string) (*ic.SwitchCapability, error) {
+func (dMgr *Manager) getSwitchCapability(ctx context.Context, deviceID string) (*ca.SwitchCapability, error) {
 	logger.Debugw(ctx, "get-switch-capability", log.Fields{"device-id": deviceID})
 	if agent := dMgr.getDeviceAgent(ctx, deviceID); agent != nil {
 		return agent.getSwitchCapability(ctx)
diff --git a/rw_core/core/device/manager_nbi.go b/rw_core/core/device/manager_nbi.go
index 9632eb1..3f23e2d 100644
--- a/rw_core/core/device/manager_nbi.go
+++ b/rw_core/core/device/manager_nbi.go
@@ -23,6 +23,8 @@
 	"github.com/opencord/voltha-go/rw_core/utils"
 	"github.com/opencord/voltha-lib-go/v7/pkg/log"
 	"github.com/opencord/voltha-protos/v5/go/common"
+	"github.com/opencord/voltha-protos/v5/go/extension"
+	"github.com/opencord/voltha-protos/v5/go/omci"
 	ofp "github.com/opencord/voltha-protos/v5/go/openflow_13"
 	"github.com/opencord/voltha-protos/v5/go/voltha"
 	"google.golang.org/grpc/codes"
@@ -776,7 +778,7 @@
 }
 
 // ListDeviceFlowGroups returns the flow group details for a specific device entry
-func (dMgr *Manager) ListDeviceFlowGroups(ctx context.Context, id *voltha.ID) (*voltha.FlowGroups, error) {
+func (dMgr *Manager) ListDeviceFlowGroups(ctx context.Context, id *voltha.ID) (*ofp.FlowGroups, error) {
 	ctx = utils.WithRPCMetadataContext(ctx, "ListDeviceFlowGroups")
 	log.EnrichSpan(ctx, log.Fields{"device-id": id.Id})
 	logger.Debugw(ctx, "list-device-flow-groups", log.Fields{"device-id": id.Id})
@@ -790,7 +792,7 @@
 		ret[ctr] = group
 		ctr++
 	}
-	return &voltha.FlowGroups{Items: ret}, nil
+	return &ofp.FlowGroups{Items: ret}, nil
 }
 
 func (dMgr *Manager) EnablePort(ctx context.Context, port *voltha.Port) (*empty.Empty, error) {
@@ -817,7 +819,7 @@
 	return &empty.Empty{}, agent.disablePort(ctx, port.PortNo)
 }
 
-func (dMgr *Manager) GetExtValue(ctx context.Context, value *voltha.ValueSpecifier) (*voltha.ReturnValues, error) {
+func (dMgr *Manager) GetExtValue(ctx context.Context, value *extension.ValueSpecifier) (*extension.ReturnValues, error) {
 	ctx = utils.WithRPCMetadataContext(ctx, "GetExtValue")
 	log.EnrichSpan(ctx, log.Fields{"device-id": value.Id})
 
@@ -843,7 +845,7 @@
 }
 
 // SetExtValue  set some given configs or value
-func (dMgr *Manager) SetExtValue(ctx context.Context, value *voltha.ValueSet) (*empty.Empty, error) {
+func (dMgr *Manager) SetExtValue(ctx context.Context, value *extension.ValueSet) (*empty.Empty, error) {
 	ctx = utils.WithRPCMetadataContext(ctx, "SetExtValue")
 	logger.Debugw(ctx, "set-ext-value", log.Fields{"onu-id": value.Id})
 
@@ -863,7 +865,7 @@
 
 }
 
-func (dMgr *Manager) StartOmciTestAction(ctx context.Context, request *voltha.OmciTestRequest) (*voltha.TestResponse, error) {
+func (dMgr *Manager) StartOmciTestAction(ctx context.Context, request *omci.OmciTestRequest) (*omci.TestResponse, error) {
 	ctx = utils.WithRPCMetadataContext(ctx, "StartOmciTestAction")
 	log.EnrichSpan(ctx, log.Fields{"device-id": request.Id})
 
diff --git a/rw_core/core/device/manager_sbi.go b/rw_core/core/device/manager_sbi.go
index 53d2a24..5530750 100644
--- a/rw_core/core/device/manager_sbi.go
+++ b/rw_core/core/device/manager_sbi.go
@@ -22,7 +22,7 @@
 	"github.com/opencord/voltha-go/rw_core/utils"
 	"github.com/opencord/voltha-lib-go/v7/pkg/log"
 	"github.com/opencord/voltha-protos/v5/go/common"
-	ic "github.com/opencord/voltha-protos/v5/go/inter_container"
+	ca "github.com/opencord/voltha-protos/v5/go/core_adapter"
 	"github.com/opencord/voltha-protos/v5/go/voltha"
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
@@ -62,7 +62,7 @@
 	return nil, status.Errorf(codes.NotFound, "%s", device.Id)
 }
 
-func (dMgr *Manager) DeviceStateUpdate(ctx context.Context, ds *ic.DeviceStateFilter) (*empty.Empty, error) {
+func (dMgr *Manager) DeviceStateUpdate(ctx context.Context, ds *ca.DeviceStateFilter) (*empty.Empty, error) {
 	ctx = utils.WithNewSpanAndRPCMetadataContext(ctx, "DeviceStateUpdate")
 	logger.Debugw(ctx, "device-state-update", log.Fields{"device-id": ds.DeviceId, "operStatus": ds.OperStatus, "connStatus": ds.ConnStatus})
 
@@ -75,7 +75,7 @@
 	return nil, status.Errorf(codes.NotFound, "%s", ds.DeviceId)
 }
 
-func (dMgr *Manager) ChildDeviceDetected(ctx context.Context, dd *ic.DeviceDiscovery) (*voltha.Device, error) {
+func (dMgr *Manager) ChildDeviceDetected(ctx context.Context, dd *ca.DeviceDiscovery) (*voltha.Device, error) {
 	ctx = utils.WithNewSpanAndRPCMetadataContext(ctx, "ChildDeviceDetected")
 	logger.Debugw(ctx, "child-device-detected",
 		log.Fields{
@@ -121,7 +121,7 @@
 		return nil, status.Errorf(codes.FailedPrecondition, "device Type not set %s", dd.ParentId)
 	}
 
-	if device, err := dMgr.GetChildDevice(ctx, &ic.ChildDeviceFilter{
+	if device, err := dMgr.GetChildDevice(ctx, &ca.ChildDeviceFilter{
 		ParentId:     dd.ParentId,
 		SerialNumber: dd.SerialNumber,
 		OnuId:        dd.OnuId,
@@ -170,7 +170,7 @@
 	return insertedChildDevice, nil
 }
 
-func (dMgr *Manager) GetChildDevice(ctx context.Context, df *ic.ChildDeviceFilter) (*voltha.Device, error) {
+func (dMgr *Manager) GetChildDevice(ctx context.Context, df *ca.ChildDeviceFilter) (*voltha.Device, error) {
 	ctx = utils.WithNewSpanAndRPCMetadataContext(ctx, "GetChildDevice")
 	logger.Debugw(ctx, "get-child-device", log.Fields{"filter": df})
 
@@ -229,7 +229,7 @@
 }
 
 // PortsStateUpdate updates the operational status of all ports on the device
-func (dMgr *Manager) PortsStateUpdate(ctx context.Context, ps *ic.PortStateFilter) (*empty.Empty, error) {
+func (dMgr *Manager) PortsStateUpdate(ctx context.Context, ps *ca.PortStateFilter) (*empty.Empty, error) {
 	ctx = utils.WithNewSpanAndRPCMetadataContext(ctx, "PortsStateUpdate")
 	logger.Debugw(ctx, "ports-state-update", log.Fields{"device-id": ps.DeviceId})
 
@@ -336,7 +336,7 @@
 	return nil, status.Errorf(codes.NotFound, "%s", proxyAddress)
 }
 
-func (dMgr *Manager) GetPorts(ctx context.Context, pf *ic.PortFilter) (*voltha.Ports, error) {
+func (dMgr *Manager) GetPorts(ctx context.Context, pf *ca.PortFilter) (*voltha.Ports, error) {
 	ctx = utils.WithNewSpanAndRPCMetadataContext(ctx, "GetPorts")
 	logger.Debugw(ctx, "get-ports", log.Fields{"device-id": pf.DeviceId, "portType": pf.PortType})
 
@@ -354,7 +354,7 @@
 	return dMgr.getAllChildDevices(ctx, parentDeviceID.Id)
 }
 
-func (dMgr *Manager) ChildrenStateUpdate(ctx context.Context, ds *ic.DeviceStateFilter) (*empty.Empty, error) {
+func (dMgr *Manager) ChildrenStateUpdate(ctx context.Context, ds *ca.DeviceStateFilter) (*empty.Empty, error) {
 	ctx = utils.WithNewSpanAndRPCMetadataContext(ctx, "ChildrenStateUpdate")
 	logger.Debugw(ctx, "children-state-update", log.Fields{"parent-device-id": ds.ParentDeviceId, "operStatus": ds.OperStatus, "connStatus": ds.ConnStatus})
 
@@ -372,7 +372,7 @@
 	return &empty.Empty{}, nil
 }
 
-func (dMgr *Manager) PortStateUpdate(ctx context.Context, ps *ic.PortState) (*empty.Empty, error) {
+func (dMgr *Manager) PortStateUpdate(ctx context.Context, ps *ca.PortState) (*empty.Empty, error) {
 	ctx = utils.WithNewSpanAndRPCMetadataContext(ctx, "PortStateUpdate")
 	logger.Debugw(ctx, "port-state-update", log.Fields{"device-id": ps.DeviceId, "portType": ps.PortType, "portNo": ps.PortNo, "operStatus": ps.OperStatus})
 
@@ -430,7 +430,7 @@
 }
 
 // GetDevicePort returns the port details for a specific device port entry
-func (dMgr *Manager) GetDevicePort(ctx context.Context, pf *ic.PortFilter) (*voltha.Port, error) {
+func (dMgr *Manager) GetDevicePort(ctx context.Context, pf *ca.PortFilter) (*voltha.Port, error) {
 	ctx = utils.WithNewSpanAndRPCMetadataContext(ctx, "GetDevicePort")
 	logger.Debugw(ctx, "get-device-port", log.Fields{"device-id": pf.DeviceId})
 
@@ -459,7 +459,7 @@
 }
 
 // SendPacketIn receives packetIn request from adapter
-func (dMgr *Manager) SendPacketIn(ctx context.Context, pi *ic.PacketIn) (*empty.Empty, error) {
+func (dMgr *Manager) SendPacketIn(ctx context.Context, pi *ca.PacketIn) (*empty.Empty, error) {
 	ctx = utils.WithNewSpanAndRPCMetadataContext(ctx, "SendPacketIn")
 	logger.Debugw(ctx, "packet-in", log.Fields{"device-id": pi.DeviceId, "port": pi.Port})
 
@@ -481,7 +481,7 @@
 	return &empty.Empty{}, nil
 }
 
-func (dMgr *Manager) DeviceReasonUpdate(ctx context.Context, dr *ic.DeviceReason) (*empty.Empty, error) {
+func (dMgr *Manager) DeviceReasonUpdate(ctx context.Context, dr *ca.DeviceReason) (*empty.Empty, error) {
 	ctx = utils.WithNewSpanAndRPCMetadataContext(ctx, "DeviceReasonUpdate")
 	logger.Debugw(ctx, "update-device-reason", log.Fields{"device-id": dr.DeviceId, "reason": dr.Reason})
 
