Commit 3a232fb7 authored by Simon Pastor's avatar Simon Pastor
Browse files

update for PR comments

parent e56bf618
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/InterDigitalInc/AdvantEDGE v1.4.0 h1:MnzK3dl4hUvfhZ4wYarVmJzE5IMO2Q63dyDkcQtEv1Q=
github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-couch v0.0.0-20200306214341-11d08c83c4d6 h1:MQdqTqVt3SKXO8NM4q4M1rM62lVdenF6SlQXdhkNTPg=
github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-couch v0.0.0-20200306214341-11d08c83c4d6/go.mod h1:P/cgQ5p3bN7uWSJ220kznT8YZyURV1HOGHSTrcR7LQg=
github.com/KromDaniel/jonson v0.0.0-20180630143114-d2f9c3c389db/go.mod h1:RU+6d0CNIRSp6yo1mXLIIrnFa/3LHhvcDVLVJyovptM=
github.com/KromDaniel/rejonson v0.0.0-20180822072824-00b5bcf2b351 h1:1u1XrfCBnY+GijnyU6O1k4odp5TnqZQTsp5v7+n/E4Y=
github.com/KromDaniel/rejonson v0.0.0-20180822072824-00b5bcf2b351/go.mod h1:HxwfbuElTuGf+/uKZfjJrCnv0BmmpkPJDI7gBwj1KkM=
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ func main() {

	go func() {
		// Initialize RNIS
		err := server.Init("", "", false)
		err := server.Init()
		if err != nil {
			log.Error("Failed to initialize RNI Service")
			run = false
+2 −22
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import (
)

const moduleName string = "meep-rnis-sbi"
const redisAddr string = "meep-redis-master.default.svc.cluster.local:6379"

type RnisSbi struct {
	sandboxName          string
@@ -41,6 +40,7 @@ var sbi *RnisSbi

// Init - RNI Service SBI initialization
func Init(sandboxName string,
	redisAddr string,
	updateUeEcgiInfo func(string, string, string, string),
	updateAppEcgiInfo func(string, string, string, string),
	updateScenarioName func(string),
@@ -51,21 +51,12 @@ func Init(sandboxName string,

	sbi.sandboxName = sandboxName

	if sbi.sandboxName == "" {
		err = errors.New("No sandbox name provided")
		log.Error(err.Error())
			return err
		}
	}

	// Create message queue
	sbi.mqLocal, err = mq.NewMsgQueue(mq.GetLocalName(sandboxName), moduleName, sandboxName, redisAddr)
	if err != nil {
		log.Error("Failed to create Message Queue with error: ", err)
		if !utTesting {
		return err
	}
	}
	log.Info("Message Queue created")

	// Create new active scenario model
@@ -133,17 +124,6 @@ func processActiveScenarioTerminate() {
	sbi.cleanUpCB()
}

func UtProcessActiveScenarioUpdate(scenario []byte) {
	if sbi.activeModel != nil {
		_ = sbi.activeModel.SetScenario(scenario)
	}
	if scenario != nil {
		processScenarioUpdate()
	} else {
		sbi.cleanUpCB()
	}
}

func processActiveScenarioUpdate() {
	log.Debug("processActiveScenarioUpdate")

+1 −1
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ func Init(redisDBAddr string, influxDBAddr string) (err error) {
	}()

	//sbi is the sole responsible of updating the userInfo, zoneInfo and apInfo structures
	return sbi.Init(sandboxName, updateUeEcgiInfo, updateAppEcgiInfo, updateStoreName, cleanUp)
	return sbi.Init(sandboxName, redisAddr, updateUeEcgiInfo, updateAppEcgiInfo, updateStoreName, cleanUp)
}

// reInit - finds the value already in the DB to repopulate local stored info
+262 −747

File changed.

Preview size limit exceeded, changes collapsed.