aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/api/brokerhandler.go
diff options
context:
space:
mode:
authorEric Multanen <eric.w.multanen@intel.com>2020-09-10 13:12:14 +0000
committerGerrit Code Review <gerrit@onap.org>2020-09-10 13:12:14 +0000
commitdae8d6f81bf346b3e63d939081b80c269e925e50 (patch)
treeb7933ebb28042e3cd5e2f2f03aedaf0b2782bb75 /src/k8splugin/api/brokerhandler.go
parent8d39c8b61929538dccea00329529104cc5866183 (diff)
parentcf79276e2b633211d9a0befcb0e978dea447a9cf (diff)
Merge "Provide capability to specify release-name during instantiation"
Diffstat (limited to 'src/k8splugin/api/brokerhandler.go')
-rw-r--r--src/k8splugin/api/brokerhandler.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/k8splugin/api/brokerhandler.go b/src/k8splugin/api/brokerhandler.go
index c98e1c48..05f94b7d 100644
--- a/src/k8splugin/api/brokerhandler.go
+++ b/src/k8splugin/api/brokerhandler.go
@@ -153,12 +153,20 @@ func (b brokerInstanceHandler) createHandler(w http.ResponseWriter, r *http.Requ
return
}
+ releaseName, ok := directives["k8s-rb-instance-release-name"]
+ if !ok {
+ //Release name is not mandatory argument, but we're not using profile's default
+ //as it could conflict if someone wanted to instantiate single profile multiple times
+ releaseName = req.VFModuleID
+ }
+
// Setup the resource parameters for making the request
var instReq app.InstanceRequest
instReq.RBName = req.VFModuleModelInvariantID
instReq.RBVersion = req.VFModuleModelVersionID
instReq.ProfileName = profileName
instReq.CloudRegion = cloudRegion
+ instReq.ReleaseName = releaseName
instReq.Labels = map[string]string{
"stack-name": req.TemplateData.StackName,
}