VOL-3501 Refeactoring of code for event handling

Change-Id: I2d8e4bd3c6b711bc2fc3ef91e6f372ab80d2beb4
diff --git a/cmd/openonu-adapter/main.go b/cmd/openonu-adapter/main.go
index 80995a4..004755c 100644
--- a/cmd/openonu-adapter/main.go
+++ b/cmd/openonu-adapter/main.go
@@ -33,6 +33,8 @@
 	com "github.com/opencord/voltha-lib-go/v4/pkg/adapters/common"
 	conf "github.com/opencord/voltha-lib-go/v4/pkg/config"
 	"github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore"
+	"github.com/opencord/voltha-lib-go/v4/pkg/events"
+	"github.com/opencord/voltha-lib-go/v4/pkg/events/eventif"
 	"github.com/opencord/voltha-lib-go/v4/pkg/kafka"
 	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 	"github.com/opencord/voltha-lib-go/v4/pkg/probe"
@@ -54,7 +56,7 @@
 	kip              kafka.InterContainerProxy
 	coreProxy        adapterif.CoreProxy
 	adapterProxy     adapterif.AdapterProxy
-	eventProxy       adapterif.EventProxy
+	eventProxy       eventif.EventProxy
 	halted           bool
 	exitChannel      chan int
 	receiverChannels []<-chan *ic.InterContainerMessage //from inter-container
@@ -128,7 +130,7 @@
 	a.adapterProxy = com.NewAdapterProxy(ctx, a.kip, a.config.CoreTopic, cm.Backend)
 
 	// Create the event proxy to post events to KAFKA
-	a.eventProxy = com.NewEventProxy(com.MsgClient(a.kafkaClient), com.MsgTopic(kafka.Topic{Name: a.config.EventTopic}))
+	a.eventProxy = events.NewEventProxy(events.MsgClient(a.kafkaClient), events.MsgTopic(kafka.Topic{Name: a.config.EventTopic}))
 
 	// Create the open ONU interface adapter
 	if a.iAdapter, err = a.startVolthaInterfaceAdapter(ctx, a.kip, a.coreProxy, a.adapterProxy, a.eventProxy,
@@ -249,7 +251,7 @@
 }
 
 func (a *adapter) startVolthaInterfaceAdapter(ctx context.Context, kip kafka.InterContainerProxy,
-	cp adapterif.CoreProxy, ap adapterif.AdapterProxy, ep adapterif.EventProxy,
+	cp adapterif.CoreProxy, ap adapterif.AdapterProxy, ep eventif.EventProxy,
 	cfg *config.AdapterFlags, cm *conf.ConfigManager) (*ac.OpenONUAC, error) {
 	var err error
 	sAcONU := ac.NewOpenONUAC(ctx, a.kip, cp, ap, ep, a.kvClient, cfg, cm)
diff --git a/go.mod b/go.mod
index b0c5584..7566ae1 100644
--- a/go.mod
+++ b/go.mod
@@ -9,8 +9,8 @@
 	github.com/google/gopacket v1.1.17
 	github.com/looplab/fsm v0.1.0
 	github.com/opencord/omci-lib-go v0.13.4
-	github.com/opencord/voltha-lib-go/v4 v4.0.3
-	github.com/opencord/voltha-protos/v4 v4.0.5
+	github.com/opencord/voltha-lib-go/v4 v4.0.4
+	github.com/opencord/voltha-protos/v4 v4.0.6
 	github.com/stretchr/testify v1.6.1
 	google.golang.org/grpc v1.25.1 // indirect
 )
diff --git a/go.sum b/go.sum
index 9c118f6..c2c205c 100644
--- a/go.sum
+++ b/go.sum
@@ -219,11 +219,10 @@
 github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 github.com/opencord/omci-lib-go v0.13.4 h1:L3GpFHrx3DASixkCvztnJbcLGUTU/21wJYdE/qG9/XA=
 github.com/opencord/omci-lib-go v0.13.4/go.mod h1:6OIHB14Ch5qGgHzwSWlMACtk5KFoLzQ4LAhdcy4jwvo=
