AWS: extend target options with the AMI boot mode
Add an optional `BootMode` field to the AWS target options. This allows to signal to worker the intended boot mode to use when registering the AMI in AWS. If not specified, the default behavior is preserved, specifically that the boot mode will be determined by the default boot mode of the instance provisioned from the AMI. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
e13f0a1ae2
commit
403b1e4692
3 changed files with 19 additions and 2 deletions
|
|
@ -511,7 +511,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
|
|||
break
|
||||
}
|
||||
|
||||
ami, err := a.Register(jobTarget.ImageName, bucket, targetOptions.Key, targetOptions.ShareWithAccounts, common.CurrentArch(), nil)
|
||||
ami, err := a.Register(jobTarget.ImageName, bucket, targetOptions.Key, targetOptions.ShareWithAccounts, common.CurrentArch(), targetOptions.BootMode)
|
||||
if err != nil {
|
||||
targetResult.TargetError = clienterrors.WorkerClientError(clienterrors.ErrorImportingImage, err.Error(), nil)
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue