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

Brian Rosmaita brian.rosmaita at RACKSPACE.COM
Tue Jan 20 15:54:53 UTC 2015

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]

[1] http://docs.openstack.org/api/openstack-image-service/2.0/content/image-entities.html

More information about the OpenStack-dev mailing list