← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1415700] Re: Unite the host key(host, host_name)

 

Nova team has decided the corresponding patch is not necessary, so we
don't need to fix this also on Tempest side because of non-activity in
long-term also.

** Changed in: tempest
       Status: Incomplete => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1415700

Title:
  Unite the host key(host, host_name)

Status in OpenStack Compute (nova):
  Confirmed
Status in tempest:
  Invalid

Bug description:
  It used host_name key in
  https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/hosts.py#L40
  used host key in
  https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/hosts.py#L266-L267
  Why not unite the key.

  And this lead to novaclient bug such as:
  >>> from novaclient.v1_1 import client
  >>> nc = client.Client("admin","password","admin","http://192.168.1.100:5000/v2.0";)
  >>> nc.hosts.get("controller")
  [<Host: controller>, <Host: controller>, <Host: controller>, <Host: controller>]

  >>> nc.hosts.list()
  [Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/hosts.py", line 24, in __repr__
      return "<Host: %s>" % self.host
    File "/usr/lib/python2.7/dist-packages/novaclient/openstack/common/apiclient/base.py", line 489, in __getattr__
      raise AttributeError(k)
  AttributeError: host

  -----------------------------------
  Maybe some people think it is the novaclient bug.
  In this patch https://review.openstack.org/#/c/110087/,
  it fix the hosts.get(), but lead to hosts.list() cann't work.
  Maybe we can add some judge such as(if .eg) in the function of
  https://github.com/openstack/python-novaclient/blob/master/novaclient/v1_1/hosts.py#L24,
  but I think unite the key to 'host' in nova is much better, if such we don't need to change novaclient and nova code looks better.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1415700/+subscriptions


References