[openstack-dev] [api] Optional Properties in an Entity

Morgan Fainberg morgan.fainberg at gmail.com
Tue Feb 10 01:52:44 UTC 2015


On February 9, 2015 at 1:25:58 PM, Jay Pipes (jaypipes at gmail.com) wrote:
On 01/20/2015 10:54 AM, Brian Rosmaita wrote: 
> From: Kevin L. Mitchell [kevin.mitchell at rackspace.com] 
> Sent: Monday, January 19, 2015 4:54 PM 
> 
>> When we look at consistency, we look at everything else in OpenStack. 
>> From the standpoint of the nova API (with which I am the most familiar), 
>> I am not aware of any property that is ever omitted from any payload 
>> without versioning coming in to the picture, even if its value is null. 
>> Thus, I would argue that we should encourage the first situation, where 
>> all properties are included, even if their value is null. 
> 
> That is not the case for the Images API v2: 
> 
> "An image is always guaranteed to have the following attributes: id, 
> status, visibility, protected, tags, created_at, file and self. The other 
> attributes defined in the image schema below are guaranteed to 
> be defined, but is only returned with an image entity if they have 
> been explicitly set." [1] 

This was a mistake, IMHO. Having entirely extensible schemas means that 
there is little guaranteed consistency across implementations of the API. 

This is the same reason that I think API extensions are an abomination. 


This right here! +1. +more than +1 if I get more votes on this.

Best, 
-jay 

__________________________________________________________________________ 
OpenStack Development Mailing List (not for usage questions) 
Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe 
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150209/af94eb50/attachment.html>


More information about the OpenStack-dev mailing list