You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by di...@fast.au.fujitsu.com on 2013/04/06 12:55:07 UTC
[PATCH] CIMI: use storage volume name for cimi volume name if available, else id. DTACLOUD-535.
From: Dies Koper <di...@fast.au.fujitsu.com>
---
server/lib/cimi/service/volume.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/lib/cimi/service/volume.rb b/server/lib/cimi/service/volume.rb
index 2e38691..969da43 100644
--- a/server/lib/cimi/service/volume.rb
+++ b/server/lib/cimi/service/volume.rb
@@ -48,7 +48,7 @@ class CIMI::Service::Volume < CIMI::Service::Base
def self.from_storage_volume(volume, context)
self.new(context, :values => {
- :name => volume.id,
+ :name => volume.name || volume.id,
:created => volume.created.nil? ? nil : Time.parse(volume.created).xmlschema,
:id => context.volume_url(volume.id),
:capacity => context.to_kibibyte(volume.capacity, 'GB'),
--
1.8.0.msysgit.0
Re: [PATCH] CIMI: use storage volume name for cimi volume name if
available, else id. DTACLOUD-535.
Posted by Michal Fojtik <mf...@redhat.com>.
On 04/06/2013 12:55 PM, diesk@fast.au.fujitsu.com wrote:
ACK.
> From: Dies Koper <di...@fast.au.fujitsu.com>
>
> ---
> server/lib/cimi/service/volume.rb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/server/lib/cimi/service/volume.rb b/server/lib/cimi/service/volume.rb
> index 2e38691..969da43 100644
> --- a/server/lib/cimi/service/volume.rb
> +++ b/server/lib/cimi/service/volume.rb
> @@ -48,7 +48,7 @@ class CIMI::Service::Volume < CIMI::Service::Base
>
> def self.from_storage_volume(volume, context)
> self.new(context, :values => {
> - :name => volume.id,
> + :name => volume.name || volume.id,
> :created => volume.created.nil? ? nil : Time.parse(volume.created).xmlschema,
> :id => context.volume_url(volume.id),
> :capacity => context.to_kibibyte(volume.capacity, 'GB'),
>
--
Michal Fojtik <mf...@redhat.com>
Deltacloud API, CloudForms