-github.com/opencord/voltha-lib-go/v4 v4.0.3 h1:bOb6T+8EsO37MPgU7i3pF81Yj2fUU43rFwv1hQsUVis=
-github.com/opencord/voltha-lib-go/v4 v4.0.3/go.mod h1:QgdIa7PlU0jhZT3qCPtcVt8/CpingKm4dUEROBrUBZg=
-github.com/opencord/voltha-protos/v4 v4.0.2/go.mod h1:W/OIFIyvFh/C0vchRUuarIsMylEhzCRM9pNxLvkPtKc=
-github.com/opencord/voltha-protos/v4 v4.0.5 h1:aOCk7SbIZhM8uHtsqAEADvO3l0xQgDPytoKZKb5Y4Zg=
-github.com/opencord/voltha-protos/v4 v4.0.5/go.mod h1:W/OIFIyvFh/C0vchRUuarIsMylEhzCRM9pNxLvkPtKc=
+github.com/opencord/voltha-lib-go/v4 v4.0.4 h1:F/bHZOHwYE6vaW1gUAuPMx2V9ygpO9lELDwH8qTnnaE=
+github.com/opencord/voltha-lib-go/v4 v4.0.4/go.mod h1:qxVbEjCzvcWIONwkhuYroE/9pRsOCjuyGBwOPRZmicg=
+github.com/opencord/voltha-protos/v4 v4.0.6 h1:cR5QO9yMMIn2zEwTxcUwxDMfQ5Zh3jBqhprw4xhdyAU=
+github.com/opencord/voltha-protos/v4 v4.0.6/go.mod h1:W/OIFIyvFh/C0vchRUuarIsMylEhzCRM9pNxLvkPtKc=
 github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=
 github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
 github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
diff --git a/internal/pkg/onuadaptercore/device_handler.go b/internal/pkg/onuadaptercore/device_handler.go
index a4da535..edcf7ff 100644
--- a/internal/pkg/onuadaptercore/device_handler.go
+++ b/internal/pkg/onuadaptercore/device_handler.go
@@ -32,6 +32,7 @@
 	me "github.com/opencord/omci-lib-go/generated"
 	"github.com/opencord/voltha-lib-go/v4/pkg/adapters/adapterif"
 	"github.com/opencord/voltha-lib-go/v4/pkg/db"
+	"github.com/opencord/voltha-lib-go/v4/pkg/events/eventif"
 	flow "github.com/opencord/voltha-lib-go/v4/pkg/flows"
 	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 	vc "github.com/opencord/voltha-protos/v4/go/common"
@@ -137,7 +138,7 @@
 
 	coreProxy    adapterif.CoreProxy
 	AdapterProxy adapterif.AdapterProxy
-	EventProxy   adapterif.EventProxy
+	EventProxy   eventif.EventProxy
 
 	pOpenOnuAc      *OpenONUAC
 	pDeviceStateFsm *fsm.FSM
@@ -170,7 +171,7 @@
 }
 
 //newDeviceHandler creates a new device handler
