mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-30 18:23:35 +08:00
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