Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7084310691 for ; Mon, 8 Apr 2013 08:48:25 +0000 (UTC) Received: (qmail 90088 invoked by uid 500); 8 Apr 2013 08:48:25 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 90066 invoked by uid 500); 8 Apr 2013 08:48:25 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 90040 invoked by uid 99); 8 Apr 2013 08:48:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Apr 2013 08:48:24 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mfojtik@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Apr 2013 08:48:20 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r388m0D2028187 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 8 Apr 2013 04:48:00 -0400 Received: from boosh.local (dhcp-29-236.brq.redhat.com [10.34.29.236]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r388lxpf029696; Mon, 8 Apr 2013 04:47:59 -0400 Message-ID: <5162843E.60004@redhat.com> Date: Mon, 08 Apr 2013 10:47:58 +0200 From: Michal Fojtik Reply-To: mfojtik@redhat.com Organization: Red Hat Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 MIME-Version: 1.0 To: dev@deltacloud.apache.org Subject: Re: [PATCH] CIMI: use storage volume name for cimi volume name if available, else id. DTACLOUD-535. References: <1365245707-10208-1-git-send-email-diesk@fast.au.fujitsu.com> In-Reply-To: <1365245707-10208-1-git-send-email-diesk@fast.au.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Virus-Checked: Checked by ClamAV on apache.org On 04/06/2013 12:55 PM, diesk@fast.au.fujitsu.com wrote: ACK. > From: Dies Koper > > --- > 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 Deltacloud API, CloudForms