[Openstack] Using Python SDK to retrieve cloud topology
Tobias Urdin
tobias.urdin at crystone.com
Tue Jun 7 14:43:46 UTC 2016
Hello Jean-Pierre,
Yes you can.
You can gather or control all parts of OpenStack using the REST API:s
Best regards
#!/usr/bin/env python
from novaclient import client
nova = client.Client(2, "adminuser", "passwordhere", "adminproject", "http://controller:35357/v2.0"<http://controller:35357/v2.0>)
print "Hypervisors:"
print nova.hypervisors.list()
print "Aggregates:"
print nova.aggregates.list()
print "Availability zones:"
print nova.availability_zones.list()
On 06/07/2016 04:16 PM, Jean-Pierre Ribeauville wrote:
Hi,
By using OpenStack Python SDK, is it possible to retrieve such things as hypervisors , aggregate and availability zones list?
Thx for help.
Regards,
Jean-Pierre RIBEAUVILLE
+33 1 4717 2049
[axway_logo_tagline_87px]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20160607/fa5f3e48/attachment.html>
More information about the Openstack
mailing list