deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: [PATCH core 3/5] CIMI: Fixed format of capacity property, removed obsolete properties
Date Mon, 12 Nov 2012 15:57:58 GMT
ACK - minor nit inline before push:

On 12/11/12 13:34, mfojtik@redhat.com wrote:
> From: Michal Fojtik <mfojtik@redhat.com>
> 
> * guestInterface, supportSnapshots removed
> * capacity is now 1.0.1 compliant
> 
> Signed-off-by: Michal fojtik <mfojtik@redhat.com>
> ---
>  server/lib/cimi/models/volume_configuration.rb | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/server/lib/cimi/models/volume_configuration.rb b/server/lib/cimi/models/volume_configuration.rb
> index dd9f068..fc89c6e 100644
> --- a/server/lib/cimi/models/volume_configuration.rb
> +++ b/server/lib/cimi/models/volume_configuration.rb
> @@ -18,12 +18,9 @@ class CIMI::Model::VolumeConfiguration < CIMI::Model::Base
>    acts_as_root_entity :as => "volumeConfigs"
>  
>    text :format
> -  struct :capacity do
> -    scalar :quantity
> -    scalar :units
> -  end
> -  text :supports_snapshots
> -  text :guest_interface
> +
> +  text :capacity
> +
>    array :operations do
>      scalar :rel, :href
>    end
> @@ -50,10 +47,10 @@ class CIMI::Model::VolumeConfiguration < CIMI::Model::Base
>    def self.create(size, context)
>      self.new( {
>                  :id => context.volume_configuration_url(size),
> -                :name => size,
> -                :description => "volume configuration with #{size} GiB",
> +                :name => "volume-#{size}",
> +                :description => "Volume configuration with #{size} kilobytes",
>                  :created => Time.now.xmlschema,
> -                :capacity => {:quantity=>size, :units=>"gibibytes"},
> +                :capacity => size * 1024,


we have 'context.to_kibibyte' method defined @
./server/lib/cimi/helpers/cimi_helper.rb:34:    def to_kibibyte(value, unit)

:capacity => context.to_kibibyte(size, "MB")

marios


>                  :supports_snapshots => "true"
>                  # FIXME :guest_interface => "NFS"
>              } )
> 


Mime
View raw message