Ask Your Question

python nova api uuid

asked 2013-11-09 10:57:43 -0500

jcpowermac gravatar image

updated 2013-11-09 10:58:23 -0500

I am new to python and openstack. I looked in the API documentation and I can't seem to find it. How do I get the uuid of an instance? Thanks Joe

 import libvirt
    import sys
    import prettytable
    import novaclient
    import ovs
    from novaclient.v1_1 import client
    from novaclient import exceptions as novaexceptions

    username = "admin"
    password = ""
    tenant = "admin"
    authurl = ""

    osconn = client.Client(username, password, tenant, authurl, service_type="compute")
    if osconn is None:
        print 'failed to open connection to open stack'

    servers = osconn.servers.list(detailed=True)

    for srv in servers:
            print srv
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-11-09 12:06:45 -0500

serverascode gravatar image

updated 2013-11-09 12:07:04 -0500

Should be in your example.

edit flag offensive delete link more


Thanks. I just looked into the again. I assume that the line 83, show function/method is the place I should be looking.

jcpowermac gravatar imagejcpowermac ( 2013-11-11 07:11:17 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-11-09 10:57:43 -0500

Seen: 536 times

Last updated: Nov 09 '13