Ask Your Question

Revision history [back]

Simply put, 'explain' is used to explain a given schema type. You can define your own metadata using the md-[namespace|object|resource]-create commands, or just use it to look at the default schemas. Example arguments for 'model' would be something like 'metadefs/namespace', 'metadefs/resource_type', or - most simply - 'image'.

An example:

[stack@osp7 ~]$ glance --os-image-api-version=2 explain image
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| Attribute        | Description                                                                                                                                     |
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| container_format | Format of the container                                                                                                                         |
| min_ram          | Amount of ram (in MB) required to boot image.                                                                                                   |
| ramdisk_id       | ID of image stored in Glance that should be used as the ramdisk when booting an AMI-style image.                                                |
| locations        | A set of URLs to access the image file kept in external store                                                                                   |
| file             | (READ-ONLY)                                                                                                                                     |
| owner            | Owner of the image                                                                                                                              |
| id               | An identifier for the image                                                                                                                     |
| size             | Size of image file in bytes (READ-ONLY)                                                                                                         |
| os_distro        | Common name of operating system distribution as specified in http://docs.openstack.org/trunk/openstack-compute/admin/content/adding-images.html |
| self             | (READ-ONLY)                                                                                                                                     |
| disk_format      | Format of the disk                                                                                                                              |
| os_version       | Operating system version as specified by the distributor                                                                                        |
| direct_url       | URL to access the image file kept in external store (READ-ONLY)                                                                                 |
| schema           | (READ-ONLY)                                                                                                                                     |
| status           | Status of the image (READ-ONLY)                                                                                                                 |
| tags             | List of strings related to the image                                                                                                            |
| kernel_id        | ID of image stored in Glance that should be used as the kernel when booting an AMI-style image.                                                 |
| visibility       | Scope of image accessibility                                                                                                                    |
| updated_at       | Date and time of the last image modification (READ-ONLY)                                                                                        |
| min_disk         | Amount of disk space (in GB) required to boot image.                                                                                            |
| virtual_size     | Virtual size of image in bytes (READ-ONLY)                                                                                                      |
| instance_uuid    | ID of instance used to create this image.                                                                                                       |
| name             | Descriptive name for the image                                                                                                                  |
| checksum         | md5 hash of image contents. (READ-ONLY)                                                                                                         |
| created_at       | Date and time of image registration (READ-ONLY)                                                                                                 |
| protected        | If true, image will not be deletable.                                                                                                           |
| architecture     | Operating system architecture as specified in http://docs.openstack.org/trunk/openstack-compute/admin/content/adding-images.html                |
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+