When adding an image to Glance, you may specify some common image properties that may prove useful to consumers of your image.
This document explains the names of these properties and the expected values.
The common image properties are also described in a JSON schema, found in
/etc/glance/schema-image.json
in the Glance source code.
This file is the default schema. An operator can modify
/etc/schema-image.json
to include arbitrary properties.
Warning
type
of each property in this JSON schema, specified by the
type
key, must have value string
even if the property you are
adding is not a string in common sense. For example, if you want to add a
property named is_removable
and want its type to be boolean
.
However, you must give the type
key the value string
. Otherwise,
when an end-user makes a call that sets a value on one of these, they
will gets a 500. This is because everything in the image_properties table
must be a string in the database. The API, however, won’t accept a string
value when the schema says it is boolean or some other non-string JSON
data typeNote
If your need is more complicated, we recommend using metadefs instead of modifying this image schema
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.