mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
避免级联镜像分类不一致
This commit is contained in:
@@ -22,6 +22,8 @@ import (
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/util/imagetools"
|
||||
|
||||
"yunion.io/x/jsonutils"
|
||||
"yunion.io/x/log"
|
||||
"yunion.io/x/onecloud/pkg/cloudprovider"
|
||||
@@ -137,7 +139,11 @@ func (image *SImage) GetOsType() string {
|
||||
}
|
||||
|
||||
func (image *SImage) GetOsDist() string {
|
||||
return ""
|
||||
osDist := imagetools.NormalizeImageInfo(image.URL, "", "", "", "").OsDistro
|
||||
if len(osDist) > 0 {
|
||||
return osDist
|
||||
}
|
||||
return image.Platform
|
||||
}
|
||||
|
||||
func (image *SImage) GetOsVersion() string {
|
||||
|
||||
Reference in New Issue
Block a user