diff --git a/pkg/apis/compute/storage_const.go b/pkg/apis/compute/storage_const.go index 1324b8e477..af0e1cd23b 100644 --- a/pkg/apis/compute/storage_const.go +++ b/pkg/apis/compute/storage_const.go @@ -68,6 +68,7 @@ const ( STORAGE_HUAWEI_SAS = "SAS" // 高IO云硬盘 STORAGE_HUAWEI_SATA = "SATA" // 普通IO云硬盘 STORAGE_HUAWEI_GPSSD = "GPSSD" // 通用型SSD + STORAGE_HUAWEI_ESSD = "ESSD" // 急速型SSD // openstack STORAGE_OPENSTACK_ISCSI = "iscsi" diff --git a/pkg/compute/guestdrivers/huawei.go b/pkg/compute/guestdrivers/huawei.go index 425a6a48ea..a99df936e4 100644 --- a/pkg/compute/guestdrivers/huawei.go +++ b/pkg/compute/guestdrivers/huawei.go @@ -64,7 +64,13 @@ func (self *SHuaweiGuestDriver) GetMinimalSysDiskSizeGb() int { } func (self *SHuaweiGuestDriver) GetStorageTypes() []string { - return []string{api.STORAGE_HUAWEI_SATA, api.STORAGE_HUAWEI_SAS, api.STORAGE_HUAWEI_SSD} + return []string{ + api.STORAGE_HUAWEI_SATA, + api.STORAGE_HUAWEI_SAS, + api.STORAGE_HUAWEI_SSD, + api.STORAGE_HUAWEI_GPSSD, + api.STORAGE_HUAWEI_ESSD, + } } func (self *SHuaweiGuestDriver) ChooseHostStorage(host *models.SHost, guest *models.SGuest, diskConfig *api.DiskConfig, storageIds []string) (*models.SStorage, error) { diff --git a/pkg/compute/hostdrivers/huawei.go b/pkg/compute/hostdrivers/huawei.go index fa44dbe032..55af8b711c 100644 --- a/pkg/compute/hostdrivers/huawei.go +++ b/pkg/compute/hostdrivers/huawei.go @@ -46,7 +46,7 @@ func (self *SHuaweiHostDriver) GetHypervisor() string { // 系统盘必须至少40G func (self *SHuaweiHostDriver) ValidateDiskSize(storage *models.SStorage, sizeGb int) error { switch storage.StorageType { - case api.STORAGE_HUAWEI_SSD, api.STORAGE_HUAWEI_SATA, api.STORAGE_HUAWEI_SAS: + case api.STORAGE_HUAWEI_SSD, api.STORAGE_HUAWEI_SATA, api.STORAGE_HUAWEI_SAS, api.STORAGE_HUAWEI_ESSD, api.STORAGE_HUAWEI_GPSSD: if sizeGb < 10 || sizeGb > 32768 { return fmt.Errorf("The %s disk size must be in the range of 10G ~ 32768GB", storage.StorageType) }