diff --git a/pkg/apis/compute/storage_const.go b/pkg/apis/compute/storage_const.go index 51135feefe..de7b8cb1f5 100644 --- a/pkg/apis/compute/storage_const.go +++ b/pkg/apis/compute/storage_const.go @@ -195,7 +195,7 @@ var ( } STORAGE_TYPES = []string{STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_SHEEPDOG, STORAGE_RBD, STORAGE_DOCKER, STORAGE_NAS, STORAGE_VSAN, STORAGE_NFS, - STORAGE_PUBLIC_CLOUD, STORAGE_CLOUD_SSD, STORAGE_CLOUD_ESSD, STORAGE_CLOUD_ESSD_PL2, STORAGE_CLOUD_ESSD_PL3, + STORAGE_PUBLIC_CLOUD, STORAGE_CLOUD_SSD, STORAGE_CLOUD_ESSD_PL0, STORAGE_CLOUD_ESSD, STORAGE_CLOUD_ESSD_PL2, STORAGE_CLOUD_ESSD_PL3, STORAGE_EPHEMERAL_SSD, STORAGE_CLOUD_EFFICIENCY, STORAGE_STANDARD_LRS, STORAGE_STANDARDSSD_LRS, STORAGE_PREMIUM_LRS, STORAGE_GP2_SSD, STORAGE_GP3_SSD, STORAGE_IO1_SSD, STORAGE_ST1_HDD, STORAGE_SC1_HDD, STORAGE_STANDARD_HDD, diff --git a/pkg/compute/hostdrivers/aliyun.go b/pkg/compute/hostdrivers/aliyun.go index aaa301b7ca..30726d00d5 100644 --- a/pkg/compute/hostdrivers/aliyun.go +++ b/pkg/compute/hostdrivers/aliyun.go @@ -54,12 +54,15 @@ func (self *SAliyunHostDriver) ValidateDiskSize(storage *models.SStorage, sizeGb case api.STORAGE_CLOUD_EFFICIENCY, api.STORAGE_CLOUD_SSD, api.STORAGE_CLOUD_ESSD: minGB = 20 maxGB = 32768 + case api.STORAGE_CLOUD_ESSD_PL0: + minGB = 1 + maxGB = 65536 case api.STORAGE_CLOUD_ESSD_PL2: minGB = 461 - maxGB = 32768 + maxGB = 65536 case api.STORAGE_CLOUD_ESSD_PL3: minGB = 1261 - maxGB = 32768 + maxGB = 65536 case api.STORAGE_PUBLIC_CLOUD: minGB = 5 maxGB = 2000 @@ -70,7 +73,8 @@ func (self *SAliyunHostDriver) ValidateDiskSize(storage *models.SStorage, sizeGb minGB = 10 maxGB = 32768 default: - return fmt.Errorf("Not support resize %s disk", storage.StorageType) + minGB = 1 + maxGB = 65536 } if sizeGb < minGB || sizeGb > maxGB { return fmt.Errorf("The %s disk size must be in the range of %dG ~ %dGB", storage.StorageType, minGB, maxGB)