[VOL-4514] Addressing device reconciliation failure

See comments on https://jira.opencord.org/browse/VOL-4514

This change is dependent on the related proto and voltha lib go
changes to be merged first.  Until then jenkins will fail.

Change-Id: If1562627d22529f4e0c9c8db6c1d40df558a84de
diff --git a/vendor/github.com/opencord/voltha-lib-go/v7/pkg/events/utils.go b/vendor/github.com/opencord/voltha-lib-go/v7/pkg/events/utils.go
index 4598161..f02c3bc 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v7/pkg/events/utils.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v7/pkg/events/utils.go
@@ -48,12 +48,20 @@
 	ContextIsRoot ContextType = "is-root"
 	// ContextParentPort is for the parent interface id of child in the context of the event
 	ContextParentPort ContextType = "parent-port"
+	//ContextPonID is the PON ID the Child device is connected to
+	ContextPonID ContextType = "pon-id"
+	//ContextOnuID is the Onu ID of the child device
+	ContextOnuID ContextType = "onu-id"
+	//ContextParentSerialNum is the serila number of the parent device
+	ContextParentSerialNum ContextType = "olt-serial-number"
 )
 
 type EventName string
 
 const (
 	DeviceStateChangeEvent EventName = "DEVICE_STATE_CHANGE"
+	OltDeviceStateDeleted  EventName = "OLT_DELETED_RAISE_EVENT"
+	OnuDeviceStateDeleted  EventName = "ONU_DELETED_RAISE_EVENT"
 )
 
 type EventAction string
@@ -89,3 +97,27 @@
 		DeviceEventName: fmt.Sprintf("%s_%s", string(DeviceStateChangeEvent), string(Raise)),
 	}
 }
+
+//CreateDeviceDeletedEvent forms and returns a new DeviceState Event
+func CreateDeviceDeletedEvent(serialNumber string, deviceID string, parentID string,
+	onuId uint32, parentPonPort uint32, isRoot bool) *voltha.DeviceEvent {
+
+	context := make(map[string]string)
+	eventName := string(OltDeviceStateDeleted)
+	/* Populating event context */
+	context[string(ContextSerialNumber)] = serialNumber
+	context[string(ContextDeviceID)] = deviceID
+	if !isRoot {
+		context[string(ContextPonID)] = strconv.FormatUint(uint64(parentPonPort), 10)
+		context[string(ContextOnuID)] = strconv.FormatUint(uint64(onuId), 10)
+		context[string(ContextParentID)] = parentID
+		eventName = string(OnuDeviceStateDeleted)
+
+	}
+
+	return &voltha.DeviceEvent{
+		Context:         context,
+		ResourceId:      deviceID,
+		DeviceEventName: eventName,
+	}
+}