Ask Your Question

Instance metadata Report

asked 2016-06-27 15:13:58 -0600

tictoc gravatar image

trying to find a way to list the metadata in all instances running, same as --- nova show instanceid | metadata | {"compute_client"} | | name | Windows2012

is there a way through Python or?

edit retag flag offensive close merge delete


You may want to expand on the question and show users what you mean with an example of output that you are looking for. Metadata is also a service, so it can be confusing. Do you mean "I want to be able to nova show on all instances and save it to a local file/output."

mpetason gravatar imagempetason ( 2016-06-29 16:17:26 -0600 )edit

If you run the command nova show + instance id it will return all of the details on the instance .. right I want to be able to return a list of all instance + these details - mainly the metada | metadata | {} | | name

tictoc gravatar imagetictoc ( 2016-06-29 17:33:59 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-06-29 17:37:09 -0600

mpetason gravatar image

updated 2016-06-29 17:38:40 -0600

If you want to drill down further you can use the nova API:

Or with Python you could use:

Otherwise you're looping through instances to pull the ID and then looping nova show.

nova list --all-tenants|grep -i active| awk ' { print $2 } '|while read n; do nova show $n;done

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-06-27 15:13:58 -0600

Seen: 456 times

Last updated: Jun 29 '16