Spec Lite: Add description field to image¶
- project:
glance
- problem:
Currently there is not a dedicated image property to record the description of an image. In most of our customer environments, users typically upload multiple images. Because of the large number of users, it is difficult to distinguish the purpose of an image through the
namefield (possibly with duplicate names).For example: Nova and Cinder have the
descriptionfield, and thedescriptionfield allows you to record the specific purpose of the object.- solution:
Add
descriptionfield as a “common image property” to image. This way it will appear in the image schema (good for interoperability purposes) but will be stored as a user-defined image property (so will not require any database changes). You can set--propertyto adddescriptionproperties when executing the CLI.This is an exception to the Glance policy that new image properties should be prefixed with
os_. It’s not necessary for this spec for the following reasons.Under this proposal,
descriptionwill be stored as a user specified (“custom”) image property in theimage_propertiesdatabase table. Because it is not stored as a new column in theimagestable, it will not block the display of anydescriptionproperty on currently existing images.It’s to be expected that a property named
descriptionwill in fact contain some kind of description of the image it’s a property of. Thus we do not expect that there will be an inconsistency between any existingdescriptionimage properties and the description ofdescriptionthat will appear in the image schema.Using the name
descriptionis consistent with the other services (for example, Nova and Cinder) that recognize description metadata on resources.
CLI execution example:
$ openstack image create \ --property description='This is a test image file.' \ --file cirros-0.3.4-x86_64-disk.img \ --disk-format qcow2 \ --container-format bare \ test_image- alternatives:
Do nothing, given that users can already create such a property. This alternative, however, has the disadvantage that it does not provide a guideline for local practices to conform with, which in turn makes interoperability problematic.
- timeline:
Include in Stein release.
- link:
- reviewers:
Brian Rosmaita
- assignee:
Brin Zhang