image bugfix

This commit is contained in:
TangBin
2018-10-25 19:03:16 +08:00
parent 943f312ff8
commit 1e280ba39f
2 changed files with 2 additions and 7 deletions
+1 -6
View File
@@ -204,17 +204,12 @@ func (self *SRegion) GetImages(status ImageStatusType, owner ImageOwnerType, ima
if len(owner) > 0 {
own := string(owner)
if own == "self" {
filters = AppendSingleValueFilter(filters, "owner-id", own)
} else {
params.SetOwners([]*string{&own})
}
params.SetOwners([]*string{&own})
}
if len(imageId) > 0 {
params.SetImageIds(ConvertedList(imageId))
}
ret, err := self.ec2Client.DescribeImages(params)
if err != nil {
return nil, 0, err
+1 -1
View File
@@ -8,7 +8,7 @@ import (
func init() {
type ImageListOptions struct {
Status string `help:"image status type" choices:"Creating|Available|UnAvailable|CreateFailed"`
Owner string `help:"Owner type" choices:"system|self|others|marketplace"`
Owner string `help:"Owner type" choices:"amazon|self|microsoft|aws-marketplace"`
Id []string `help:"Image ID"`
Name string `help:"image name"`
Limit int `help:"page size"`