deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 1/2] CIMI: MachineConfiguration added the default value for non-static hardware_profiles
Date Tue, 21 Feb 2012 14:21:30 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/cimi/model/machine_configuration.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/lib/cimi/model/machine_configuration.rb b/server/lib/cimi/model/machine_configuration.rb
index d36ebdf..feab4e8 100644
--- a/server/lib/cimi/model/machine_configuration.rb
+++ b/server/lib/cimi/model/machine_configuration.rb
@@ -57,8 +57,8 @@ class CIMI::Model::MachineConfiguration < CIMI::Model::Base
         "of memory and #{profile.cpu.value} CPU",
       :cpu => profile.cpu.value,
       :created => Time.now.to_s,  # FIXME: DC hardware_profile has no mention about created_at
-      :memory => { :quantity => profile.memory.value, :units => profile.memory.unit
},
-      :disks => [ { :capacity => { :quantity => profile.storage.value, :units =>
profile.storage.unit } } ],
+      :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 } } ],
       :uri => context.machine_configuration_url(profile.name)
     }
     self.new(machine_hash)
-- 
1.7.9.1


Mime
View raw message