mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
fix(region): baidu storage info (#23901)
This commit is contained in:
@@ -57,6 +57,17 @@ func (self *SBaiduGuestDriver) ChooseHostStorage(host *models.SHost, guest *mode
|
||||
return chooseHostStorage(self, host, diskConfig.Backend, storageIds), nil
|
||||
}
|
||||
|
||||
func (self *SBaiduGuestDriver) GetStorageTypes() []string {
|
||||
return []string{
|
||||
api.STORAGE_BAIDU_SSD,
|
||||
api.STORAGE_BAIDU_PREMIUM_SSD,
|
||||
api.STORAGE_BAIDU_HDD,
|
||||
api.STORAGE_BAIDU_ENHANCED_SSD_PL1,
|
||||
api.STORAGE_BAIDU_ENHANCED_SSD_PL2,
|
||||
api.STORAGE_BAIDU_ENHANCED_SSD_PL3,
|
||||
}
|
||||
}
|
||||
|
||||
func (self *SBaiduGuestDriver) GetComputeQuotaKeys(scope rbacscope.TRbacScope, ownerId mcclient.IIdentityProvider, brand string) models.SComputeResourceKeys {
|
||||
keys := models.SComputeResourceKeys{}
|
||||
keys.SBaseProjectQuotaKeys = quotas.OwnerIdProjectQuotaKeys(scope, ownerId)
|
||||
@@ -81,6 +92,24 @@ func (self *SBaiduGuestDriver) GetInstanceCapability() cloudprovider.SInstanceCa
|
||||
Changeable: false,
|
||||
},
|
||||
},
|
||||
Storages: cloudprovider.Storage{
|
||||
DataDisk: []cloudprovider.StorageInfo{
|
||||
{StorageType: api.STORAGE_BAIDU_SSD, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
|
||||
{StorageType: api.STORAGE_BAIDU_PREMIUM_SSD, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
|
||||
{StorageType: api.STORAGE_BAIDU_HDD, MaxSizeGb: 32765, MinSizeGb: 5, StepSizeGb: 1, Resizable: true},
|
||||
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL1, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
|
||||
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL2, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
|
||||
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL3, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
|
||||
},
|
||||
SysDisk: []cloudprovider.StorageInfo{
|
||||
{StorageType: api.STORAGE_BAIDU_SSD, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
|
||||
{StorageType: api.STORAGE_BAIDU_PREMIUM_SSD, MaxSizeGb: 32765, MinSizeGb: 20, StepSizeGb: 1, Resizable: true},
|
||||
{StorageType: api.STORAGE_BAIDU_HDD, MaxSizeGb: 32765, MinSizeGb: 20, StepSizeGb: 1, Resizable: true},
|
||||
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL1, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
|
||||
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL2, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
|
||||
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL3, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user