ACK minor nit/note...
not sure what to do about 'in-use' state... I mean, yes, 'providers may define additional states'. Right now, volume doesn't define anything like 'in-use' for Volume... mainly because volumes can be 'shared' so 'available' can also mean "it's already being used but is also available". Whether providers allow mapped volumed to be shared is advertised by a capability "SharedVolumeSupport" under Volume ResourceMetadata. Just something to think about... perhaps we need a mantis issue to ask for 'in-use' equivalent state "not available" for example, marios On 12/11/12 13:34, [email protected] wrote: > From: Michal Fojtik <[email protected]> > > * guestInterface and supportSnapshots removed > * type and state added > > Signed-off-by: Michal fojtik <[email protected]> > --- > 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 >
