mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-15 01:53:51 -06:00
vendor: manually modify Nomad jobspec parser to not validate drivers
This commit is contained in:
parent
ddc7ca0971
commit
df92abe90f
17
vendor/github.com/hashicorp/nomad/jobspec/parse.go
generated
vendored
17
vendor/github.com/hashicorp/nomad/jobspec/parse.go
generated
vendored
@ -13,7 +13,6 @@ import (
|
|||||||
"github.com/hashicorp/go-multierror"
|
"github.com/hashicorp/go-multierror"
|
||||||
"github.com/hashicorp/hcl"
|
"github.com/hashicorp/hcl"
|
||||||
"github.com/hashicorp/hcl/hcl/ast"
|
"github.com/hashicorp/hcl/hcl/ast"
|
||||||
"github.com/hashicorp/nomad/client/driver"
|
|
||||||
"github.com/hashicorp/nomad/nomad/structs"
|
"github.com/hashicorp/nomad/nomad/structs"
|
||||||
"github.com/mitchellh/mapstructure"
|
"github.com/mitchellh/mapstructure"
|
||||||
)
|
)
|
||||||
@ -538,22 +537,6 @@ func parseTasks(jobName string, taskGroupName string, result *[]*structs.Task, l
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Instantiate a driver to validate the configuration
|
|
||||||
d, err := driver.NewDriver(
|
|
||||||
t.Driver,
|
|
||||||
driver.NewEmptyDriverContext(),
|
|
||||||
)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return multierror.Prefix(err,
|
|
||||||
fmt.Sprintf("'%s', config ->", n))
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := d.Validate(t.Config); err != nil {
|
|
||||||
return multierror.Prefix(err,
|
|
||||||
fmt.Sprintf("'%s', config ->", n))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse constraints
|
// Parse constraints
|
||||||
|
Loading…
Reference in New Issue
Block a user