deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: [PATCH core 3/5] CIMI: Added MachineImage model
Date Wed, 16 Nov 2011 11:49:00 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

marios@redhat.com wrote:

> minor comments inline (otherwise ACK):

Thanks!

> 
> On 14/11/11 17:09, mfojtik@redhat.com wrote:
>> From: Michal Fojtik <mfojtik@redhat.com> +# 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: <imageData> xs:string </imageData>
> ?

Yes, that's right. I'll add this before push. Thanks!

>> + +  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" } ]

Right, I misinterpreted the example from spec. Will fix it before commit.


>> +  "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 @@ 
>> +<MachineImage xmlns="http://www.dmtf.org/cimi"> +
>> <uri>http://cimi.example.org/machine_image/1</uri> +
>> <name>img1</name> +  <description>Machine Image One</description>
+
>> <created>2011-11-14</created> +  <property
>> name="status">BUILD</property> +  <property
>> name="locked">true</property>
> 
> properties are (for now :) ) :key="status" instead of :name
> 
> <property key="xs:string"> xs:string </property> *

I hope this is the same thing as above.

> 
>> +  <imageLocation href="nfs://cimi.example.com/images/1.img"/> +
>> <operation rel="edit"
>> href="http://cimi.example.org/machine_image/1/edit"/> +  <operation
>> rel="delete"
>> href="http://cimi.example.org/machine_image/1/delete"/> 
>> +</MachineImage>

- -- 
- --
Michal Fojtik, mfojtik@redhat.com
Deltacloud API: http://deltacloud.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOw6MsAAoJEEnFpmY+LvFRocEH/AnxwD16ksTv6DoGfYKr3Ahd
8eE5YUMCw5w1PMkiDlmQmkXqsfAQ1GFf4Uj55EFNqvhOdyCgVJG0Et1TLN7blZtW
Q3iW/DKktLLS7Us3zGlx+DT+LEaWUrYKKMn2E8mHsL9lS5mjVHI0GoGCNg/pUR3w
LCS4q1rfBsYm9M3bokAQs/SXMIUjYzW7SidIy+dUQS+D9WBpjkgiyuubRuhd98XV
D0u6Z9BWJWM2eGELSOKvBmCue+ZEepronFrshxhyIxnX1ZTHVtr/U6rJ0u2v5o64
sidzUeLZPXG3TsNFS5rprO0gl6i7tLq4HvrCc2AzA2bVGVKffGwCXGkvE2GkR3k=
=nhcC
-----END PGP SIGNATURE-----

Mime
View raw message