How to use cmd glance md-object-create
- Last updated by:
- Nikhil Komawar on on 2016-05-14
Author of this content is Travis Tripp ( https:/
It is possible that you hit a bug which has been fixed, but may not be released yet: https:/
Besides that, the Glance API docs for metadefs contain many excellent examples:
For example, click on POST --> Detail and you'll see several examples. The example provided in the link for POST namespace can be easily expanded with other optional data(properties, etc).
There are many concrete complete namespace examples using any json file in
Right now much of the content out of the box is OpenStack specific content. However, it definitely is intended for the broad usage that you mentioned so that you can create your own content specific to you cloud. For example, you may create some custom metadata definitions that you use to help manage associations between host aggregates, flavors, and images (when used with the host aggregates filter).
Have you had a chance to read this, yet? If not, I think it’ll answer a lot of questions.
My typical workflow is to basically create a json namespace file. In the file put in properties using simple json schema syntax (no nested properties). Then upload via CLI or horizon.
If you are on the glance host, you can also use the upgrade commands in glance-manage in conjunction with the json:
- glance-manage db load_metadefs [path] [merge] [prefer_new]
Please note that glance-manage expects to connect directly into the DB and is typically used at deployment time.
Otherwise, you can use the CLI or direclty use the API. As FYI, here is the API overview:
Here are a number of links to different APIs: