deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [1/3] git commit: CIMI - add mandatory 'format' to MachineConfiguration.disk ("unknown")
Date Mon, 12 Nov 2012 16:33:26 GMT
Updated Branches:
  refs/heads/master 798dfe9e5 -> 687ffa909


CIMI - add mandatory 'format' to MachineConfiguration.disk ("unknown")


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/687ffa90
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/687ffa90
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/687ffa90

Branch: refs/heads/master
Commit: 687ffa90931e9c8feef0e76b15f8030eb927489d
Parents: 2b46c45
Author: marios <marios@redhat.com>
Authored: Mon Nov 12 17:33:56 2012 +0200
Committer: marios <marios@redhat.com>
Committed: Mon Nov 12 17:33:56 2012 +0200

----------------------------------------------------------------------
 server/lib/cimi/models/machine_configuration.rb |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/687ffa90/server/lib/cimi/models/machine_configuration.rb
----------------------------------------------------------------------
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)


Mime
View raw message