image filter by own

This commit is contained in:
TangBin
2018-10-25 18:47:01 +08:00
parent 94d93bee07
commit 943f312ff8
+5 -1
View File
@@ -204,7 +204,11 @@ func (self *SRegion) GetImages(status ImageStatusType, owner ImageOwnerType, ima
if len(owner) > 0 {
own := string(owner)
params.SetOwners([]*string{&own})
if own == "self" {
filters = AppendSingleValueFilter(filters, "owner-id", own)
} else {
params.SetOwners([]*string{&own})
}
}
if len(imageId) > 0 {