Merge pull request #3430 from ioito/hotfix/qx-public-cloud-image-version

fix: 标准镜像version
This commit is contained in:
yunion-ci-robot
2019-11-04 21:27:15 +08:00
committed by GitHub
4 changed files with 7 additions and 4 deletions
+2 -1
View File
@@ -28,6 +28,7 @@ import (
api "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/cloudprovider"
"yunion.io/x/onecloud/pkg/util/imagetools"
)
type ImageStatusType string
@@ -189,7 +190,7 @@ func (self *SImage) GetOsDist() string {
}
func (self *SImage) GetOsVersion() string {
return ""
return imagetools.NormalizeImageInfo(self.OSName, "", "", "", "").OsVersion
}
func (self *SImage) GetOsArch() string {
+2 -1
View File
@@ -25,6 +25,7 @@ import (
api "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/cloudprovider"
"yunion.io/x/onecloud/pkg/util/imagetools"
)
type TImageOwnerType string
@@ -165,7 +166,7 @@ func (self *SImage) GetOsDist() string {
}
func (self *SImage) GetOsVersion() string {
return self.OSVersion
return imagetools.NormalizeImageInfo(self.ImageSourceType, "", "", "", "").OsVersion
}
func (self *SImage) GetOsArch() string {
+2 -1
View File
@@ -27,6 +27,7 @@ import (
api "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/cloudprovider"
"yunion.io/x/onecloud/pkg/util/imagetools"
)
type ImageStatusType string
@@ -195,7 +196,7 @@ func (self *SImage) GetOsDist() string {
}
func (self *SImage) GetOsVersion() string {
return ""
return imagetools.NormalizeImageInfo(self.OsName, "", "", "", "").OsVersion
}
func (self *SImage) GetOsArch() string {
+1 -1
View File
@@ -167,7 +167,7 @@ func (image *SImage) GetOsDist() string {
}
func (image *SImage) GetOsVersion() string {
return ""
return imagetools.NormalizeImageInfo(image.Name, "", "", "", "").OsVersion
}
func (image *SImage) GetOsArch() string {