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 73C4ADF64 for ; Mon, 19 Nov 2012 11:14:01 +0000 (UTC) Received: (qmail 35663 invoked by uid 500); 19 Nov 2012 11:14:01 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 35524 invoked by uid 500); 19 Nov 2012 11:14:00 -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 35492 invoked by uid 99); 19 Nov 2012 11:13:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2012 11:13:58 +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 (nike.apache.org: domain of mandreou@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, 19 Nov 2012 11:13:50 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAJBDSKq023814 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 19 Nov 2012 06:13:28 -0500 Received: from [10.36.112.23] (ovpn-112-23.ams2.redhat.com [10.36.112.23]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qAJBDPo6024638; Mon, 19 Nov 2012 06:13:26 -0500 Message-ID: <50AA1454.8040202@redhat.com> Date: Mon, 19 Nov 2012 13:13:24 +0200 From: "marios@redhat.com" User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121029 Thunderbird/16.0.2 MIME-Version: 1.0 To: dev@deltacloud.apache.org CC: mfojtik@redhat.com Subject: Re: [PATCH core 1/2] CIMI: Renamed 'name' attribute to 'key' in resource properties (DTACLOUD-372) References: <1353319574-23512-1-git-send-email-mfojtik@redhat.com> In-Reply-To: <1353319574-23512-1-git-send-email-mfojtik@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Virus-Checked: Checked by ClamAV on apache.org ACK On 19/11/12 12:06, mfojtik@redhat.com wrote: > From: Michal Fojtik > > > Signed-off-by: Michal fojtik > --- > server/lib/cimi/models/schema.rb | 4 ++-- > server/tests/cimi/data/machine.xml | 2 +- > server/tests/cimi/data/machine_configuration.xml | 2 +- > server/tests/cimi/data/machine_image.xml | 4 ++-- > 4 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/server/lib/cimi/models/schema.rb b/server/lib/cimi/models/schema.rb > index 115e236..3d6a097 100644 > --- a/server/lib/cimi/models/schema.rb > +++ b/server/lib/cimi/models/schema.rb > @@ -195,7 +195,7 @@ class CIMI::Model::Schema > > def from_xml(xml, model) > model[name] = (xml[xml_name] || []).inject({}) do |result, item| > - result[item["name"]] = item["content"] > + result[item["key"]] = item["content"] > result > end > end > @@ -205,7 +205,7 @@ class CIMI::Model::Schema > end > > def to_xml(model, xml) > - ary = (model[name] || {}).map { |k, v| { "name" => k, "content" => v } } > + ary = (model[name] || {}).map { |k, v| { "key" => k, "content" => v } } > xml[xml_name] = ary unless ary.empty? > end > > diff --git a/server/tests/cimi/data/machine.xml b/server/tests/cimi/data/machine.xml > index f33c774..24239ff 100644 > --- a/server/tests/cimi/data/machine.xml > +++ b/server/tests/cimi/data/machine.xml > @@ -3,7 +3,7 @@ > machine1 > Machine one description > 2011-11-21 > - mockuser > + mockuser > 4 > 12582912 > > diff --git a/server/tests/cimi/data/machine_configuration.xml b/server/tests/cimi/data/machine_configuration.xml > index 9f451a6..cad692d 100644 > --- a/server/tests/cimi/data/machine_configuration.xml > +++ b/server/tests/cimi/data/machine_configuration.xml > @@ -3,7 +3,7 @@ > MachineConfiguration1 > Example MachineConfiguration One > 2011-11-14 > - i386 > + i386 > 2 > 1048576 > > diff --git a/server/tests/cimi/data/machine_image.xml b/server/tests/cimi/data/machine_image.xml > index 1f7b46c..e5b03cf 100644 > --- a/server/tests/cimi/data/machine_image.xml > +++ b/server/tests/cimi/data/machine_image.xml > @@ -3,8 +3,8 @@ > img1 > Machine Image One > 2011-11-14 > - BUILD > - true > + BUILD > + true > > > >