You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by ma...@redhat.com on 2012/11/12 16:36:09 UTC
[PATCH 3/3] CIMI - add mandatory 'format' to MachineConfiguration.disk ("unknown")
From: marios <ma...@redhat.com>
Signed-off-by: marios <ma...@redhat.com>
---
server/lib/cimi/models/machine_configuration.rb | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/server/lib/cimi/models/machine_configuration.rb b/server/lib/cimi/models/machine_configuration.rb
index 2ee4c5a..a3aab8c 100644
--- a/server/lib/cimi/models/machine_configuration.rb
+++ b/server/lib/cimi/models/machine_configuration.rb
@@ -42,7 +42,6 @@ class CIMI::Model::MachineConfiguration < CIMI::Model::Base
end
private
-
def self.from_hardware_profile(profile, context)
# We accept just profiles with all properties set
return unless profile.memory or profile.cpu or profile.storage
@@ -56,7 +55,7 @@ class CIMI::Model::MachineConfiguration < CIMI::Model::Base
:cpu => ( cpu if cpu ) ,
:created => Time.now.xmlschema, # FIXME: DC hardware_profile has no mention about created_at
:memory => (memory if memory),
- :disks => ( [ { :capacity => storage } ] if storage ),
+ :disks => ( [ { :capacity => storage, :format => (profile.storage.respond_to?(:format) ? profile.storage.format : "unknown") } ] if storage ), #no format attr for hwp - may be added if providers support...,
:id => context.machine_configuration_url(profile.name)
}
self.new(machine_hash)
--
1.7.11.7