diff --git a/pkg/apis/compute/guesttemplate.go b/pkg/apis/compute/guesttemplate.go index 8e4423c96f..0ae0750101 100644 --- a/pkg/apis/compute/guesttemplate.go +++ b/pkg/apis/compute/guesttemplate.go @@ -55,6 +55,7 @@ type GuesttemplateConfigInfo struct { Secgroup string `json:"secgroup"` IsolatedDeviceConfig []IsolatedDeviceConfig `json:"isolated_device_config"` Image string `json:"image"` + ResetPassword bool `json:"reset_password"` } type GuesttemplateDisk struct { diff --git a/pkg/compute/models/guest_template.go b/pkg/compute/models/guest_template.go index ffa3914c9c..628617de6c 100644 --- a/pkg/compute/models/guest_template.go +++ b/pkg/compute/models/guest_template.go @@ -329,6 +329,13 @@ func (gt *SGuestTemplate) getMoreDetailsV2(ctx context.Context, userCred mcclien // no arrivals } + // reset_password + if input.ResetPassword == nil { + configInfo.ResetPassword = false + } else { + configInfo.ResetPassword = *input.ResetPassword + } + out.ConfigInfo = configInfo return }