Add disk_format option for OpenStack builder
This commit is contained in:
parent
5470c08345
commit
904dd1df63
|
@ -14,6 +14,7 @@ type ImageConfig struct {
|
|||
ImageMetadata map[string]string `mapstructure:"metadata"`
|
||||
ImageVisibility imageservice.ImageVisibility `mapstructure:"image_visibility"`
|
||||
ImageMembers []string `mapstructure:"image_members"`
|
||||
DiskFormat string `mapstructure:"disk_format"`
|
||||
}
|
||||
|
||||
func (c *ImageConfig) Prepare(ctx *interpolate.Context) []error {
|
||||
|
|
|
@ -47,7 +47,8 @@ func (s *stepCreateImage) Run(_ context.Context, state multistep.StateBag) multi
|
|||
}
|
||||
volume := state.Get("volume_id").(string)
|
||||
image, err := volumeactions.UploadImage(blockStorageClient, volume, volumeactions.UploadImageOpts{
|
||||
ImageName: config.ImageName,
|
||||
DiskFormat: config.DiskFormat,
|
||||
ImageName: config.ImageName,
|
||||
}).Extract()
|
||||
if err != nil {
|
||||
err := fmt.Errorf("Error creating image: %s", err)
|
||||
|
|
Loading…
Reference in New Issue