VOL-3677 - move to v4 of protos and lib

Change-Id: Ie9d215f69b798dbf2b879d8e7d041c0d671f84c0
diff --git a/internal/pkg/onuadaptercore/openonu.go b/internal/pkg/onuadaptercore/openonu.go
index 16ef7d7..9fcb457 100644
--- a/internal/pkg/onuadaptercore/openonu.go
+++ b/internal/pkg/onuadaptercore/openonu.go
@@ -21,19 +21,20 @@
 	"context"
 	"errors"
 	"fmt"
-	conf "github.com/opencord/voltha-lib-go/v3/pkg/config"
 	"sync"
 	"time"
 
+	conf "github.com/opencord/voltha-lib-go/v4/pkg/config"
+
 	"github.com/golang/protobuf/ptypes"
-	"github.com/opencord/voltha-lib-go/v3/pkg/adapters/adapterif"
-	"github.com/opencord/voltha-lib-go/v3/pkg/db/kvstore"
-	"github.com/opencord/voltha-lib-go/v3/pkg/kafka"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-	ic "github.com/opencord/voltha-protos/v3/go/inter_container"
-	"github.com/opencord/voltha-protos/v3/go/openflow_13"
-	oop "github.com/opencord/voltha-protos/v3/go/openolt"
-	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"github.com/opencord/voltha-lib-go/v4/pkg/adapters/adapterif"
+	"github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore"
+	"github.com/opencord/voltha-lib-go/v4/pkg/kafka"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	ic "github.com/opencord/voltha-protos/v4/go/inter_container"
+	"github.com/opencord/voltha-protos/v4/go/openflow_13"
+	oop "github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v4/go/voltha"
 
 	"github.com/opencord/voltha-openonu-adapter-go/internal/pkg/config"
 )
@@ -117,17 +118,17 @@
 
 //Start starts (logs) the adapter
 func (oo *OpenONUAC) Start(ctx context.Context) error {
-	logger.Info("starting-openonu-adapter")
-	logger.Info("openonu-adapter-started")
+	logger.Info(ctx, "starting-openonu-adapter")
+	logger.Info(ctx, "openonu-adapter-started")
 	return nil
 }
 
 /*
 //stop terminates the session
 func (oo *OpenONUAC) stop(ctx context.Context) error {
-	logger.Info("stopping-device-manager")
+	logger.Info(ctx,"stopping-device-manager")
 	oo.exitChannel <- 1
-	logger.Info("device-manager-stopped")
+	logger.Info(ctx,"device-manager-stopped")
 	return nil
 }
 */
@@ -139,7 +140,7 @@
 		oo.deviceHandlers[agent.deviceID] = agent
 		oo.deviceHandlers[agent.deviceID].start(ctx)
 		if _, exist := oo.deviceHandlersCreateChan[agent.deviceID]; exist {
-			logger.Debugw("deviceHandler created - trigger processing of pending ONU_IND_REQUEST", log.Fields{"device-id": agent.deviceID})
+			logger.Debugw(ctx, "deviceHandler created - trigger processing of pending ONU_IND_REQUEST", log.Fields{"device-id": agent.deviceID})
 			oo.deviceHandlersCreateChan[agent.deviceID] <- true
 		}
 	}
@@ -153,11 +154,11 @@
 }
 
 //getDeviceHandler gets the ONU deviceHandler and may wait until it is created
