Skip to content

Commit

Permalink
change 'Host' object's 'host' attribute to 'host_name'
Browse files Browse the repository at this point in the history
The function __repr__ of Host class which is located in hosts.py try to
access 'host' attribute, source code is "self.host",But in fact, Host object
don't has this attribute, it should be 'host_name'! We can find this attribute
from nova/api/openstack/compute/contrib/hosts.py file.

So I simply change 'self.host' to 'self.host_name'.

Change-Id: Ie76ba04da7592a596ab728fec981e9a1dbcc6a5f
Fixes: bug 1210043
  • Loading branch information
liuan committed Aug 9, 2013
1 parent 9114cbf commit 73a0e72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion novaclient/v1_1/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

class Host(base.Resource):
def __repr__(self):
return "<Host: %s>" % self.host
return "<Host: %s>" % self.host_name

def _add_details(self, info):
dico = 'resource' in info and info['resource'] or info
Expand Down

0 comments on commit 73a0e72

Please sign in to comment.