aboutsummaryrefslogtreecommitdiffstats
path: root/src/orchestrator/pkg/module/instantiation_appcontext_helper.go
diff options
context:
space:
mode:
authorRitu Sood <Ritu.Sood@intel.com>2020-08-14 22:57:11 +0000
committerGerrit Code Review <gerrit@onap.org>2020-08-14 22:57:11 +0000
commit6e5ca4741dab0de3b4d89f410f0ff9d0313d6aee (patch)
tree6f4dbbdf8c13944cf5b95d2d59fd565ebee778b9 /src/orchestrator/pkg/module/instantiation_appcontext_helper.go
parent6e671649f67e9bbe2ebdea18efa18e9c2c506946 (diff)
parent709d6d17a3b2f8bc9d46034295bd7c5a7fb76107 (diff)
Merge "Add appcontext state, status and resource status"
Diffstat (limited to 'src/orchestrator/pkg/module/instantiation_appcontext_helper.go')
-rw-r--r--src/orchestrator/pkg/module/instantiation_appcontext_helper.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/orchestrator/pkg/module/instantiation_appcontext_helper.go b/src/orchestrator/pkg/module/instantiation_appcontext_helper.go
index 9ace81b6..692cdf1e 100644
--- a/src/orchestrator/pkg/module/instantiation_appcontext_helper.go
+++ b/src/orchestrator/pkg/module/instantiation_appcontext_helper.go
@@ -71,6 +71,16 @@ func makeAppContextForCompositeApp(p, ca, v, rName string) (contextForCompositeA
}
+// deleteAppContext removes an appcontext
+func deleteAppContext(ct appcontext.AppContext) error {
+ err := ct.DeleteCompositeApp()
+ if err != nil {
+ log.Warn(":: Error deleting AppContext ::", log.Fields{"Error": err})
+ return pkgerrors.Wrapf(err, "Error Deleteing AppContext")
+ }
+ return nil
+}
+
// getResources shall take in the sorted templates and output the resources
// which consists of name(name+kind) and filecontent
func getResources(st []helm.KubernetesResourceTemplate) ([]resource, error) {
@@ -208,7 +218,7 @@ func verifyResources(l gpic.ClusterList, ct appcontext.AppContext, resources []r
for _, res := range resources {
rh, err := ct.GetResourceHandle(appName, cn, res.name)
if err != nil {
- return pkgerrors.Wrapf(err, "Error getting resoure handle for resource :: %s, app:: %s, cluster :: %s, groupName :: %s", appName, res.name, cn, gn)
+ return pkgerrors.Wrapf(err, "Error getting resource handle for resource :: %s, app:: %s, cluster :: %s, groupName :: %s", appName, res.name, cn, gn)
}
log.Info(":: GetResourceHandle ::", log.Fields{"ResourceHandler": rh, "appName": appName, "Cluster": cn, "Resource": res.name})
}