ctyun custom image create bugfix

This commit is contained in:
tangbin
2020-02-15 17:33:55 +08:00
parent ac2c3697bf
commit f9a47d94c7
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -41,6 +41,11 @@ func (self *SStoragecache) DownloadImage(userCred mcclient.TokenCredential, imag
}
func (self *SStoragecache) UploadImage(ctx context.Context, userCred mcclient.TokenCredential, image *cloudprovider.SImageCreateOption, isForce bool) (string, error) {
img, err := self.region.GetImage(image.ExternalId)
if err == nil {
return img.GetGlobalId(), nil
}
return "", cloudprovider.ErrNotSupported
}
+1
View File
@@ -16,6 +16,7 @@ package huawei
import (
"strings"
"yunion.io/x/pkg/utils"
api "yunion.io/x/onecloud/pkg/apis/compute"