Ask Your Question
0

I would like to know what the 'glance explain' command does, hopefully with a usage example.

asked 2016-09-28 18:38:15 -0500

chuck-way gravatar image

You can reference the command here. http://docs.openstack.org/cli-reference/glance.html (http://docs.openstack.org/cli-referen...).

What the command does and what the argument of <model> represents would be helpful.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-10-01 12:18:58 -0500

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                |
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-09-28 18:38:15 -0500

Seen: 155 times

Last updated: Oct 01 '16