Commit 10e537e8 authored by Simon Pastor's avatar Simon Pastor
Browse files

pr comments

parent 275e5beb
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -130,8 +130,10 @@ func Run() (err error) {
// Stop - Stop APP support
// Stop - Stop APP support
func Stop() (err error) {
func Stop() (err error) {
	// Flush all app-enablement instance data
	// Flush all app-enablement instance data
	if baseKey != "" {
		key := baseKey + "*"
		key := baseKey + "*"
		_ = rc.DBFlush(key)
		_ = rc.DBFlush(key)
	}
	return nil
	return nil
}
}


+4 −2
Original line number Original line Diff line number Diff line
@@ -148,8 +148,10 @@ func Run() (err error) {
// Stop - Stop Service Mgmt
// Stop - Stop Service Mgmt
func Stop() (err error) {
func Stop() (err error) {
	// Flush all app-enablement instance data
	// Flush all app-enablement instance data
	if baseKey != "" {
		key := baseKey + "*"
		key := baseKey + "*"
		_ = rc.DBFlush(key)
		_ = rc.DBFlush(key)
	}
	return nil
	return nil
}
}


+155 −157
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (c) 2020  InterDigital Communications, Inc
 * Copyright (c) 2021  InterDigital Communications, Inc
 *
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * you may not use this file except in compliance with the License.
@@ -24,11 +24,10 @@ import (
	"context"
	"context"
	"time"
	"time"


	log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger"
	smc "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-service-mgmt-client"
	asc "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-app-support-client"
	asc "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-app-support-client"
	log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger"
	scc "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-sandbox-ctrl-client"
	scc "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-sandbox-ctrl-client"

	smc "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-service-mgmt-client"
)
)


var srvMgmtClient *smc.APIClient
var srvMgmtClient *smc.APIClient
@@ -144,7 +143,7 @@ func servAvailSubscription(appInstanceId string, callbackReference string, serNa


func terminateApp(instanceId string) error {
func terminateApp(instanceId string) error {


	_, err := sccCtrlClient.ApplicationsApi.ApplicationsAppInstanceIdDELETE(context.TODO(), instanceId);
	_, err := sccCtrlClient.ApplicationsApi.ApplicationsAppInstanceIdDELETE(context.TODO(), instanceId)
	if err != nil {
	if err != nil {
		log.Error("Failed to Terminate an edge application: ", err)
		log.Error("Failed to Terminate an edge application: ", err)
		return err
		return err
@@ -346,4 +345,3 @@ func validateSerAvailabilityNotification(notification *smc.ServiceAvailabilityNo
	}
	}
	return ""
	return ""
}
}