diff --git a/src/router/routerVMs.go b/src/router/routerVMs.go index 09d7cc9aee76960e399cf85552871d1bdde9b8f5..0fb2cd992bf72aed64ec1f4d0eaa5f695de8a9b0 100644 --- a/src/router/routerVMs.go +++ b/src/router/routerVMs.go @@ -181,7 +181,7 @@ func (r *RouterVMs)CreateVM(c echo.Context) error { type Parameters struct { Name string `json:"name" validate:"required,min=4,max=256"` Cpus int `json:"cpus" validate:"required,gte=1,lte=16"` - Ram int `json:"ram" validate:"required,gte=512,lte=32768"` + Ram int `json:"ram" validate:"required,gte=512,lte=32768"` // in MB Nic vms.NicType `json:"nic" validate:"required"` // "none" or "user" TemplateID uuid.UUID `json:"templateID" validate:"required"` } @@ -287,7 +287,7 @@ func (r *RouterVMs)EditVMByID(c echo.Context) error { type Parameters struct { Name string `json:"name"` Cpus int `json:"cpus"` - Ram int `json:"ram"` + Ram int `json:"ram"` // in MB Nic vms.NicType `json:"nic"` } p := new(Parameters) diff --git a/src/vms/vm.go b/src/vms/vm.go index 0e555e0e52bec772cce331e62a94c6ced9888e57..f8aaec0d4f17fc84c10fa3134d620b4c28144c6f 100644 --- a/src/vms/vm.go +++ b/src/vms/vm.go @@ -27,7 +27,7 @@ type ( Owner string `json:"owner" validate:"required,email"` Name string `json:"name" validate:"required,min=2,max=256"` Cpus int `json:"cpus" validate:"required,gte=1,lte=16"` - Ram int `json:"ram" validate:"required,gte=512,lte=32768"` + Ram int `json:"ram" validate:"required,gte=512,lte=32768"` // in MB Nic NicType `json:"nic" validate:"required"` // "none" or "user" TemplateID uuid.UUID `json:"templateID" validate:"required"` Access map[string]caps.Capabilities `json:"access" validate:"required"` @@ -56,7 +56,7 @@ type ( Owner string `json:"owner"` Name string `json:"name"` Cpus int `json:"cpus"` - Ram int `json:"ram"` + Ram int `json:"ram"` // in MB Nic NicType `json:"nic"` TemplateID uuid.UUID `json:"templateID"` Access map[string]caps.Capabilities `json:"access"`