Skip to content
Snippets Groups Projects
Commit 75a88eb9 authored by Ikram Haq's avatar Ikram Haq
Browse files

Add service instance id in the event notification and implement its logic

parent 3d718305
No related branches found
No related tags found
1 merge request!1Merge CAPIF into MEC Federation branch for ETSI SNS4SNS demo
/*
* MEC service management realized by CAPIF APIs
*
* The ETSI MEC ISG MEC011 MEC Service Management realized by CAPIF APIs described using OpenAPI
*
* API version: 3.2.1
* Contact: cti_support@etsi.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package server
type CapifEventDetail struct {
ServiceApiDescriptions []ServiceApiDescription `json:"serviceApiDescriptions,omitempty"`
ApiIds []string `json:"apiIds,omitempty"`
}
......@@ -14,4 +14,6 @@ type EventNotification struct {
Events []CapifEvent `json:"events,omitempty"`
// Identifier of the subscription resource to which the notification is related
SubscriptionId string `json:"subscriptionId"`
// Detailed information for the event, conditionally included
EventDetail *CapifEventDetail `json:"eventDetail,omitempty"`
}
......@@ -1852,7 +1852,8 @@ func checkSerAvailNotification(sInfo *ServiceInfo, mep string, changeType CapifE
notif := &EventNotification{
SubscriptionId: sub.Cfg.Id,
}
event_detail := &CapifEventDetail{}
event_detail.ApiIds = append(event_detail.ApiIds, sInfo.SerInstanceId)
// Set the event type based on changeType
var eventType CapifEvent
switch changeType {
......@@ -1863,7 +1864,7 @@ func checkSerAvailNotification(sInfo *ServiceInfo, mep string, changeType CapifE
case "SERVICE_API_UPDATE":
eventType = UPDATE
default:
// Handle any default case or errors
continue
}
// If eventType is set, append it to the Events slice
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment