mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #3430 from ioito/hotfix/qx-public-cloud-image-version
fix: 标准镜像version
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user