Comment 4 for bug 1471041

Revision history for this message
Jonghan (forhim-park) wrote :

This is the sample code to test this bug.

#!/usr/bin/env python

import os
import novaclient.v2.client as nvclient

def get_nova_credentials() :
    d = {}
    d['username'] = os.environ['OS_USERNAME']
    d['api_key'] = os.environ['OS_PASSWORD']
    d['auth_url'] = os.environ['OS_AUTH_URL'] + "/v2.0"
    d['project_id'] = os.environ['OS_TENANT_NAME']
    return d

nova = nvclient.Client(**get_nova_credentials())

if __name__ == "__main__":
    instances = nova.servers.list()
    for instance in instances:
        interface_list = instance.interface_list()
        print interface_list

And the result is like this :
[<Server: unknown-name>]