Add image_name parameter to SessionDeploy

This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-06-14 21:09:20 -03:00
parent be6b8e6293
commit 2224e6e540
8 changed files with 27 additions and 13 deletions

View File

@@ -28,6 +28,7 @@ func NewSession(rw http.ResponseWriter, req *http.Request) {
reqDur := req.Form.Get("session-duration")
stack := req.Form.Get("stack")
stackName := req.Form.Get("stack_name")
imageName := req.Form.Get("image_name")
if stack != "" {
stack = formatStack(stack)
@@ -43,7 +44,7 @@ func NewSession(rw http.ResponseWriter, req *http.Request) {
}
duration := config.GetDuration(reqDur)
s, err := core.SessionNew(duration, stack, stackName)
s, err := core.SessionNew(duration, stack, stackName, imageName)
if err != nil {
log.Println(err)
//TODO: Return some error code