-func newDeviceHandler(ctx context.Context, cp adapterif.CoreProxy, ap adapterif.AdapterProxy, ep adapterif.EventProxy, device *voltha.Device, adapter *OpenONUAC) *deviceHandler {
+func newDeviceHandler(ctx context.Context, cp adapterif.CoreProxy, ap adapterif.AdapterProxy, ep eventif.EventProxy, device *voltha.Device, adapter *OpenONUAC) *deviceHandler {
 	var dh deviceHandler
 	dh.coreProxy = cp
 	dh.AdapterProxy = ap
@@ -936,6 +937,7 @@
 	if !dh.reconciling {
 		logger.Infow(ctx, "DeviceUpdate", log.Fields{"deviceReason": dh.device.Reason, "device-id": dh.deviceID})
 		_ = dh.coreProxy.DeviceUpdate(log.WithSpanFromContext(context.TODO(), ctx), dh.device)
+		//TODO Need to Update Device Reason To CORE as part of device update userstory
 	} else {
 		logger.Debugw(ctx, "reconciling - don't notify core about DeviceUpdate",
 			log.Fields{"device-id": dh.deviceID})
diff --git a/internal/pkg/onuadaptercore/openonu.go b/internal/pkg/onuadaptercore/openonu.go
index 9fcb457..58b1771 100644
--- a/internal/pkg/onuadaptercore/openonu.go
+++ b/internal/pkg/onuadaptercore/openonu.go
@@ -29,6 +29,7 @@
 	"github.com/golang/protobuf/ptypes"
 	"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/events/eventif"
 	"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"
@@ -46,7 +47,7 @@
 	lockDeviceHandlersMap       sync.RWMutex
 	coreProxy                   adapterif.CoreProxy
 	adapterProxy                adapterif.AdapterProxy
-	eventProxy                  adapterif.EventProxy
+	eventProxy                  eventif.EventProxy
 	kafkaICProxy                kafka.InterContainerProxy
 	kvClient                    kvstore.Client
 	cm                          *conf.ConfigManager
@@ -70,7 +71,7 @@
 //NewOpenONUAC returns a new instance of OpenONU_AC
 func NewOpenONUAC(ctx context.Context, kafkaICProxy kafka.InterContainerProxy,
 	coreProxy adapterif.CoreProxy, adapterProxy adapterif.AdapterProxy,
-	eventProxy adapterif.EventProxy, kvClient kvstore.Client, cfg *config.AdapterFlags, cm *conf.ConfigManager) *OpenONUAC {
+	eventProxy eventif.EventProxy, kvClient kvstore.Client, cfg *config.AdapterFlags, cm *conf.ConfigManager) *OpenONUAC {
 	var openOnuAc OpenONUAC
 	openOnuAc.exitChannel = make(chan int, 1)
 	openOnuAc.deviceHandlers = make(map[string]*deviceHandler)
diff --git a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/events/common.go b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/events/common.go
new file mode 100644
index 0000000..489a493
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/events/common.go
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package events
+
+import (
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+)
+
+var logger log.CLogger
+
+func init() {
+	// Setup this package so that it's log level can be modified at run time
+	var err error
+	logger, err = log.RegisterPackage(log.JSON, log.ErrorLevel, log.Fields{})
+	if err != nil {
+		panic(err)
+	}
+}
diff --git a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/adapters/adapterif/events_proxy_if.go b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/events/eventif/events_proxy_if.go
similarity index 83%
rename from vendor/github.com/opencord/voltha-lib-go/v4/pkg/adapters/adapterif/events_proxy_if.go
rename to vendor/github.com/opencord/voltha-lib-go/v4/pkg/events/eventif/events_proxy_if.go
index 7d8a053..7418ea1 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/adapters/adapterif/events_proxy_if.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/events/eventif/events_proxy_if.go
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018-present Open Networking Foundation
+ * Copyright 2020-present Open Networking Foundation
 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package adapterif
+package eventif
 
 import (
 	"context"
@@ -27,6 +27,8 @@
 		subCategory EventSubCategory, raisedTs int64) error
 	SendKpiEvent(ctx context.Context, id string, deviceEvent *voltha.KpiEvent2, category EventCategory,
 		subCategory EventSubCategory, raisedTs int64) error
+	SendRPCEvent(ctx context.Context, id string, deviceEvent *voltha.RPCEvent, category EventCategory,
+		subCategory *EventSubCategory, raisedTs int64) error
 }
 
 const (
diff --git a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/adapters/common/events_proxy.go b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/events/events_proxy.go
similarity index 69%
rename from vendor/github.com/opencord/voltha-lib-go/v4/pkg/adapters/common/events_proxy.go
rename to vendor/github.com/opencord/voltha-lib-go/v4/pkg/events/events_proxy.go
index b16c1ae..a4b12f7 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/adapters/common/events_proxy.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/events/events_proxy.go
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018-present Open Networking Foundation
+ * Copyright 2020-present Open Networking Foundation
 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package common
+package events
 
 import (
 	"context"
@@ -25,7 +25,7 @@
 	"time"
 
 	"github.com/golang/protobuf/ptypes"
-	"github.com/opencord/voltha-lib-go/v4/pkg/adapters/adapterif"
+	"github.com/opencord/voltha-lib-go/v4/pkg/events/eventif"
 	"github.com/opencord/voltha-lib-go/v4/pkg/kafka"
 	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 	"github.com/opencord/voltha-protos/v4/go/voltha"
@@ -63,9 +63,9 @@
 }
 
 func (ep *EventProxy) getEventHeader(eventName string,
-	category adapterif.EventCategory,
-	subCategory adapterif.EventSubCategory,
-	eventType adapterif.EventType,
+	category eventif.EventCategory,
+	subCategory *eventif.EventSubCategory,
+	eventType eventif.EventType,
 	raisedTs int64) (*voltha.EventHeader, error) {
 	var header voltha.EventHeader
 	if strings.Contains(eventName, "_") {
@@ -76,9 +76,11 @@
 	/* Populating event header */
 	header.Id = ep.formatId(eventName)
 	header.Category = category
-	header.SubCategory = subCategory
+	if subCategory != nil {
+		header.SubCategory = *subCategory
+	}
 	header.Type = eventType
-	header.TypeVersion = adapterif.EventTypeVersion
+	header.TypeVersion = eventif.EventTypeVersion
 
 	// raisedTs is in nanoseconds
 	timestamp, err := ptypes.TimestampProto(time.Unix(0, raisedTs))
@@ -96,8 +98,33 @@
 	return &header, nil
 }
 
+/* Send out rpc events*/
+func (ep *EventProxy) SendRPCEvent(ctx context.Context, id string, rpcEvent *voltha.RPCEvent, category eventif.EventCategory, subCategory *eventif.EventSubCategory, raisedTs int64) error {
+	if rpcEvent == nil {
+		logger.Error(ctx, "Received empty rpc event")
+		return errors.New("rpc event nil")
+	}
+	var event voltha.Event
+	var err error
+	if event.Header, err = ep.getEventHeader(id, category, subCategory, voltha.EventType_RPC_EVENT, raisedTs); err != nil {
+		return err
+	}
+	event.EventType = &voltha.Event_RpcEvent{RpcEvent: rpcEvent}
+	if err := ep.sendEvent(ctx, &event); err != nil {
+		logger.Errorw(ctx, "Failed to send rpc event to KAFKA bus", log.Fields{"rpc-event": rpcEvent})
+		return err
+	}
+	logger.Debugw(ctx, "Successfully sent RPC event to KAFKA bus", log.Fields{"Id": event.Header.Id, "Category": event.Header.Category,
+		"SubCategory": event.Header.SubCategory, "Type": event.Header.Type, "TypeVersion": event.Header.TypeVersion,
+		"ReportedTs": event.Header.ReportedTs, "ResourceId": rpcEvent.ResourceId, "Context": rpcEvent.Context,
+		"RPCEventName": id})
+
+	return nil
+
+}
+
 /* Send out device events*/
-func (ep *EventProxy) SendDeviceEvent(ctx context.Context, deviceEvent *voltha.DeviceEvent, category adapterif.EventCategory, subCategory adapterif.EventSubCategory, raisedTs int64) error {
+func (ep *EventProxy) SendDeviceEvent(ctx context.Context, deviceEvent *voltha.DeviceEvent, category eventif.EventCategory, subCategory eventif.EventSubCategory, raisedTs int64) error {
 	if deviceEvent == nil {
 		logger.Error(ctx, "Recieved empty device event")
 		return errors.New("Device event nil")
@@ -106,7 +133,7 @@
 	var de voltha.Event_DeviceEvent
 	var err error
 	de.DeviceEvent = deviceEvent
-	if event.Header, err = ep.getEventHeader(deviceEvent.DeviceEventName, category, subCategory, voltha.EventType_DEVICE_EVENT, raisedTs); err != nil {
+	if event.Header, err = ep.getEventHeader(deviceEvent.DeviceEventName, category, &subCategory, voltha.EventType_DEVICE_EVENT, raisedTs); err != nil {
 		return err
 	}
 	event.EventType = &de
@@ -124,7 +151,7 @@
 }
 
 // SendKpiEvent is to send kpi events to voltha.event topic
-func (ep *EventProxy) SendKpiEvent(ctx context.Context, id string, kpiEvent *voltha.KpiEvent2, category adapterif.EventCategory, subCategory adapterif.EventSubCategory, raisedTs int64) error {
+func (ep *EventProxy) SendKpiEvent(ctx context.Context, id string, kpiEvent *voltha.KpiEvent2, category eventif.EventCategory, subCategory eventif.EventSubCategory, raisedTs int64) error {
 	if kpiEvent == nil {
 		logger.Error(ctx, "Recieved empty kpi event")
 		return errors.New("KPI event nil")
@@ -133,7 +160,7 @@
 	var de voltha.Event_KpiEvent2
 	var err error
 	de.KpiEvent2 = kpiEvent
-	if event.Header, err = ep.getEventHeader(id, category, subCategory, voltha.EventType_KPI_EVENT2, raisedTs); err != nil {
+	if event.Header, err = ep.getEventHeader(id, category, &subCategory, voltha.EventType_KPI_EVENT2, raisedTs); err != nil {
 		return err
 	}
 	event.EventType = &de
@@ -149,9 +176,8 @@
 
 }
 
-/* TODO: Send out KPI events*/
-
 func (ep *EventProxy) sendEvent(ctx context.Context, event *voltha.Event) error {
+	logger.Debugw(ctx, "Send event to kafka", log.Fields{"event": event})
 	if err := ep.kafkaClient.Send(ctx, event, &ep.eventTopic); err != nil {
 		return err
 	}
diff --git a/vendor/github.com/opencord/voltha-protos/v4/go/voltha/events.pb.go b/vendor/github.com/opencord/voltha-protos/v4/go/voltha/events.pb.go
index 07ea547..f51a7b7 100644
--- a/vendor/github.com/opencord/voltha-protos/v4/go/voltha/events.pb.go
+++ b/vendor/github.com/opencord/voltha-protos/v4/go/voltha/events.pb.go
@@ -7,7 +7,7 @@
 	fmt "fmt"
 	proto "github.com/golang/protobuf/proto"
 	timestamp "github.com/golang/protobuf/ptypes/timestamp"
-	_ "github.com/opencord/voltha-protos/v4/go/common"
+	common "github.com/opencord/voltha-protos/v4/go/common"
 	_ "google.golang.org/genproto/googleapis/api/annotations"
 	math "math"
 )
@@ -110,7 +110,7 @@
 }
 
 func (EventCategory_Types) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_e63e6c07044fd2c4, []int{9, 0}
+	return fileDescriptor_e63e6c07044fd2c4, []int{10, 0}
 }
 
 type EventSubCategory_Types int32
@@ -144,7 +144,7 @@
 }
 
 func (EventSubCategory_Types) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_e63e6c07044fd2c4, []int{10, 0}
+	return fileDescriptor_e63e6c07044fd2c4, []int{11, 0}
 }
 
 type EventType_Types int32
@@ -154,6 +154,7 @@
 	EventType_KPI_EVENT    EventType_Types = 1
 	EventType_KPI_EVENT2   EventType_Types = 2
 	EventType_DEVICE_EVENT EventType_Types = 3
+	EventType_RPC_EVENT    EventType_Types = 4
 )
 
 var EventType_Types_name = map[int32]string{
@@ -161,6 +162,7 @@
 	1: "KPI_EVENT",
 	2: "KPI_EVENT2",
 	3: "DEVICE_EVENT",
+	4: "RPC_EVENT",
 }
 
 var EventType_Types_value = map[string]int32{
@@ -168,6 +170,7 @@
 	"KPI_EVENT":    1,
 	"KPI_EVENT2":   2,
 	"DEVICE_EVENT": 3,
+	"RPC_EVENT":    4,
 }
 
 func (x EventType_Types) String() string {
@@ -175,7 +178,7 @@
 }
 
 func (EventType_Types) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_e63e6c07044fd2c4, []int{11, 0}
+	return fileDescriptor_e63e6c07044fd2c4, []int{12, 0}
 }
 
 type ConfigEventType struct {
@@ -666,6 +669,111 @@
 }
 
 //
+// Describes the events specific to an RPC request
+type RPCEvent struct {
+	// RPC name
+	Rpc string `protobuf:"bytes,1,opt,name=rpc,proto3" json:"rpc,omitempty"`
+	// The operation id of that request.  Can be a log correlation ID
+	OperationId string `protobuf:"bytes,2,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
+	// Identifies the service name originating the event
+	Service string `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty"`
+	// Identifies the stack originating the event
+	StackId string `protobuf:"bytes,4,opt,name=stack_id,json=stackId,proto3" json:"stack_id,omitempty"`
+	// Identifies the resource upon which the action is taken, e.g. device_id
+	ResourceId string `protobuf:"bytes,5,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
+	// Textual explanation of the event
+	Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
+	// Key/Value storage for extra information that may give context to the event
+	Context map[string]string `protobuf:"bytes,7,rep,name=context,proto3" json:"context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+	// Status of the RPC Event
+	Status               *common.OperationResp `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *RPCEvent) Reset()         { *m = RPCEvent{} }
+func (m *RPCEvent) String() string { return proto.CompactTextString(m) }
+func (*RPCEvent) ProtoMessage()    {}
+func (*RPCEvent) Descriptor() ([]byte, []int) {
+	return fileDescriptor_e63e6c07044fd2c4, []int{9}
+}
+
+func (m *RPCEvent) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_RPCEvent.Unmarshal(m, b)
+}
+func (m *RPCEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_RPCEvent.Marshal(b, m, deterministic)
+}
+func (m *RPCEvent) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_RPCEvent.Merge(m, src)
+}
+func (m *RPCEvent) XXX_Size() int {
+	return xxx_messageInfo_RPCEvent.Size(m)
+}
+func (m *RPCEvent) XXX_DiscardUnknown() {
+	xxx_messageInfo_RPCEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_RPCEvent proto.InternalMessageInfo
+
+func (m *RPCEvent) GetRpc() string {
+	if m != nil {
+		return m.Rpc
+	}
+	return ""
+}
+
+func (m *RPCEvent) GetOperationId() string {
+	if m != nil {
+		return m.OperationId
+	}
+	return ""
+}
+
+func (m *RPCEvent) GetService() string {
+	if m != nil {
+		return m.Service
+	}
+	return ""
+}
+
+func (m *RPCEvent) GetStackId() string {
+	if m != nil {
+		return m.StackId
+	}
+	return ""
+}
+
+func (m *RPCEvent) GetResourceId() string {
+	if m != nil {
+		return m.ResourceId
+	}
+	return ""
+}
+
+func (m *RPCEvent) GetDescription() string {
+	if m != nil {
+		return m.Description
+	}
+	return ""
+}
+
+func (m *RPCEvent) GetContext() map[string]string {
+	if m != nil {
+		return m.Context
+	}
+	return nil
+}
+
+func (m *RPCEvent) GetStatus() *common.OperationResp {
+	if m != nil {
+		return m.Status
+	}
+	return nil
+}
+
+//
 // Identify the area of the system impacted by the event.
 type EventCategory struct {
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -677,7 +785,7 @@
 func (m *EventCategory) String() string { return proto.CompactTextString(m) }
 func (*EventCategory) ProtoMessage()    {}
 func (*EventCategory) Descriptor() ([]byte, []int) {
-	return fileDescriptor_e63e6c07044fd2c4, []int{9}
+	return fileDescriptor_e63e6c07044fd2c4, []int{10}
 }
 
 func (m *EventCategory) XXX_Unmarshal(b []byte) error {
@@ -710,7 +818,7 @@
 func (m *EventSubCategory) String() string { return proto.CompactTextString(m) }
 func (*EventSubCategory) ProtoMessage()    {}
 func (*EventSubCategory) Descriptor() ([]byte, []int) {
-	return fileDescriptor_e63e6c07044fd2c4, []int{10}
+	return fileDescriptor_e63e6c07044fd2c4, []int{11}
 }
 
 func (m *EventSubCategory) XXX_Unmarshal(b []byte) error {
@@ -743,7 +851,7 @@
 func (m *EventType) String() string { return proto.CompactTextString(m) }
 func (*EventType) ProtoMessage()    {}
 func (*EventType) Descriptor() ([]byte, []int) {
-	return fileDescriptor_e63e6c07044fd2c4, []int{11}
+	return fileDescriptor_e63e6c07044fd2c4, []int{12}
 }
 
 func (m *EventType) XXX_Unmarshal(b []byte) error {
@@ -801,7 +909,7 @@
 func (m *EventHeader) String() string { return proto.CompactTextString(m) }
 func (*EventHeader) ProtoMessage()    {}
 func (*EventHeader) Descriptor() ([]byte, []int) {
-	return fileDescriptor_e63e6c07044fd2c4, []int{12}
+	return fileDescriptor_e63e6c07044fd2c4, []int{13}
 }
 
 func (m *EventHeader) XXX_Unmarshal(b []byte) error {
@@ -883,6 +991,7 @@
 	//	*Event_KpiEvent
 	//	*Event_KpiEvent2
 	//	*Event_DeviceEvent
+	//	*Event_RpcEvent
 	EventType            isEvent_EventType `protobuf_oneof:"event_type"`
 	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
 	XXX_unrecognized     []byte            `json:"-"`
@@ -893,7 +1002,7 @@
 func (m *Event) String() string { return proto.CompactTextString(m) }
 func (*Event) ProtoMessage()    {}
 func (*Event) Descriptor() ([]byte, []int) {
-	return fileDescriptor_e63e6c07044fd2c4, []int{13}
+	return fileDescriptor_e63e6c07044fd2c4, []int{14}
 }
 
 func (m *Event) XXX_Unmarshal(b []byte) error {
@@ -941,6 +1050,10 @@
 	DeviceEvent *DeviceEvent `protobuf:"bytes,5,opt,name=device_event,json=deviceEvent,proto3,oneof"`
 }
 
+type Event_RpcEvent struct {
+	RpcEvent *RPCEvent `protobuf:"bytes,6,opt,name=rpc_event,json=rpcEvent,proto3,oneof"`
+}
+
 func (*Event_ConfigEvent) isEvent_EventType() {}
 
 func (*Event_KpiEvent) isEvent_EventType() {}
@@ -949,6 +1062,8 @@
 
 func (*Event_DeviceEvent) isEvent_EventType() {}
 
+func (*Event_RpcEvent) isEvent_EventType() {}
+
 func (m *Event) GetEventType() isEvent_EventType {
 	if m != nil {
 		return m.EventType
@@ -984,6 +1099,13 @@
 	return nil
 }
 
+func (m *Event) GetRpcEvent() *RPCEvent {
+	if x, ok := m.GetEventType().(*Event_RpcEvent); ok {
+		return x.RpcEvent
+	}
+	return nil
+}
+
 // XXX_OneofWrappers is for the internal use of the proto package.
 func (*Event) XXX_OneofWrappers() []interface{} {
 	return []interface{}{
@@ -991,6 +1113,7 @@
 		(*Event_KpiEvent)(nil),
 		(*Event_KpiEvent2)(nil),
 		(*Event_DeviceEvent)(nil),
+		(*Event_RpcEvent)(nil),
 	}
 }
 
@@ -1014,6 +1137,8 @@
 	proto.RegisterType((*KpiEvent2)(nil), "voltha.KpiEvent2")
 	proto.RegisterType((*DeviceEvent)(nil), "voltha.DeviceEvent")
 	proto.RegisterMapType((map[string]string)(nil), "voltha.DeviceEvent.ContextEntry")
+	proto.RegisterType((*RPCEvent)(nil), "voltha.RPCEvent")
+	proto.RegisterMapType((map[string]string)(nil), "voltha.RPCEvent.ContextEntry")
 	proto.RegisterType((*EventCategory)(nil), "voltha.EventCategory")
 	proto.RegisterType((*EventSubCategory)(nil), "voltha.EventSubCategory")
 	proto.RegisterType((*EventType)(nil), "voltha.EventType")
@@ -1024,76 +1149,85 @@
 func init() { proto.RegisterFile("voltha_protos/events.proto", fileDescriptor_e63e6c07044fd2c4) }
 
 var fileDescriptor_e63e6c07044fd2c4 = []byte{
-	// 1135 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0xe3, 0x44,
-	0x14, 0x8e, 0x9d, 0x34, 0x3f, 0xc7, 0x69, 0xeb, 0xce, 0x22, 0x08, 0x59, 0xd8, 0x2d, 0x46, 0xa0,
-	0x6a, 0x57, 0x38, 0xc2, 0xac, 0xb4, 0x55, 0x57, 0x08, 0x76, 0x53, 0xb3, 0x35, 0x4b, 0x93, 0xe0,
-	0xa6, 0x45, 0x70, 0x13, 0x4d, 0xe3, 0x69, 0x62, 0x35, 0xc9, 0x58, 0x9e, 0x49, 0xb4, 0x7d, 0x00,
-	0xae, 0x79, 0x00, 0x1e, 0x81, 0xe7, 0xe0, 0x31, 0x10, 0x2f, 0xc1, 0x03, 0xa0, 0xf9, 0x71, 0x62,
-	0x97, 0xae, 0xf6, 0x62, 0xc5, 0x95, 0x67, 0xce, 0x9c, 0x6f, 0xe6, 0x3b, 0x67, 0xce, 0x77, 0xc6,
-	0xd0, 0x5e, 0xd1, 0x19, 0x9f, 0xe2, 0x51, 0x92, 0x52, 0x4e, 0x59, 0x87, 0xac, 0xc8, 0x82, 0x33,
-	0x57, 0xce, 0x50, 0x55, 0xad, 0xb5, 0x5b, 0x45, 0x9f, 0x39, 0xe1, 0x58, 0x79, 0xb4, 0x3f, 0x9a,
-	0x50, 0x3a, 0x99, 0x91, 0x0e, 0x4e, 0xe2, 0x0e, 0x5e, 0x2c, 0x28, 0xc7, 0x3c, 0xa6, 0x0b, 0x8d,
-	0x6f, 0x3f, 0xd4, 0xab, 0x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, 0x0a, 0x7e, 0xfd, 0x6a, 0x75, 0x61, 0x1c, 0x40, 0x23, 0xdb, 0x85, 0xa5,
+	0xdc, 0x19, 0x7a, 0x99, 0xe6, 0x29, 0xe8, 0x65, 0xfa, 0xb2, 0xa0, 0x47, 0x93, 0x40, 0xc3, 0x2a,
+	0x79, 0x7a, 0x69, 0x07, 0x11, 0xf4, 0x68, 0x12, 0xc8, 0xf1, 0xcb, 0x06, 0x80, 0xea, 0xf4, 0xe2,
+	0x5f, 0xbe, 0xec, 0xc1, 0x9d, 0x98, 0x4e, 0x9c, 0x38, 0x21, 0xf3, 0x20, 0xa6, 0xa1, 0x46, 0xfe,
+	0xec, 0x4c, 0x22, 0x7e, 0xb9, 0x38, 0x17, 0x2d, 0xa5, 0x93, 0xae, 0x75, 0xd4, 0xda, 0x13, 0xfd,
+	0x72, 0x5e, 0x3e, 0xed, 0x4c, 0x62, 0x6d, 0x3b, 0xaf, 0x48, 0xe3, 0x37, 0xff, 0x06, 0x00, 0x00,
+	0xff, 0xff, 0x7b, 0x2c, 0xa9, 0x18, 0xdb, 0x0b, 0x00, 0x00,
 }
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 9095dc1..ab9998d 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -74,20 +74,22 @@
 # github.com/opencord/omci-lib-go v0.13.4
 github.com/opencord/omci-lib-go
 github.com/opencord/omci-lib-go/generated
-# github.com/opencord/voltha-lib-go/v4 v4.0.3
+# github.com/opencord/voltha-lib-go/v4 v4.0.4
 github.com/opencord/voltha-lib-go/v4/pkg/adapters
 github.com/opencord/voltha-lib-go/v4/pkg/adapters/adapterif
 github.com/opencord/voltha-lib-go/v4/pkg/adapters/common
 github.com/opencord/voltha-lib-go/v4/pkg/config
 github.com/opencord/voltha-lib-go/v4/pkg/db
 github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore
+github.com/opencord/voltha-lib-go/v4/pkg/events
+github.com/opencord/voltha-lib-go/v4/pkg/events/eventif
 github.com/opencord/voltha-lib-go/v4/pkg/flows
 github.com/opencord/voltha-lib-go/v4/pkg/kafka
 github.com/opencord/voltha-lib-go/v4/pkg/log
 github.com/opencord/voltha-lib-go/v4/pkg/probe
 github.com/opencord/voltha-lib-go/v4/pkg/techprofile
 github.com/opencord/voltha-lib-go/v4/pkg/version
-# github.com/opencord/voltha-protos/v4 v4.0.5
+# github.com/opencord/voltha-protos/v4 v4.0.6
 github.com/opencord/voltha-protos/v4/go/common
 github.com/opencord/voltha-protos/v4/go/ext/config
 github.com/opencord/voltha-protos/v4/go/inter_container