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 C2BB3EDB8 for ; Thu, 7 Feb 2013 13:43:49 +0000 (UTC) Received: (qmail 29714 invoked by uid 500); 7 Feb 2013 13:43:49 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 29695 invoked by uid 500); 7 Feb 2013 13:43:49 -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 29678 invoked by uid 99); 7 Feb 2013 13:43:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2013 13:43:48 +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 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; Thu, 07 Feb 2013 13:43:41 +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 r17DhI83002309 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 7 Feb 2013 08:43:18 -0500 Received: from boosh.local (dhcp-29-235.brq.redhat.com [10.34.29.235]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r17DhEvs008372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 7 Feb 2013 08:43:17 -0500 Date: Thu, 7 Feb 2013 14:43:14 +0100 From: Michal Fojtik To: dev@deltacloud.apache.org Cc: Oved Ourfali Subject: Re: [PATCH] passing realm option when creating a new VM Message-ID: <20130207134314.GB3182@boosh.local> References: <1360243218-28417-1-git-send-email-oourfali@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1360243218-28417-1-git-send-email-oourfali@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Virus-Checked: Checked by ClamAV on apache.org On 02/07, Oved Ourfali wrote: ACK. One thought, we do have 'realm' defined for the Machine entity as resourceMetadata. Is this element supposed to work also for the MachineCreate entity? -- Michal > --- > server/lib/cimi/models/machine.rb | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/server/lib/cimi/models/machine.rb b/server/lib/cimi/models/machine.rb > index 6e075e8..9164847 100644 > --- a/server/lib/cimi/models/machine.rb > +++ b/server/lib/cimi/models/machine.rb > @@ -70,6 +70,7 @@ class CIMI::Model::Machine < CIMI::Model::Base > additional_params[:initial_state] = machine_template["initialState"].strip > end > additional_params[:name] = json['name'] if json['name'] > + additional_params[:realm_id] = json['realm'] if json['realm'] > instance = context.driver.create_instance(context.credentials, image_id, { > :hwp_id => hardware_profile_id > }.merge(additional_params)) > @@ -99,6 +100,7 @@ class CIMI::Model::Machine < CIMI::Model::Base > additional_params[:initial_state] = xml["machineTemplate"][0]["initialState"].first.strip > end > additional_params[:name] = xml['name'][0] if xml['name'] > + additional_params[:realm_id] = xml['realm'][0] if xml['realm'] > instance = context.driver.create_instance(context.credentials, image_id, { > :hwp_id => hardware_profile_id > }.merge(additional_params)) > -- > 1.7.11.2 > -- Michal Fojtik Deltacloud API, CloudForms