Comment 0 for bug 1513787

Revision history for this message
balan (balan-u) wrote :

My code is,

from novaclient.v2.client import Client as nova_client
test_client = nova_client(username="admin",
                          api_key="******",
                          auth_url="http://192.168.1.177:5000/v2.0",
                          tenant_id="a00fd46d7cec4b91a57c2f69d8c860e5")
print test_client.hosts.list()

Trace Log,

/usr/bin/python2.7 /home/balanu/projects/aws_snap/test.py
[Traceback (most recent call last):
  File "/home/balanu/projects/aws_snap/test.py", line 53, in <module>
    print test_client.hosts.list()
  File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/hosts.py", line 24, in __repr__
    return "<Host: %s>" % self.host
  File "/usr/local/lib/python2.7/dist-packages/novaclient/openstack/common/apiclient/base.py", line 480, in __getattr__
    raise AttributeError(k)
AttributeError: host