From e7b978955c3a17712095964102afad558c68d2da Mon Sep 17 00:00:00 2001 From: Qiu Jian Date: Wed, 12 Dec 2018 23:34:52 +0800 Subject: [PATCH] set cmtbound for storage & cpu & memory --- pkg/compute/models/hosts.go | 2 ++ pkg/compute/models/storages.go | 1 + 2 files changed, 3 insertions(+) diff --git a/pkg/compute/models/hosts.go b/pkg/compute/models/hosts.go index 83edc18f70..03b657fcd7 100644 --- a/pkg/compute/models/hosts.go +++ b/pkg/compute/models/hosts.go @@ -1340,6 +1340,8 @@ func (manager *SHostManager) newFromCloudHost(extHost cloudprovider.ICloudHost, host.MemSize = extHost.GetMemSizeMB() host.StorageSize = extHost.GetStorageSizeMB() host.StorageType = extHost.GetStorageType() + host.CpuCmtbound = 8.0 + host.MemCmtbound = 1.0 host.ManagerId = extHost.GetManagerId() host.IsEmulated = extHost.IsEmulated() diff --git a/pkg/compute/models/storages.go b/pkg/compute/models/storages.go index 709dcda1ce..20fe17a9b8 100644 --- a/pkg/compute/models/storages.go +++ b/pkg/compute/models/storages.go @@ -746,6 +746,7 @@ func (manager *SStorageManager) newFromCloudStorage(extStorage cloudprovider.ICl storage.MediumType = extStorage.GetMediumType() storage.StorageConf = extStorage.GetStorageConf() storage.Capacity = extStorage.GetCapacityMB() + storage.Cmtbound = 1.0 storage.Enabled = extStorage.GetEnabled()