Return-Path: X-Original-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 91FEF9F78 for ; Wed, 16 Nov 2011 11:22:30 +0000 (UTC) Received: (qmail 56070 invoked by uid 500); 16 Nov 2011 11:22:30 -0000 Delivered-To: apmail-incubator-deltacloud-dev-archive@incubator.apache.org Received: (qmail 56048 invoked by uid 500); 16 Nov 2011 11:22:30 -0000 Mailing-List: contact deltacloud-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltacloud-dev@incubator.apache.org Delivered-To: mailing list deltacloud-dev@incubator.apache.org Received: (qmail 56040 invoked by uid 99); 16 Nov 2011 11:22:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Nov 2011 11:22:30 +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; Wed, 16 Nov 2011 11:22:23 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pAGBM2CX019074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 16 Nov 2011 06:22:02 -0500 Received: from [10.36.112.17] (ovpn-112-17.ams2.redhat.com [10.36.112.17]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pAGBM0iX005998 for ; Wed, 16 Nov 2011 06:22:01 -0500 Message-ID: <4EC39CD7.8000601@redhat.com> Date: Wed, 16 Nov 2011 13:21:59 +0200 From: "marios@redhat.com" User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0) Gecko/20110927 Thunderbird/7.0 MIME-Version: 1.0 To: deltacloud-dev@incubator.apache.org Subject: Re: [PATCH core 3/5] CIMI: Added MachineImage model References: <1321283371-2298-1-git-send-email-mfojtik@redhat.com> <1321283371-2298-4-git-send-email-mfojtik@redhat.com> In-Reply-To: <1321283371-2298-4-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.23 X-Virus-Checked: Checked by ClamAV on apache.org minor comments inline (otherwise ACK): On 14/11/11 17:09, mfojtik@redhat.com wrote: > From: Michal Fojtik > +# Unless required by applicable law or agreed to in writing, software > +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT > +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the > +# License for the specific language governing permissions and limitations > +# under the License. > + > +class CIMI::Model::MachineImage < CIMI::Model::Base > + > + scalar :image_location could also have :image_data instead of :image_location (either-or, but not both)... :image_data is a byte array, but represented as string in json and xml, so scalar? JSON: "imageData": string, ? XML: xs:string ? > + > + array :operations do > + scalar :rel, :href > + end > +end > diff --git a/server/spec/cimi/data/machine_image.json b/server/spec/cimi/data/machine_image.json > new file mode 100644 > index 0000000..e037144 > --- /dev/null > +++ b/server/spec/cimi/data/machine_image.json > @@ -0,0 +1,13 @@ > +{ > + "uri": "http://cimi.example.org/machine_images/1", > + "name": "My First image", > + "description": "A image for testing", > + "created": "2011-11-14", > + "imageLocation": { "href": "nfs://cimi.example.com/images/1.img"} > + "properties": [ {"name": "status", "value": "build"}, { "name": "locked", "value": "true" } ] I think this is gonna be more like + "properties": [ {"status": "build", "locked": "true" } ] > + "operations": [ > + { "rel": "edit", > + "href": "http://cimi.example.org/machine_images/1/edit" }, > + { "rel": "delete", > + "href": "http://cimi.example.org/machine_images/1/delete" }] > +} > diff --git a/server/spec/cimi/data/machine_image.xml b/server/spec/cimi/data/machine_image.xml > new file mode 100644 > index 0000000..a02bc36 > --- /dev/null > +++ b/server/spec/cimi/data/machine_image.xml > @@ -0,0 +1,11 @@ > + > + http://cimi.example.org/machine_image/1 > + img1 > + Machine Image One > + 2011-11-14 > + BUILD > + true properties are (for now :) ) :key="status" instead of :name xs:string * > + > + > + > +