Commit 8b82e13a authored by AyeshaAyubG's avatar AyeshaAyubG
Browse files

update MEC011 app-support

parent 469a4882
Loading
Loading
Loading
Loading
+1634 −924

File changed.

Preview size limit exceeded, changes collapsed.

+4 −4
Original line number Diff line number Diff line
@@ -555,8 +555,8 @@ func applicationsSubscriptionsGET(w http.ResponseWriter, r *http.Request) {
	}

	// Create subscription link list
	subscriptionLinkList := &SubscriptionLinkList{
		Links: &SubscriptionLinkListLinks{
	subscriptionLinkList := &MecAppSuptApiSubscriptionLinkList{
		Links: &MecAppSuptApiSubscriptionLinkListLinks{
			Self: &LinkType{
				Href: hostUrl.String() + basePath + "applications/" + appId + "/subscriptions",
			},
@@ -565,7 +565,7 @@ func applicationsSubscriptionsGET(w http.ResponseWriter, r *http.Request) {

	for _, sub := range subList {
		// Create subscription reference & append it to link list
		subscription := SubscriptionLinkListLinksSubscriptions{
		subscription := MecAppSuptApiSubscriptionLinkListLinksSubscriptions{
			// In v2.1.1 it should be SubscriptionType, but spec is expecting "rel" as per v1.1.1
			SubscriptionType: APP_TERMINATION_NOTIF_SUB_TYPE,
			Href:             sub.Cfg.Self,
@@ -575,7 +575,7 @@ func applicationsSubscriptionsGET(w http.ResponseWriter, r *http.Request) {

	// Send response
	w.WriteHeader(http.StatusOK)
	fmt.Fprintf(w, convertSubscriptionLinkListToJson(subscriptionLinkList))
	fmt.Fprintf(w, convertMecAppSuptApiSubscriptionLinkListToJson(subscriptionLinkList))
}

func timingCapsGET(w http.ResponseWriter, r *http.Request) {
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ func convertProblemDetailsToJson(obj *ProblemDetails) string {
	return string(jsonInfo)
}

func convertSubscriptionLinkListToJson(obj *SubscriptionLinkList) string {
func convertMecAppSuptApiSubscriptionLinkListToJson(obj *MecAppSuptApiSubscriptionLinkList) string {
	jsonInfo, err := json.Marshal(*obj)
	if err != nil {
		log.Error(err.Error())
+1 −1
Original line number Diff line number Diff line
@@ -30,5 +30,5 @@ type CurrentTime struct {
	// The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
	NanoSeconds int32 `json:"nanoSeconds"`
	// Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source
	TimeSourceStatus string `json:"timeSourceStatus"`
	TimeSourceStatus *TimeSourceStatus `json:"timeSourceStatus"`
}
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ package server
// This type represents the destination interface. If the action is FORWARD_DECAPSULATED, FORWARD_ENCAPSULATED or PASSTHROUGH one value shall be provided. If the action is DUPLICATE_DECAPSULATED or DUPLICATE_ENCAPSULATED, two values shall be provided. If the action is DROP, no value shall be provided.
type DestinationInterface struct {
	// Type of the interface
	InterfaceType string `json:"interfaceType"`
	InterfaceType *DestinationInterfaceInterfaceType `json:"interfaceType"`

	TunnelInfo *TunnelInfo `json:"tunnelInfo,omitempty"`
	// Source address identifies the MAC address of the interface
Loading