Ask Your Question
0

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

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

Kh@n gravatar image

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

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

i.)/opt/stack/python-novaclient/novaclient/v1_1/servers.py

ii.)/opt/stack/python-novaclient/novaclient/base.py

edit retag flag offensive close merge delete

Comments

Which openstack version are you using?

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

1 answer

Sort by ยป oldest newest most voted
1

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

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

Comments

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 -0500 )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 -0500 )edit

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: 2014-07-12 06:01:53 -0500

Seen: 259 times

Last updated: Jul 13 '14