cli: correct measurements in config generate stackit

This commit is contained in:
Malte Poll 2024-03-01 17:45:12 +01:00
parent f94c6ca0d4
commit 8b41bcaecc
3 changed files with 7 additions and 3 deletions

View file

@ -900,7 +900,11 @@ func (c *Config) Validate(force bool) error {
// WithOpenStackProviderDefaults fills the default values for the specific OpenStack provider.
// If the provider is not supported or not an OpenStack provider, the config is returned unchanged.
func (c *Config) WithOpenStackProviderDefaults(openStackProvider string) *Config {
func (c *Config) WithOpenStackProviderDefaults(csp cloudprovider.Provider, openStackProvider string) *Config {
if csp != cloudprovider.OpenStack {
return c
}
c.Attestation.QEMUVTPM = &QEMUVTPM{Measurements: measurements.DefaultsFor(cloudprovider.OpenStack, variant.QEMUVTPM{})}
switch openStackProvider {
case "stackit":
c.Provider.OpenStack.Cloud = "stackit"