Commit 1713d471 authored by Yann Garcia's avatar Yann Garcia
Browse files

Finalize meep-federation service skeleton

parent 76a86e5f
Loading
Loading
Loading
Loading
+3 −0
Changes for examples/demo6/golang/client/api/swagger.yaml: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -166,6 +166,7 @@ paths:
          type: string
          enum:
          - 4g-5g-macro-v2x
          - 4g-5g-macro-v2x-fed
          - 4g-5g-wifi-macro
          - 4g-macro
          - 4g-wifi-macro
@@ -218,6 +219,7 @@ paths:
          type: string
          enum:
          - 4g-5g-macro-v2x
          - 4g-5g-macro-v2x-fed
          - 4g-5g-wifi-macro
          - 4g-macro
          - 4g-wifi-macro
@@ -262,6 +264,7 @@ paths:
          type: string
          enum:
          - 4g-5g-macro-v2x
          - 4g-5g-macro-v2x-fed
          - 4g-5g-wifi-macro
          - 4g-macro
          - 4g-wifi-macro
+4 −0
Changes for go-apps/meep-federation/server/api_system_info.go: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -12,6 +12,10 @@ import (
	"net/http"
)

func Mec011AppTerminationPOST(w http.ResponseWriter, r *http.Request) {
	mec011AppTerminationPost(w, r)
}

func SysteminfoByIdDELETE(w http.ResponseWriter, r *http.Request) {
	systeminfoByIdDELETE(w, r)
}
+5 −7
Changes for go-apps/meep-federation/server/federation.go: 5 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ import (
)

const moduleName = "meep-federation"
const fedBasePath = "federation/v1/"
const fedBasePath = "fed_enablement/v1/"
const fedKey = "federation"

const serviceName = "FED Service"
@@ -50,7 +50,6 @@ const serviceCategory = "FED"
const defaultMepName = "global"
const defaultScopeOfLocality = "MEC_SYSTEM"
const defaultConsumedLocalOnly = true
const defaultPredictionModelSupported = false
const appTerminationPath = "notifications/mec011/appTermination"

var redisAddr string = "meep-redis-master.default.svc.cluster.local:6379"
@@ -748,8 +747,7 @@ func fedNotify(msg string) {
 * checkForExpiredSubscriptions delete those subscriptions whose expiryTime is reached
 */
func checkForExpiredSubscriptions() {
	log.Debug(">>> checkForExpiredSubscriptions")
	// log.Info("checkForExpiredSubscriptions: provChgUuUniSubscriptionMap: ", provChgUuUniSubscriptionMap)
	//log.Debug(">>> checkForExpiredSubscriptions")
	// log.Info("checkForExpiredSubscriptions: fedMsgSubscriptionMap: ", fedMsgSubscriptionMap)

	nowTime := int(time.Now().Unix())
@@ -823,6 +821,6 @@ func checkForExpiredSubscriptions() {
	} // End of 'for' statement
}

func computeElapseTime(expiryDeadline TimeStamp) *TimeStamp {
	return &TimeStamp{NanoSeconds: 0, Seconds: int32(expiryDeadline.Seconds) - int32(time.Now().Unix())}
}
// func computeElapseTime(expiryDeadline TimeStamp) *TimeStamp {
// 	return &TimeStamp{NanoSeconds: 0, Seconds: int32(expiryDeadline.Seconds) - int32(time.Now().Unix())}
// }
+0 −5
Changes for go-apps/meep-federation/server/federation_test.go: 0 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -37,11 +37,6 @@ import (
	"github.com/gorilla/mux"
)

//const INITIAL = 0
//const UPDATED = 1

const EXPIRY_DEADLINE = 20

//json format using spacing to facilitate reading
const testScenario string = `
 {
+0 −1
Changes for go-apps/meep-federation/server/model_fed_resources_systems_body.go: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -9,6 +9,5 @@
package server

type FedResourcesSystemsBody struct {

	SystemInfo *SystemInfo `json:"SystemInfo,omitempty"`
}
Loading