change 'Host' object's 'host' attribute to 'host_name'
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
This commit is contained in:
parent
9114cbfb8e
commit
73a0e7298a
@ -21,7 +21,7 @@ from novaclient import base
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user