Glance-common-image-properties

This is the full specification for blueprint: https://blueprints.launchpad.net/glance/+spec/glance-common-image-properties

= Additional common image properties =

We propose adding three properties to Glance images that identify operating system characteristics: `os_arch`, `os_distro`, `os_version`. Descriptions of each follow. For more context, see the email thread on this topic [1].

Property: os_arch
JSONSchema of proposed property in Image Schema:

{ "os_arch": {    "type": "string", "required": false, "default": null, "description": "Operating system architecture as specified in http://docs.openstack.org/developer/glance/image_properties/os_arch", } }

Example usage
"os_arch": "x86-64"

Discussion
Standardized values will aid in searching for an appropriate image. I propose that we keep a list of suggested values on a web page similar to the image statuses page [2]. This could be as loosely moderated as a wiki page or it could have some kind of clearly stated submission procedure for new os_arch values. I think usage would be self-policing, i.e., if you want your images to be found, you'd want to use the community's terms for the architecture.

See [4] for an example version of the standardized values page.

Property: os_distro
JSONSchema of proposed property in Image Schema:

{ "os_distro": {    "type": "string", "required": false, "default": null, "description": "Common name of operating system distribution as specified in http://docs.openstack.org/developer/glance/image_properties/os_distro", } }

Example usage
"os_distro": "debian"

Discussion
Standardized values will aid in searching for an appropriate image. Same idea as the `os_arch` proposal, though this would probably change much faster. The page would outline the basic rule (e.g., "Common name of the operating system distribution in all-lowercase") and provide a list of names to use. (If we want to be developer-friendly, we could have associated with each approved name a list of un-approved variants to make it easier to search for the proper value.)

See [5] for an example version of the standardized values page.

Property: os_version
JSONSchema of proposed property in Image Schema

{ "os_version": {    "type": "string", "required": false, "default": null, "description": "Operating system version as specified by the distributor", } }

Example usage
"os_version": "11.10"

Discussion
Previous discussion [3] mentioned standardizing this field, but the values are controlled by the operating system vendors. It makes sorting tricky, but this this would be a secondary sort field anyway.

= Use Cases =
 * List all available Ubuntu Linux images

GET /v2/images?os_distro=ubuntu


 * List all available 64-bit SUSE Linux images

GET /v2/images?os_distro=opensuse&os_arch=x86-64


 * List all available 64-bit CentOS 6.2 Linux images

GET /v2/images?os_distro=centos&os_arch=x86-64&os_version=6.2

= References =


 * [1] http://markmail.org/message/zjbcg2kkmpbhfrj3
 * [2] http://docs.openstack.org/developer/glance/statuses.html
 * [3] http://wiki.openstack.org/CommonImageProperties
 * [4] http://wiki.openstack.org/glance-common-image-properties-os_arch
 * [5] http://wiki.openstack.org/glance-common-image-properties-os_distro