I spin-up openstack instances using noveclient python api
server = nova.servers.create(name ="xxx",password="xxx",image="xxx",flavor= flavor.id ,key_name = "adikarikey",nics = [{'net-id': 'xxx','v4-fixed-ip': ''}])
I want to get the IP address of the created instance. How can I do it ?
Here is one way to do it, not sure if it is the most efficient, but this works for me on Rackspace cloud servers. Note that because spinning up a server is an asynchronous task it is necessary to wait for the server to be operational before extracting the IP address.
This example is part of an article I wrote on the
nova
APIs, as supported by Rackspace. The full article is here.