deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [6/6] git commit: CIMI: Removed obsoleted properties, added type and state to Volume
Date Mon, 12 Nov 2012 19:44:02 GMT
CIMI: Removed obsoleted properties, added type and state to Volume

* guestInterface and supportSnapshots removed
* type and state added


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

Branch: refs/heads/master
Commit: 935cc011d5874df29cee599eacbed831aed9cb06
Parents: f16e4e3
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Mon Nov 12 12:12:08 2012 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Mon Nov 12 20:21:57 2012 +0100

----------------------------------------------------------------------
 server/lib/cimi/models/volume.rb |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/935cc011/server/lib/cimi/models/volume.rb
----------------------------------------------------------------------
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


Mime
View raw message