避免级联镜像分类不一致

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

View File

@@ -24,6 +24,7 @@ import (
api "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/cloudprovider"
"yunion.io/x/onecloud/pkg/util/imagetools"
)
const (
@@ -167,6 +168,10 @@ func (image *SImage) GetOsType() string {
}
func (image *SImage) GetOsDist() string {
osDist := imagetools.NormalizeImageInfo(image.Name, "", "", "", "").OsDistro
if len(osDist) > 0 {
return osDist
}
return "Linux"
}