deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 2/5] CIMI: Removed obsoleted properties, added type and state to Volume
Date Mon, 12 Nov 2012 11:34:54 GMT
From: Michal Fojtik <mfojtik@redhat.com>

* guestInterface and supportSnapshots removed
* type and state added

Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/cimi/models/volume.rb | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/server/lib/cimi/models/volume.rb b/server/lib/cimi/models/volume.rb
index 739629a..7332847 100644
--- a/server/lib/cimi/models/volume.rb
+++ b/server/lib/cimi/models/volume.rb
@@ -17,16 +17,21 @@ class CIMI::Model::Volume < CIMI::Model::Base
 
   acts_as_root_entity
 
+  text :state
+
+  href :type
+
   struct :capacity do
     scalar :quantity
     scalar :units
   end
+
   text :bootable
-  text :supports_snapshots
+
   array :snapshots do
     scalar :ref
   end
-  text :guest_interface
+
   array :meters do
     scalar :ref
   end
@@ -94,9 +99,9 @@ class CIMI::Model::Volume < CIMI::Model::Base
                 :id => context.volume_url(volume.id),
                 :capacity => { :quantity=>volume.capacity, :units=>"gibibyte"  },
#FIXME... units will vary
                 :bootable => "false", #fixme ... will vary... ec2 doesn't expose this
-                :supports_snapshots => "true", #fixme, will vary (true for ec2)
                 :snapshots => [], #fixme...
-                :guest_interface => "",
+                :type => { :href => 'http://schemas.dmtf.org/cimi/1/mapped' },
+                :state => volume.state,
                 :meters => []
             } )
   end
-- 
1.8.0


Mime
View raw message