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>]
This is the sample code to test this bug.
#!/usr/bin/env python
import os v2.client as nvclient
import novaclient.
def get_nova_ credentials( ) : 'OS_USERNAME' ] 'OS_PASSWORD' ] 'OS_AUTH_ URL'] + "/v2.0" 'OS_TENANT_ NAME']
d = {}
d['username'] = os.environ[
d['api_key'] = os.environ[
d['auth_url'] = os.environ[
d['project_id'] = os.environ[
return d
nova = nvclient. Client( **get_nova_ credentials( ))
if __name__ == "__main__":
interface_ list = instance. interface_ list()
instances = nova.servers.list()
for instance in instances:
print interface_list
And the result is like this :
[<Server: unknown-name>]