summaryrefslogtreecommitdiffstats
path: root/src/orchestrator/pkg/appcontext/appcontext.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/orchestrator/pkg/appcontext/appcontext.go')
-rw-r--r--src/orchestrator/pkg/appcontext/appcontext.go13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/orchestrator/pkg/appcontext/appcontext.go b/src/orchestrator/pkg/appcontext/appcontext.go
index d92b1d11..8f7841ac 100644
--- a/src/orchestrator/pkg/appcontext/appcontext.go
+++ b/src/orchestrator/pkg/appcontext/appcontext.go
@@ -22,6 +22,8 @@ import (
"github.com/onap/multicloud-k8s/src/orchestrator/pkg/rtcontext"
pkgerrors "github.com/pkg/errors"
+ //"log"
+ log "github.com/onap/multicloud-k8s/src/orchestrator/pkg/infra/logutils"
)
type AppContext struct {
@@ -81,6 +83,7 @@ func (ac *AppContext) AddApp(handle interface{}, appname string) (interface{}, e
if err != nil {
return nil, err
}
+ log.Info(":: Added app handle ::", log.Fields{"AppHandle":h})
return h, nil
}
@@ -93,7 +96,7 @@ func (ac *AppContext) DeleteApp(handle interface{}) error {
return nil
}
-//Returns the hanlde for a given app
+//Returns the handle for a given app
func (ac *AppContext) GetAppHandle(appname string) (interface{}, error) {
if appname == "" {
return nil, pkgerrors.Errorf("Not a valid run time context app name")
@@ -123,6 +126,7 @@ func (ac *AppContext) AddCluster(handle interface{}, clustername string) (interf
if err != nil {
return nil, err
}
+ log.Info(":: Added cluster handle ::", log.Fields{"ClusterHandler":h})
return h, nil
}
@@ -193,11 +197,13 @@ func (ac *AppContext) GetClusterNames(appname string) ([]string, error) {
}
//Add resource under app and cluster
-func (ac *AppContext) AddResource(handle interface{}, resname string, value interface{}) (interface{}, error) {
+func (ac *AppContext) AddResource(handle interface{}, resname string, value []byte) (interface{}, error) {
h, err := ac.rtc.RtcAddResource(handle, resname, value)
if err != nil {
return nil, err
}
+ log.Info(":: Added resource handle ::", log.Fields{"ResourceHandler":h})
+
return h, nil
}
@@ -238,7 +244,7 @@ func (ac *AppContext) GetResourceHandle(appname string, clustername string, resn
}
//Update the resource value usign the given handle
-func (ac *AppContext) UpdateResourceValue(handle interface{}, value interface{}) error {
+func (ac *AppContext) UpdateResourceValue(handle interface{}, value []byte) error {
return ac.rtc.RtcUpdateValue(handle, value)
}
@@ -254,6 +260,7 @@ func (ac *AppContext) AddInstruction(handle interface{}, level string, insttype
if err != nil {
return nil, err
}
+ log.Info(":: Added instruction handle ::", log.Fields{"InstructionHandler":h})
return h, nil
}