Comment 4 for bug 1631881

Revision history for this message
int32bit (int32bit) wrote :

It seems all right on my environment, I ran this as follows:

[root@int32bit-centos ~(keystone_admin)]# cat test.py
import os
import time

from novaclient import client

def get_nova_creds():
    d = {}
    d['username'] = os.environ['OS_USERNAME']
    d['api_key'] = os.environ['OS_PASSWORD']
    d['auth_url'] = os.environ['OS_AUTH_URL']
    d['project_id'] = os.environ['OS_TENANT_NAME']
    print d
    return d

def main():
    creds = get_nova_creds()
    nova = client.Client(version=2,**creds)
    footest = nova.servers.get('d61af42c-d3b3-488a-98e2-2dc283b7c56b')
    print footest.interface_list()

if __name__ == '__main__':
    main()
[root@int32bit-centos ~(keystone_admin)]# python test.py
{'username': 'admin', 'project_id': 'admin', 'api_key': '8b9dada240e4476e', 'auth_url': 'http://192.168.0.4:5000/v2.0'}
[<NetworkInterface: b9512ecc-0981-42ea-b2eb-d6a34089f9cf>]

It seems work fine.