-func (oo *OpenONUAC) getDeviceHandler(deviceID string, aWait bool) *deviceHandler {
+func (oo *OpenONUAC) getDeviceHandler(ctx context.Context, deviceID string, aWait bool) *deviceHandler {
 	oo.lockDeviceHandlersMap.Lock()
 	agent, ok := oo.deviceHandlers[deviceID]
 	if aWait && !ok {
-		logger.Infow("Race condition: deviceHandler not present - wait for creation or timeout",
+		logger.Infow(ctx, "Race condition: deviceHandler not present - wait for creation or timeout",
 			log.Fields{"device-id": deviceID})
 		if _, exist := oo.deviceHandlersCreateChan[deviceID]; !exist {
 			oo.deviceHandlersCreateChan[deviceID] = make(chan bool, 1)
@@ -169,10 +170,10 @@
 		// so it might be needed to wait here for that event with some timeout
 		select {
 		case <-time.After(1 * time.Second): //timer may be discussed ...
-			logger.Warnw("No valid deviceHandler created after max WaitTime", log.Fields{"device-id": deviceID})
+			logger.Warnw(ctx, "No valid deviceHandler created after max WaitTime", log.Fields{"device-id": deviceID})
 			return nil
 		case <-deviceCreateChan:
-			logger.Debugw("deviceHandler is ready now - continue", log.Fields{"device-id": deviceID})
+			logger.Debugw(ctx, "deviceHandler is ready now - continue", log.Fields{"device-id": deviceID})
 			oo.lockDeviceHandlersMap.RLock()
 			defer oo.lockDeviceHandlersMap.RUnlock()
 			return oo.deviceHandlers[deviceID]
@@ -182,11 +183,11 @@
 	return agent
 }
 
-func (oo *OpenONUAC) processInterAdapterONUIndReqMessage(msg *ic.InterAdapterMessage) error {
+func (oo *OpenONUAC) processInterAdapterONUIndReqMessage(ctx context.Context, msg *ic.InterAdapterMessage) error {
 	msgBody := msg.GetBody()
 	onuIndication := &oop.OnuIndication{}
 	if err := ptypes.UnmarshalAny(msgBody, onuIndication); err != nil {
-		logger.Warnw("onu-ind-request-cannot-unmarshal-msg-body", log.Fields{"error": err})
+		logger.Warnw(ctx, "onu-ind-request-cannot-unmarshal-msg-body", log.Fields{"error": err})
 		return err
 	}
 	//ToDeviceId should address a DeviceHandler instance
@@ -201,22 +202,22 @@
 		//Adopt_device() arrived and DeviceHandler instance was created
 		waitForDhInstPresent = true
 	}
-	if handler := oo.getDeviceHandler(targetDevice, waitForDhInstPresent); handler != nil {
-		logger.Infow("onu-ind-request", log.Fields{"device-id": targetDevice,
+	if handler := oo.getDeviceHandler(ctx, targetDevice, waitForDhInstPresent); handler != nil {
+		logger.Infow(ctx, "onu-ind-request", log.Fields{"device-id": targetDevice,
 			"OnuId":      onuIndication.GetOnuId(),
 			"AdminState": onuIndication.GetAdminState(), "OperState": onuOperstate,
 			"SNR": onuIndication.GetSerialNumber()})
 
 		if onuOperstate == "up" {
-			return handler.createInterface(onuIndication)
+			return handler.createInterface(ctx, onuIndication)
 		} else if (onuOperstate == "down") || (onuOperstate == "unreachable") {
-			return handler.updateInterface(onuIndication)
+			return handler.updateInterface(ctx, onuIndication)
 		} else {
-			logger.Errorw("unknown-onu-ind-request operState", log.Fields{"OnuId": onuIndication.GetOnuId()})
+			logger.Errorw(ctx, "unknown-onu-ind-request operState", log.Fields{"OnuId": onuIndication.GetOnuId()})
 			return fmt.Errorf("invalidOperState: %s, %s", onuOperstate, targetDevice)
 		}
 	}
-	logger.Warnw("no handler found for received onu-ind-request", log.Fields{
+	logger.Warnw(ctx, "no handler found for received onu-ind-request", log.Fields{
 		"msgToDeviceId": targetDevice})
 	return fmt.Errorf(fmt.Sprintf("handler-not-found-%s", targetDevice))
 }
@@ -228,16 +229,15 @@
 // /voltha-openolt-adapter/adaptercore/openolt.go
 
 // Adopt_device creates a new device handler if not present already and then adopts the device
-func (oo *OpenONUAC) Adopt_device(device *voltha.Device) error {
+func (oo *OpenONUAC) Adopt_device(ctx context.Context, device *voltha.Device) error {
 	if device == nil {
-		logger.Warn("voltha-device-is-nil")
+		logger.Warn(ctx, "voltha-device-is-nil")
 		return errors.New("nil-device")
 	}
-	ctx := context.Background()
-	logger.Infow("adopt-device", log.Fields{"device-id": device.Id})
+	logger.Infow(ctx, "adopt-device", log.Fields{"device-id": device.Id})
 	var handler *deviceHandler
-	if handler = oo.getDeviceHandler(device.Id, false); handler == nil {
-		handler := newDeviceHandler(oo.coreProxy, oo.adapterProxy, oo.eventProxy, device, oo)
+	if handler = oo.getDeviceHandler(ctx, device.Id, false); handler == nil {
+		handler := newDeviceHandler(ctx, oo.coreProxy, oo.adapterProxy, oo.eventProxy, device, oo)
 		oo.addDeviceHandlerToMap(ctx, handler)
 		go handler.adoptOrReconcileDevice(ctx, device)
 		// Launch the creation of the device topic
@@ -247,8 +247,8 @@
 }
 
 //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{"device-id": device.Id})
+func (oo *OpenONUAC) Get_ofp_device_info(ctx context.Context, device *voltha.Device) (*ic.SwitchCapability, error) {
+	logger.Errorw(ctx, "device-handler-not-set", log.Fields{"device-id": device.Id})
 	return nil, fmt.Errorf("device-handler-not-set %s", device.Id)
 }
 
@@ -257,21 +257,21 @@
 // cmp changes in onu_uni_port.go::CreateVolthaPort()
 
 //Process_inter_adapter_message sends messages to a target device (between adapters)
-func (oo *OpenONUAC) Process_inter_adapter_message(msg *ic.InterAdapterMessage) error {
-	logger.Debugw("Process_inter_adapter_message", log.Fields{"msgId": msg.Header.Id,
+func (oo *OpenONUAC) Process_inter_adapter_message(ctx context.Context, msg *ic.InterAdapterMessage) error {
+	logger.Debugw(ctx, "Process_inter_adapter_message", log.Fields{"msgId": msg.Header.Id,
 		"msgProxyDeviceId": msg.Header.ProxyDeviceId, "msgToDeviceId": msg.Header.ToDeviceId, "Type": msg.Header.Type})
 
 	if msg.Header.Type == ic.InterAdapterMessageType_ONU_IND_REQUEST {
 		// we have to handle ONU_IND_REQUEST already here - see comments in processInterAdapterONUIndReqMessage()
-		return oo.processInterAdapterONUIndReqMessage(msg)
+		return oo.processInterAdapterONUIndReqMessage(ctx, msg)
 	}
 	//ToDeviceId should address a DeviceHandler instance
 	targetDevice := msg.Header.ToDeviceId
-	if handler := oo.getDeviceHandler(targetDevice, false); handler != nil {
+	if handler := oo.getDeviceHandler(ctx, targetDevice, false); handler != nil {
 		/* 200724: modification towards synchronous implementation - possible errors within processing shall be
 		 * 	 in the accordingly delayed response, some timing effect might result in Techprofile processing for multiple UNI's
 		 */
-		return handler.processInterAdapterMessage(msg)
+		return handler.processInterAdapterMessage(ctx, msg)
 		/* so far the processing has been in background with according commented error treatment restrictions:
 		go handler.ProcessInterAdapterMessage(msg)
 		// error treatment might be more sophisticated
@@ -281,37 +281,36 @@
 		return nil
 		*/
 	}
-	logger.Warnw("no handler found for received Inter-Proxy-message", log.Fields{
+	logger.Warnw(ctx, "no handler found for received Inter-Proxy-message", log.Fields{
 		"msgToDeviceId": targetDevice})
 	return fmt.Errorf(fmt.Sprintf("handler-not-found-%s", targetDevice))
 }
 
 //Adapter_descriptor not implemented
-func (oo *OpenONUAC) Adapter_descriptor() error {
+func (oo *OpenONUAC) Adapter_descriptor(ctx context.Context) error {
 	return errors.New("unImplemented")
 }
 
 //Device_types unimplemented
-func (oo *OpenONUAC) Device_types() (*voltha.DeviceTypes, error) {
+func (oo *OpenONUAC) Device_types(ctx context.Context) (*voltha.DeviceTypes, error) {
 	return nil, errors.New("unImplemented")
 }
 
 //Health  returns unimplemented
-func (oo *OpenONUAC) Health() (*voltha.HealthStatus, error) {
+func (oo *OpenONUAC) Health(ctx context.Context) (*voltha.HealthStatus, error) {
 	return nil, errors.New("unImplemented")
 }
 
 //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 {
+func (oo *OpenONUAC) Reconcile_device(ctx context.Context, device *voltha.Device) error {
 	if device == nil {
-		logger.Warn("reconcile-device-voltha-device-is-nil")
+		logger.Warn(ctx, "reconcile-device-voltha-device-is-nil")
 		return errors.New("nil-device")
 	}
-	ctx := context.Background()
-	logger.Infow("reconcile-device", log.Fields{"device-id": device.Id})
+	logger.Infow(ctx, "reconcile-device", log.Fields{"device-id": device.Id})
 	var handler *deviceHandler
-	if handler = oo.getDeviceHandler(device.Id, false); handler == nil {
-		handler := newDeviceHandler(oo.coreProxy, oo.adapterProxy, oo.eventProxy, device, oo)
+	if handler = oo.getDeviceHandler(ctx, device.Id, false); handler == nil {
+		handler := newDeviceHandler(ctx, oo.coreProxy, oo.adapterProxy, oo.eventProxy, device, oo)
 		oo.addDeviceHandlerToMap(ctx, handler)
 		handler.device = device
 		handler.reconciling = true
@@ -324,76 +323,76 @@
 }
 
 //Abandon_device unimplemented
-func (oo *OpenONUAC) Abandon_device(device *voltha.Device) error {
+func (oo *OpenONUAC) Abandon_device(ctx context.Context, device *voltha.Device) error {
 	return errors.New("unImplemented")
 }
 
 //Disable_device disables the given device
-func (oo *OpenONUAC) Disable_device(device *voltha.Device) error {
-	logger.Infow("disable-device", log.Fields{"device-id": device.Id})
-	if handler := oo.getDeviceHandler(device.Id, false); handler != nil {
-		go handler.disableDevice(device)
+func (oo *OpenONUAC) Disable_device(ctx context.Context, device *voltha.Device) error {
+	logger.Infow(ctx, "disable-device", log.Fields{"device-id": device.Id})
+	if handler := oo.getDeviceHandler(ctx, device.Id, false); handler != nil {
+		go handler.disableDevice(ctx, device)
 		return nil
 	}
-	logger.Warnw("no handler found for device-disable", log.Fields{"device-id": device.Id})
+	logger.Warnw(ctx, "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.Infow("reenable-device", log.Fields{"device-id": device.Id})
-	if handler := oo.getDeviceHandler(device.Id, false); handler != nil {
-		go handler.reEnableDevice(device)
+func (oo *OpenONUAC) Reenable_device(ctx context.Context, device *voltha.Device) error {
+	logger.Infow(ctx, "reenable-device", log.Fields{"device-id": device.Id})
+	if handler := oo.getDeviceHandler(ctx, device.Id, false); handler != nil {
+		go handler.reEnableDevice(ctx, device)
 		return nil
 	}
-	logger.Warnw("no handler found for device-reenable", log.Fields{"device-id": device.Id})
+	logger.Warnw(ctx, "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.Infow("reboot-device", log.Fields{"device-id": device.Id})
-	if handler := oo.getDeviceHandler(device.Id, false); handler != nil {
-		go handler.rebootDevice(device)
+func (oo *OpenONUAC) Reboot_device(ctx context.Context, device *voltha.Device) error {
+	logger.Infow(ctx, "reboot-device", log.Fields{"device-id": device.Id})
+	if handler := oo.getDeviceHandler(ctx, device.Id, false); handler != nil {
+		go handler.rebootDevice(ctx, device)
 		return nil
 	}
-	logger.Warnw("no handler found for device-reboot", log.Fields{"device-id": device.Id})
+	logger.Warnw(ctx, "no handler found for device-reboot", log.Fields{"device-id": device.Id})
 	return fmt.Errorf(fmt.Sprintf("handler-not-found-#{device.Id}"))
 }
 
 //Self_test_device unimplemented
-func (oo *OpenONUAC) Self_test_device(device *voltha.Device) error {
+func (oo *OpenONUAC) Self_test_device(ctx context.Context, device *voltha.Device) error {
 	return errors.New("unImplemented")
 }
 
 // Delete_device deletes the given device
-func (oo *OpenONUAC) Delete_device(device *voltha.Device) error {
-	logger.Infow("delete-device", log.Fields{"device-id": device.Id, "SerialNumber": device.SerialNumber})
-	if handler := oo.getDeviceHandler(device.Id, false); handler != nil {
-		err := handler.deleteDevicePersistencyData()
+func (oo *OpenONUAC) Delete_device(ctx context.Context, device *voltha.Device) error {
+	logger.Infow(ctx, "delete-device", log.Fields{"device-id": device.Id, "SerialNumber": device.SerialNumber})
+	if handler := oo.getDeviceHandler(ctx, device.Id, false); handler != nil {
+		err := handler.deleteDevicePersistencyData(ctx)
 		//don't leave any garbage - even in error case
 		oo.deleteDeviceHandlerToMap(handler)
 		return err
 	}
-	logger.Warnw("no handler found for device-deletion", log.Fields{"device-id": device.Id})
+	logger.Warnw(ctx, "no handler found for device-deletion", log.Fields{"device-id": device.Id})
 	return fmt.Errorf(fmt.Sprintf("handler-not-found-%s", device.Id))
 }
 
 //Get_device_details unimplemented
-func (oo *OpenONUAC) Get_device_details(device *voltha.Device) error {
+func (oo *OpenONUAC) Get_device_details(ctx context.Context, device *voltha.Device) error {
 	return errors.New("unImplemented")
 }
 
 //Update_flows_bulk returns
-func (oo *OpenONUAC) Update_flows_bulk(device *voltha.Device, flows *voltha.Flows, groups *voltha.FlowGroups, flowMetadata *voltha.FlowMetadata) error {
+func (oo *OpenONUAC) Update_flows_bulk(ctx context.Context, device *voltha.Device, flows *voltha.Flows, groups *voltha.FlowGroups, flowMetadata *voltha.FlowMetadata) error {
 	return errors.New("unImplemented")
 }
 
 //Update_flows_incrementally updates (add/remove) the flows on a given device
-func (oo *OpenONUAC) Update_flows_incrementally(device *voltha.Device,
+func (oo *OpenONUAC) Update_flows_incrementally(ctx context.Context, device *voltha.Device,
 	flows *openflow_13.FlowChanges, groups *openflow_13.FlowGroupChanges, flowMetadata *voltha.FlowMetadata) error {
 
-	logger.Infow("update-flows-incrementally", log.Fields{"device-id": device.Id})
+	logger.Infow(ctx, "update-flows-incrementally", log.Fields{"device-id": device.Id})
 	//flow config is relayed to handler even if the device might be in some 'inactive' state
 	// let the handler or related FSM's decide, what to do with the modified flow state info
 	// at least the flow-remove must be done in respect to internal data, while OMCI activity might not be needed here
@@ -401,91 +400,91 @@
 	// For now, there is no support for group changes (as in the actual Py-adapter code)
 	//   but processing is continued for flowUpdate possibly also set in the request
 	if groups.ToAdd != nil && groups.ToAdd.Items != nil {
-		logger.Warnw("Update-flow-incr: group add not supported (ignored)", log.Fields{"device-id": device.Id})
+		logger.Warnw(ctx, "Update-flow-incr: group add not supported (ignored)", log.Fields{"device-id": device.Id})
 	}
 	if groups.ToRemove != nil && groups.ToRemove.Items != nil {
-		logger.Warnw("Update-flow-incr: group remove not supported (ignored)", log.Fields{"device-id": device.Id})
+		logger.Warnw(ctx, "Update-flow-incr: group remove not supported (ignored)", log.Fields{"device-id": device.Id})
 	}
 	if groups.ToUpdate != nil && groups.ToUpdate.Items != nil {
-		logger.Warnw("Update-flow-incr: group update not supported (ignored)", log.Fields{"device-id": device.Id})
+		logger.Warnw(ctx, "Update-flow-incr: group update not supported (ignored)", log.Fields{"device-id": device.Id})
 	}
 
-	if handler := oo.getDeviceHandler(device.Id, false); handler != nil {
-		err := handler.FlowUpdateIncremental(flows, groups, flowMetadata)
+	if handler := oo.getDeviceHandler(ctx, device.Id, false); handler != nil {
+		err := handler.FlowUpdateIncremental(ctx, flows, groups, flowMetadata)
 		return err
 	}
-	logger.Warnw("no handler found for incremental flow update", log.Fields{"device-id": device.Id})
+	logger.Warnw(ctx, "no handler found for incremental flow update", log.Fields{"device-id": device.Id})
 	return fmt.Errorf(fmt.Sprintf("handler-not-found-%s", device.Id))
 }
 
 //Update_pm_config returns PmConfigs nil or error
-func (oo *OpenONUAC) Update_pm_config(device *voltha.Device, pmConfigs *voltha.PmConfigs) error {
+func (oo *OpenONUAC) Update_pm_config(ctx context.Context, device *voltha.Device, pmConfigs *voltha.PmConfigs) error {
 	return errors.New("unImplemented")
 }
 
 //Receive_packet_out sends packet out to the device
-func (oo *OpenONUAC) Receive_packet_out(deviceID string, egressPortNo int, packet *openflow_13.OfpPacketOut) error {
+func (oo *OpenONUAC) Receive_packet_out(ctx context.Context, deviceID string, egressPortNo int, packet *openflow_13.OfpPacketOut) error {
 	return errors.New("unImplemented")
 }
 
 //Suppress_event unimplemented
-func (oo *OpenONUAC) Suppress_event(filter *voltha.EventFilter) error {
+func (oo *OpenONUAC) Suppress_event(ctx context.Context, filter *voltha.EventFilter) error {
 	return errors.New("unImplemented")
 }
 
 //Unsuppress_event  unimplemented
-func (oo *OpenONUAC) Unsuppress_event(filter *voltha.EventFilter) error {
+func (oo *OpenONUAC) Unsuppress_event(ctx context.Context, filter *voltha.EventFilter) error {
 	return errors.New("unImplemented")
 }
 
 //Download_image unimplemented
-func (oo *OpenONUAC) Download_image(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
+func (oo *OpenONUAC) Download_image(ctx context.Context, device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
 	return nil, errors.New("unImplemented")
 }
 
 //Get_image_download_status unimplemented
-func (oo *OpenONUAC) Get_image_download_status(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
+func (oo *OpenONUAC) Get_image_download_status(ctx context.Context, device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
 	return nil, errors.New("unImplemented")
 }
 
 //Cancel_image_download unimplemented
-func (oo *OpenONUAC) Cancel_image_download(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
+func (oo *OpenONUAC) Cancel_image_download(ctx context.Context, device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
 	return nil, errors.New("unImplemented")
 }
 
 //Activate_image_update unimplemented
-func (oo *OpenONUAC) Activate_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
+func (oo *OpenONUAC) Activate_image_update(ctx context.Context, device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
 	return nil, errors.New("unImplemented")
 }
 
 //Revert_image_update unimplemented
-func (oo *OpenONUAC) Revert_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
+func (oo *OpenONUAC) Revert_image_update(ctx context.Context, device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
 	return nil, errors.New("unImplemented")
 }
 
 // Enable_port to Enable PON/NNI interface - seems not to be used/required according to python code
-func (oo *OpenONUAC) Enable_port(deviceID string, port *voltha.Port) error {
+func (oo *OpenONUAC) Enable_port(ctx context.Context, deviceID string, port *voltha.Port) error {
 	return errors.New("unImplemented")
 }
 
 // Disable_port to Disable pon/nni interface  - seems not to be used/required according to python code
-func (oo *OpenONUAC) Disable_port(deviceID string, port *voltha.Port) error {
+func (oo *OpenONUAC) Disable_port(ctx context.Context, deviceID string, port *voltha.Port) error {
 	return errors.New("unImplemented")
 }
 
 //Child_device_lost - unimplemented
 //needed for if update >= 3.1.x
-func (oo *OpenONUAC) Child_device_lost(deviceID string, pPortNo uint32, onuID uint32) error {
+func (oo *OpenONUAC) Child_device_lost(ctx context.Context, deviceID string, pPortNo uint32, onuID uint32) error {
 	return errors.New("unImplemented")
 }
 
 // Start_omci_test unimplemented
-func (oo *OpenONUAC) Start_omci_test(device *voltha.Device, request *voltha.OmciTestRequest) (*voltha.TestResponse, error) {
+func (oo *OpenONUAC) Start_omci_test(ctx context.Context, device *voltha.Device, request *voltha.OmciTestRequest) (*voltha.TestResponse, error) {
 	return nil, errors.New("unImplemented")
 }
 
 // Get_ext_value - unimplemented
-func (oo *OpenONUAC) Get_ext_value(deviceID string, device *voltha.Device, valueparam voltha.ValueType_Type) (*voltha.ReturnValues, error) {
+func (oo *OpenONUAC) Get_ext_value(ctx context.Context, deviceID string, device *voltha.Device, valueparam voltha.ValueType_Type) (*voltha.ReturnValues, error) {
 	return nil, errors.New("unImplemented")
 }