← Back to team overview

openstack team mailing list archive

Python API: Getting a list of floating ips?

 

Using the Python API, what's the best of getting a list of floating
ips assigned to an instance?  The Server.addresses dictionary contains
*both* fixed and floating ips, and doesn't appear to differentiate
between them.  E.g:

    srvr = client.servers.find(name='myinstance')
    print srvr.addresses
    {u'fixed_0': [{u'addr': u'172.16.10.31', u'version': 4},
                  {u'addr': u'10.243.28.46', u'version': 4}]}

Do I just assume that the first address in the list is the fixed
address?

-- 
Lars Kellogg-Stedman <lars@xxxxxxxxxxxxxxxx>  |
Senior Technologist                           | http://ac.seas.harvard.edu/
Academic Computing                            | http://code.seas.harvard.edu/
Harvard School of Engineering                 |
  and Applied Sciences                        |



Follow ups