Merge pull request #8799 from carlpett/proxmox/validate-template-name
proxmox: template_name cannot contain spaces
This commit is contained in:
commit
6d59cbd4b5
|
@ -8,6 +8,7 @@ import (
|
|||
"log"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/packer/common"
|
||||
|
@ -213,6 +214,9 @@ func (c *Config) Prepare(raws ...interface{}) ([]string, error) {
|
|||
if c.Node == "" {
|
||||
errs = packer.MultiErrorAppend(errs, errors.New("node must be specified"))
|
||||
}
|
||||
if strings.ContainsAny(c.TemplateName, " ") {
|
||||
errs = packer.MultiErrorAppend(errs, errors.New("template_name must not contain spaces"))
|
||||
}
|
||||
for idx := range c.NICs {
|
||||
if c.NICs[idx].Bridge == "" {
|
||||
errs = packer.MultiErrorAppend(errs, errors.New(fmt.Sprintf("network_adapters[%d].bridge must be specified", idx)))
|
||||
|
|
Loading…
Reference in New Issue