How to call openstack-api from server to perform migration of VM from one host to another ?
I am using CentOS 7 and have installed openstack using packstack answer-file. My openstack configuration has one controller node and two compute nodes.
I want to put a code which will see Nagios data and when cpu is less than 20%, migrate the vm to another host and shutdown the kvm host.
I want to put this code outside openstack such that i am able to run it from the server and call openstack api's to perform operations. Can someone suggest how this can be done ?