mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
fix(region): set sku maxmem size 1024G
Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
This commit is contained in:
@@ -313,12 +313,12 @@ func (self *SServerSkuManager) ValidateCreateData(ctx context.Context, userCred
|
||||
region, _ = zone.GetRegion()
|
||||
}
|
||||
|
||||
if input.CpuCoreCount < 1 || input.CpuCoreCount > 256 {
|
||||
return input, httperrors.NewOutOfRangeError("cpu_core_count should be range of 1~256")
|
||||
if input.CpuCoreCount < 1 || input.CpuCoreCount > options.Options.SkuMaxCpuCount {
|
||||
return input, httperrors.NewOutOfRangeError("cpu_core_count should be range of 1~%d", options.Options.SkuMaxCpuCount)
|
||||
}
|
||||
|
||||
if input.MemorySizeMB < 512 || input.MemorySizeMB > 1024*512 {
|
||||
return input, httperrors.NewOutOfRangeError("memory_size_mb, shoud be range of 512~%d", 1024*512)
|
||||
if input.MemorySizeMB < 512 || input.MemorySizeMB > 1024*options.Options.SkuMaxMemSize {
|
||||
return input, httperrors.NewOutOfRangeError("memory_size_mb, shoud be range of 512~%d", 1024*options.Options.SkuMaxMemSize)
|
||||
}
|
||||
|
||||
if len(input.InstanceTypeCategory) == 0 {
|
||||
|
||||
@@ -204,6 +204,9 @@ type ComputeOptions struct {
|
||||
LocalDataDiskMinSizeGB int `help:"Data disk min size when using local storage" default:"10"`
|
||||
LocalDataDiskMaxSizeGB int `help:"Data disk max size when using local storage" default:"40960"`
|
||||
|
||||
SkuMaxMemSize int64 `help:"Sku max memory size GB" default:"1024"`
|
||||
SkuMaxCpuCount int64 `help:"Sku max cpu count" default:"256"`
|
||||
|
||||
esxi.EsxiOptions
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user