mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: openstack上传镜像时也指定os_type及额外信息
This commit is contained in:
@@ -52,11 +52,15 @@ func init() {
|
||||
})
|
||||
|
||||
type ImageCreateOptions struct {
|
||||
NAME string
|
||||
NAME string
|
||||
OsType string `help:"os type" default:"linux" choices:"linux|windows"`
|
||||
OsDistro string
|
||||
MinDiskSizeGB int
|
||||
MinRamMb int
|
||||
}
|
||||
|
||||
shellutils.R(&ImageCreateOptions{}, "image-create", "Create image", func(cli *openstack.SRegion, args *ImageCreateOptions) error {
|
||||
image, err := cli.CreateImage(args.NAME)
|
||||
image, err := cli.CreateImage(args.NAME, args.OsType, args.OsDistro, args.MinDiskSizeGB, args.MinRamMb)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user