Writing a nova sub-command that shows the number of running instances

asked 2014-07-12 06:01:53 -0600

Kh@n gravatar image

updated 2014-07-12 06:41:13 -0600

SGPJ gravatar image

I would like to know what is the difference between an instance and an image ? I want to write a nova sub-command that shows the number of running images, flavors, networks and instances. The first three, I have succeeded in accomplishing. No idea where the instance function is defined.

Cant find it in the directory "/opt/stack/python-novaclient/novaclient/v1_1/shell.py", where as all the others were basically in this directory.

Note: Had to make some changes in the following two files as well



edit retag flag offensive close merge delete


Which openstack version are you using?

SGPJ gravatar imageSGPJ ( 2014-07-12 06:41:42 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-07-13 00:41:43 -0600

koolhead17 gravatar image

Image: It is the distribution or OS which you would like to launch. So technically all your images are in Glance repository.

Instance: When you spawn a distribution out of selecting the list of available images from Glance, it becomes an instance.

So OpenStack already has commands for both.

hope it helps!!

edit flag offensive delete link more


Definition wise this is good. But you see the commands for finding all the images and flavors are defined separately. I am trying to write a sub-command that contains all the information with just one simple command. Can you please tell me the CLI command for finding the running instances, just like I can find all the images by using a nova or glance command such as glance image-list?

Kh@n gravatar imageKh@n ( 2014-07-13 06:22:29 -0600 )edit

Favor is the quantity, i.e cup unit, RAM, Disc Size you want to associate with an Image to make it an instance.

Checking official document for nova commands will be helpful.

koolhead17 gravatar imagekoolhead17 ( 2014-07-15 02:11:55 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-07-12 06:01:53 -0600

Seen: 267 times

Last updated: Jul 13 '14