On Mon, 2010-05-17 at 15:30 +0200, Michal Fojtik wrote:
> I'm not sure if this extra checking have sense for some fields and if throwing
> exception when instance doesn't have assigned image isn't better approach.
> Or just add something like:
> 
> %image
>    - unless @instance.image_id
>      %error{:code => '404'}
>        "Instance without image / Image not found"
> 
> Also this patch will need change to client (check if element exists).

I am not sure - from the server's point of view, it's easiest to just
omit anything that's not set (as Chris' patch did). Of course, from the
client's point of view, that causes extra work, since there's now a
chance that any attribute might be missing.

I agree that we need to be a little more discriminating in what parts of
the instance details are optional, and which ones aren't. Chris: which
attributes in particular were missing for your changes ?

We also need to document what parts of the instance XML is optional, and
which parts aren't.

David


_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to