Loading go-apps/meep-ams/server/ams.go +11 −5 Original line number Diff line number Diff line Loading @@ -450,13 +450,19 @@ func startRegistrationTicker() { registrationSent := false subscriptionSent := false for range registrationTicker.C { // Get Application instance ID if not already available // Get Application instance ID if serviceAppInstanceId == "" { // If global service, request an app instance ID from Sandbox Controller // Otherwise use the scenario-provisioned instance ID if mepName == defaultMepName { var err error serviceAppInstanceId, err = getAppInstanceId() if err != nil || serviceAppInstanceId == "" { continue } } else { serviceAppInstanceId = instanceId } } // Send App Ready message Loading go-apps/meep-app-enablement/server/app-support/app-support.go +12 −0 Original line number Diff line number Diff line Loading @@ -872,6 +872,18 @@ func flushApps(persist bool) error { // Delete App instances for _, appInfo := range appInfoList { // Ignore persistent apps unless required if !persist { appPersist, err := strconv.ParseBool(appInfo[fieldPersist]) if err != nil { appPersist = false } if appPersist { continue } } // Get app instance ID appId := appInfo[fieldAppId] if appId == "" { Loading go-apps/meep-loc-serv/server/loc-serv.go +11 −5 Original line number Diff line number Diff line Loading @@ -405,13 +405,19 @@ func startRegistrationTicker() { subscriptionSent := false for range registrationTicker.C { // Get Application instance ID if not already available // Get Application instance ID if serviceAppInstanceId == "" { // If global service, request an app instance ID from Sandbox Controller // Otherwise use the scenario-provisioned instance ID if mepName == defaultMepName { var err error serviceAppInstanceId, err = getAppInstanceId() if err != nil || serviceAppInstanceId == "" { continue } } else { serviceAppInstanceId = instanceId } } // Send App Ready message Loading go-apps/meep-rnis/server/rnis.go +11 −5 Original line number Diff line number Diff line Loading @@ -482,13 +482,19 @@ func startRegistrationTicker() { registrationSent := false subscriptionSent := false for range registrationTicker.C { // Get Application instance ID if not already available // Get Application instance ID if serviceAppInstanceId == "" { // If global service, request an app instance ID from Sandbox Controller // Otherwise use the scenario-provisioned instance ID if mepName == defaultMepName { var err error serviceAppInstanceId, err = getAppInstanceId() if err != nil || serviceAppInstanceId == "" { continue } } else { serviceAppInstanceId = instanceId } } // Send App Ready message Loading go-apps/meep-sandbox-ctrl/server/app-ctrl.go +44 −5 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import ( apps "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-applications" dataModel "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-model" log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" mod "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-model" mq "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-mq" uuid "github.com/google/uuid" "github.com/gorilla/mux" Loading @@ -46,7 +47,8 @@ type AppCtrl struct { var appCtrl *AppCtrl // Initialize App Controller func appCtrlInit(sandboxName string, mqLocal *mq.MsgQueue) (err error) { func appCtrlInit(sandboxName string, mqLocal *mq.MsgQueue) error { var err error // Create new App Controller appCtrl = new(AppCtrl) Loading @@ -71,18 +73,55 @@ func appCtrlInit(sandboxName string, mqLocal *mq.MsgQueue) (err error) { } // Start App Controller func appCtrlRun() (err error) { func appCtrlRun() error { return nil } // Stop App Controller func appCtrlStop() (err error) { func appCtrlStop() error { return nil } // Flush App instances func appCtrlFlushAppInstances() (err error) { func appCtrlResetAppInstances(activeModel *mod.Model) error { // Flush non-persistent app instances appCtrl.appStore.FlushNonPersistent() // Create app instances for scenario processes if activeModel != nil { // Get active scenario node names appNames := activeModel.GetNodeNames(mod.NodeTypeEdgeApp) for _, appName := range appNames { // Get App Process & context appNode := activeModel.GetNode(appName) if appNode == nil { continue } appNodeCtx := activeModel.GetNodeContext(appName) if appNodeCtx == nil { continue } appProc := appNode.(*dataModel.Process) // Determine app type appType := apps.TypeUser if appCtrl.appStore.IsSysApp(appProc.Image) { appType = apps.TypeSystem } // Create & store app instance app := &apps.Application{ Id: appProc.Id, Name: appProc.Name, Mep: appNodeCtx.Parents[mod.PhyLoc], Type: appType, Persist: false, } err := appCtrl.appStore.Set(app) if err != nil { log.Error(err.Error()) } } } return nil } Loading Loading
go-apps/meep-ams/server/ams.go +11 −5 Original line number Diff line number Diff line Loading @@ -450,13 +450,19 @@ func startRegistrationTicker() { registrationSent := false subscriptionSent := false for range registrationTicker.C { // Get Application instance ID if not already available // Get Application instance ID if serviceAppInstanceId == "" { // If global service, request an app instance ID from Sandbox Controller // Otherwise use the scenario-provisioned instance ID if mepName == defaultMepName { var err error serviceAppInstanceId, err = getAppInstanceId() if err != nil || serviceAppInstanceId == "" { continue } } else { serviceAppInstanceId = instanceId } } // Send App Ready message Loading
go-apps/meep-app-enablement/server/app-support/app-support.go +12 −0 Original line number Diff line number Diff line Loading @@ -872,6 +872,18 @@ func flushApps(persist bool) error { // Delete App instances for _, appInfo := range appInfoList { // Ignore persistent apps unless required if !persist { appPersist, err := strconv.ParseBool(appInfo[fieldPersist]) if err != nil { appPersist = false } if appPersist { continue } } // Get app instance ID appId := appInfo[fieldAppId] if appId == "" { Loading
go-apps/meep-loc-serv/server/loc-serv.go +11 −5 Original line number Diff line number Diff line Loading @@ -405,13 +405,19 @@ func startRegistrationTicker() { subscriptionSent := false for range registrationTicker.C { // Get Application instance ID if not already available // Get Application instance ID if serviceAppInstanceId == "" { // If global service, request an app instance ID from Sandbox Controller // Otherwise use the scenario-provisioned instance ID if mepName == defaultMepName { var err error serviceAppInstanceId, err = getAppInstanceId() if err != nil || serviceAppInstanceId == "" { continue } } else { serviceAppInstanceId = instanceId } } // Send App Ready message Loading
go-apps/meep-rnis/server/rnis.go +11 −5 Original line number Diff line number Diff line Loading @@ -482,13 +482,19 @@ func startRegistrationTicker() { registrationSent := false subscriptionSent := false for range registrationTicker.C { // Get Application instance ID if not already available // Get Application instance ID if serviceAppInstanceId == "" { // If global service, request an app instance ID from Sandbox Controller // Otherwise use the scenario-provisioned instance ID if mepName == defaultMepName { var err error serviceAppInstanceId, err = getAppInstanceId() if err != nil || serviceAppInstanceId == "" { continue } } else { serviceAppInstanceId = instanceId } } // Send App Ready message Loading
go-apps/meep-sandbox-ctrl/server/app-ctrl.go +44 −5 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import ( apps "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-applications" dataModel "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-model" log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" mod "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-model" mq "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-mq" uuid "github.com/google/uuid" "github.com/gorilla/mux" Loading @@ -46,7 +47,8 @@ type AppCtrl struct { var appCtrl *AppCtrl // Initialize App Controller func appCtrlInit(sandboxName string, mqLocal *mq.MsgQueue) (err error) { func appCtrlInit(sandboxName string, mqLocal *mq.MsgQueue) error { var err error // Create new App Controller appCtrl = new(AppCtrl) Loading @@ -71,18 +73,55 @@ func appCtrlInit(sandboxName string, mqLocal *mq.MsgQueue) (err error) { } // Start App Controller func appCtrlRun() (err error) { func appCtrlRun() error { return nil } // Stop App Controller func appCtrlStop() (err error) { func appCtrlStop() error { return nil } // Flush App instances func appCtrlFlushAppInstances() (err error) { func appCtrlResetAppInstances(activeModel *mod.Model) error { // Flush non-persistent app instances appCtrl.appStore.FlushNonPersistent() // Create app instances for scenario processes if activeModel != nil { // Get active scenario node names appNames := activeModel.GetNodeNames(mod.NodeTypeEdgeApp) for _, appName := range appNames { // Get App Process & context appNode := activeModel.GetNode(appName) if appNode == nil { continue } appNodeCtx := activeModel.GetNodeContext(appName) if appNodeCtx == nil { continue } appProc := appNode.(*dataModel.Process) // Determine app type appType := apps.TypeUser if appCtrl.appStore.IsSysApp(appProc.Image) { appType = apps.TypeSystem } // Create & store app instance app := &apps.Application{ Id: appProc.Id, Name: appProc.Name, Mep: appNodeCtx.Parents[mod.PhyLoc], Type: appType, Persist: false, } err := appCtrl.appStore.Set(app) if err != nil { log.Error(err.Error()) } } } return nil } Loading