避免级联镜像分类不一致

This commit is contained in:
ioito
2019-06-03 16:25:25 +08:00
parent 72c13b8e39
commit bfeebfdc8b
2 changed files with 12 additions and 1 deletions
+7 -1
View File
@@ -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 {