aboutsummaryrefslogtreecommitdiffstats
path: root/src/orchestrator/pkg/module/generic_placement_intent.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/orchestrator/pkg/module/generic_placement_intent.go')
-rw-r--r--src/orchestrator/pkg/module/generic_placement_intent.go16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/orchestrator/pkg/module/generic_placement_intent.go b/src/orchestrator/pkg/module/generic_placement_intent.go
index eb9ed796..3ff1c7dc 100644
--- a/src/orchestrator/pkg/module/generic_placement_intent.go
+++ b/src/orchestrator/pkg/module/generic_placement_intent.go
@@ -18,6 +18,7 @@ package module
import (
"encoding/json"
+
"github.com/onap/multicloud-k8s/src/orchestrator/pkg/infra/db"
pkgerrors "github.com/pkg/errors"
@@ -36,9 +37,6 @@ type GenIntentMetaData struct {
UserData2 string `json:"userData2"`
}
-
-
-
// GenericPlacementIntentManager is an interface which exposes the GenericPlacementIntentManager functionality
type GenericPlacementIntentManager interface {
CreateGenericPlacementIntent(g GenericPlacementIntent, p string, ca string,
@@ -57,7 +55,7 @@ type GenericPlacementIntentKey struct {
Project string `json:"project"`
CompositeApp string `json:"compositeapp"`
Version string `json:"compositeappversion"`
- DigName string `json:"deploymentintentgroupname"`
+ DigName string `json:"deploymentintentgroup"`
}
// We will use json marshalling to convert to string to
@@ -112,13 +110,12 @@ func (c *GenericPlacementIntentClient) CreateGenericPlacementIntent(g GenericPla
return GenericPlacementIntent{}, pkgerrors.New("Unable to find the deployment-intent-group-name")
}
-
gkey := GenericPlacementIntentKey{
Name: g.MetaData.Name,
Project: p,
CompositeApp: ca,
Version: v,
- DigName: digName,
+ DigName: digName,
}
err = db.DBconn.Insert(c.storeName, gkey, nil, c.tagMetaData, g)
@@ -136,7 +133,7 @@ func (c *GenericPlacementIntentClient) GetGenericPlacementIntent(i string, p str
Project: p,
CompositeApp: ca,
Version: v,
- DigName: digName,
+ DigName: digName,
}
result, err := db.DBconn.Find(c.storeName, key, c.tagMetaData)
@@ -177,8 +174,7 @@ func (c *GenericPlacementIntentClient) GetAllGenericPlacementIntents(p string, c
Project: p,
CompositeApp: ca,
Version: v,
- DigName: digName,
-
+ DigName: digName,
}
var gpList []GenericPlacementIntent
@@ -207,7 +203,7 @@ func (c *GenericPlacementIntentClient) DeleteGenericPlacementIntent(i string, p
Project: p,
CompositeApp: ca,
Version: v,
- DigName: digName,
+ DigName: digName,
}
err := db.DBconn.Remove(c.storeName, key)