Loading go-apps/meep-sandbox-api/go.mod +1 −1 Changes for go-apps/meep-sandbox-api/go.mod: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ require ( github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-key-mgr v0.0.0 // indirect github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-model v0.0.0 // indirect github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-cache v0.0.0 // indirect github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-engine-client v0.0.0 // indirect github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-engine-client v0.0.0 github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-http-logger v0.0.0 // indirect github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger v0.0.0 github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-metrics v0.0.0 Loading go-apps/meep-sandbox-api/server/sandbox_api.go +31 −1 Changes for go-apps/meep-sandbox-api/server/sandbox_api.go: 31 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import ( //"sync" "time" gis "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-engine-client" log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" met "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-metrics" mq "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-mq" Loading Loading @@ -65,7 +66,7 @@ const moduleNamespace = "default" var baseKey string const authBasepath = "http://meep-auth-svc//auth/v1" const authBasepath = "http://meep-auth-svc/auth/v1" const pfmCtrlBasepath = "http://meep-platform-ctrl/platform-ctrl/v1" type SandboxApiConnectors struct { Loading @@ -78,6 +79,7 @@ type SandboxApiConnectors struct { pfmCtrlClient *platformCtrlClient.APIClient sandboxCtrlAppClient map[string]*sandboxCtrlClient.APIClient sessionStore map[string]*sm.Session gisClient map[string]*gis.APIClient uri *url.URL } Loading Loading @@ -221,6 +223,7 @@ func Init() (err error) { sandboxApiConnectors.sessionStore = make(map[string]*sm.Session) sandboxApiConnectors.sandboxCtrlAppClient = make(map[string]*sandboxCtrlClient.APIClient) sandboxApiConnectors.gisClient = make(map[string]*gis.APIClient) Ues = make(map[string]map[string][]sandboxCtrlClient.PhysicalLocation) Ues_count = make(map[string]map[string]int32) Loading Loading @@ -348,6 +351,20 @@ func login(w http.ResponseWriter, r *http.Request) { return } // Connect to GIS engine gisClientCfg := gis.NewConfiguration() gisClientCfg.BasePath = sandboxApiConnectors.uri.String() + "/" + sandboxName + "/gis/v1" log.Info("gisClientCfg.BasePath: ", gisClientCfg.BasePath) gisClientCfg.HTTPClient = &http.Client{Transport: tr} log.Info("gisClientCfg.HTTPClient: ", gisClientCfg.HTTPClient) sandboxApiConnectors.gisClient[sandboxName] = gis.NewAPIClient(gisClientCfg) if sandboxApiConnectors.gisClient[sandboxName] == nil { log.Error("Failed to create Sandbox GIS REST API client") _ = processLogout(sandboxName, w, r) w.WriteHeader(http.StatusInternalServerError) return } metricSessionSuccess.Inc() if isNew { metricSessionActive.Inc() Loading Loading @@ -854,6 +871,19 @@ func sandboxNetworkScenarioPOST(w http.ResponseWriter, r *http.Request) { return } _, err = sandboxApiConnectors.gisClient[sandbox_name].AutomationApi.SetAutomationStateByName(context.TODO(), "MOVEMENT", true) if err != nil { log.Error(err.Error()) errHandlerProblemDetails(w, err.Error(), http.StatusInternalServerError) return } _, err = sandboxApiConnectors.gisClient[sandbox_name].AutomationApi.SetAutomationStateByName(context.TODO(), "MOBILITY", true) if err != nil { log.Error(err.Error()) errHandlerProblemDetails(w, err.Error(), http.StatusInternalServerError) return } deleteUesIfAny(sandbox_name) w.WriteHeader(http.StatusNoContent) Loading Loading
go-apps/meep-sandbox-api/go.mod +1 −1 Changes for go-apps/meep-sandbox-api/go.mod: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ require ( github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-key-mgr v0.0.0 // indirect github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-model v0.0.0 // indirect github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-cache v0.0.0 // indirect github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-engine-client v0.0.0 // indirect github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-engine-client v0.0.0 github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-http-logger v0.0.0 // indirect github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger v0.0.0 github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-metrics v0.0.0 Loading
go-apps/meep-sandbox-api/server/sandbox_api.go +31 −1 Changes for go-apps/meep-sandbox-api/server/sandbox_api.go: 31 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import ( //"sync" "time" gis "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-engine-client" log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" met "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-metrics" mq "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-mq" Loading Loading @@ -65,7 +66,7 @@ const moduleNamespace = "default" var baseKey string const authBasepath = "http://meep-auth-svc//auth/v1" const authBasepath = "http://meep-auth-svc/auth/v1" const pfmCtrlBasepath = "http://meep-platform-ctrl/platform-ctrl/v1" type SandboxApiConnectors struct { Loading @@ -78,6 +79,7 @@ type SandboxApiConnectors struct { pfmCtrlClient *platformCtrlClient.APIClient sandboxCtrlAppClient map[string]*sandboxCtrlClient.APIClient sessionStore map[string]*sm.Session gisClient map[string]*gis.APIClient uri *url.URL } Loading Loading @@ -221,6 +223,7 @@ func Init() (err error) { sandboxApiConnectors.sessionStore = make(map[string]*sm.Session) sandboxApiConnectors.sandboxCtrlAppClient = make(map[string]*sandboxCtrlClient.APIClient) sandboxApiConnectors.gisClient = make(map[string]*gis.APIClient) Ues = make(map[string]map[string][]sandboxCtrlClient.PhysicalLocation) Ues_count = make(map[string]map[string]int32) Loading Loading @@ -348,6 +351,20 @@ func login(w http.ResponseWriter, r *http.Request) { return } // Connect to GIS engine gisClientCfg := gis.NewConfiguration() gisClientCfg.BasePath = sandboxApiConnectors.uri.String() + "/" + sandboxName + "/gis/v1" log.Info("gisClientCfg.BasePath: ", gisClientCfg.BasePath) gisClientCfg.HTTPClient = &http.Client{Transport: tr} log.Info("gisClientCfg.HTTPClient: ", gisClientCfg.HTTPClient) sandboxApiConnectors.gisClient[sandboxName] = gis.NewAPIClient(gisClientCfg) if sandboxApiConnectors.gisClient[sandboxName] == nil { log.Error("Failed to create Sandbox GIS REST API client") _ = processLogout(sandboxName, w, r) w.WriteHeader(http.StatusInternalServerError) return } metricSessionSuccess.Inc() if isNew { metricSessionActive.Inc() Loading Loading @@ -854,6 +871,19 @@ func sandboxNetworkScenarioPOST(w http.ResponseWriter, r *http.Request) { return } _, err = sandboxApiConnectors.gisClient[sandbox_name].AutomationApi.SetAutomationStateByName(context.TODO(), "MOVEMENT", true) if err != nil { log.Error(err.Error()) errHandlerProblemDetails(w, err.Error(), http.StatusInternalServerError) return } _, err = sandboxApiConnectors.gisClient[sandbox_name].AutomationApi.SetAutomationStateByName(context.TODO(), "MOBILITY", true) if err != nil { log.Error(err.Error()) errHandlerProblemDetails(w, err.Error(), http.StatusInternalServerError) return } deleteUesIfAny(sandbox_name) w.WriteHeader(http.StatusNoContent) Loading