write OpenStack automation scripts using Python API

asked 2015-03-02 09:56:34 -0600

AlonFre gravatar image

updated 2015-03-02 10:57:22 -0600

Hi all,

i want to write some automation script using the Python API that described here using the python-novaclient package. i saw some example for python API scripts in this guide.

my question is, where to write this script (in devstack)? and where and how to run it? can you please also point me to appropriate guide?

the main purpose of the automation is to generate live migration at specific times and conditions, i will use this API method in order to do so:

live_migrate(server, host, block_migration, disk_over_commit)
Migrates a running instance to a new machine.
Parameters: •   server – instance id which comes from nova list.
•   host – destination host name.
•   block_migration – if True, do block_migration.
•   disk_over_commit – if True, Allow overcommit.

thanks in advance, Alon?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2015-03-02 10:52:21 -0600

smaffulli gravatar image

Devstack is written in bash, so not. I have a hard time answering your question without more details: what sort of 'automation' are you going after? Edit your question and add more details.

edit flag offensive delete link more


thanks for your prompt response, i added more details to my question. please tell me if you need more. can you please also elaborate regarding "Devstack is written in bash, so not". thanks in advance, Alon.

AlonFre gravatar imageAlonFre ( 2015-03-02 10:59:34 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2015-03-02 09:56:34 -0600

Seen: 1,298 times

Last updated: Mar 02 '15