You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by mf...@redhat.com on 2012/02/29 14:57:10 UTC
[PATCH core 2/5] CIMI: Set CPU value to DC default in MachineConfiguration when DC profile use range for CPU property
From: Michal Fojtik <mf...@redhat.com>
Signed-off-by: Michal fojtik <mf...@redhat.com>
---
server/lib/cimi/model/machine_configuration.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/server/lib/cimi/model/machine_configuration.rb b/server/lib/cimi/model/machine_configuration.rb
index feab4e8..28e314f 100644
--- a/server/lib/cimi/model/machine_configuration.rb
+++ b/server/lib/cimi/model/machine_configuration.rb
@@ -55,7 +55,7 @@ class CIMI::Model::MachineConfiguration < CIMI::Model::Base
:name => profile.name,
:description => "Machine Configuration with #{profile.memory.value} #{profile.memory.unit} "+
"of memory and #{profile.cpu.value} CPU",
- :cpu => profile.cpu.value,
+ :cpu => profile.cpu.value || profile.cpu.default,
:created => Time.now.to_s, # FIXME: DC hardware_profile has no mention about created_at
:memory => { :quantity => profile.memory.value || profile.memory.default, :units => profile.memory.unit },
:disks => [ { :capacity => { :quantity => profile.storage.value || profile.storage.default, :units => profile.storage.unit } } ],
--
1.7.9.1