Need change host to host_name in host resources

Bug #1327005 reported by tinytmy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
python-novaclient
Fix Released
Low
melanie witt

Bug Description

step to reproduce:
In python Terminal ,
>>> from novaclient.v1_1 import client
>>> ct = client.Client("admin","password","admin","http://192.168.1.100:5000/v2.0")
>>> ct.hosts.get("hostname")

error:
File "<stdin>", line 1, in <module>
  File "/opt/stack/python-novaclient/novaclient/v1_1/hosts.py", line 24, in __repr__
    return "<Host: %s>" % self.host_name
  File "/opt/stack/python-novaclient/novaclient/openstack/common/apiclient/base.py", line 464, in __getattr__
    raise AttributeError(k)
AttributeError: host_name

Tags: api
tinytmy (tangmeiyan77)
Changed in nova:
assignee: nobody → tinytmy (tangmeiyan77)
Tracy Jones (tjones-i)
tags: added: api
Revision history for this message
Christopher Yeoh (cyeoh-0) wrote :

This is a python-novaclient bug, not a nova bug

Changed in nova:
status: New → Invalid
Revision history for this message
tinytmy (tangmeiyan77) wrote :

In the nova code,
https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/hosts.py?100#L100
there used host_name,
I think this need to unify, if we change the host to host_name, it also solve this problem. Maybe we can change the python-novaclient to solve this problem, but i think change this bug in nova is much better.

tinytmy (tangmeiyan77)
Changed in nova:
status: Invalid → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/103806

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/110087

Changed in python-novaclient:
assignee: nobody → melanie witt (melwitt)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/110087
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=9ce03a98eb78652fd3480cb0d8323520fd78064c
Submitter: Jenkins
Branch: master

commit 9ce03a98eb78652fd3480cb0d8323520fd78064c
Author: melanie witt <email address hidden>
Date: Mon Jul 28 18:54:01 2014 +0000

    fix host resource repr to use 'host' attribute

    This change fixes an AttributeError raised when attempting to
    represent a host resource as a string.

    Change-Id: I33369b20ed7f5219c3b507107b8f3a37b46eacee
    Closes-Bug: #1327005

Changed in python-novaclient:
status: In Progress → Fix Committed
Michael Still (mikal)
Changed in python-novaclient:
importance: Undecided → Low
Michael Still (mikal)
Changed in python-novaclient:
milestone: none → 2.19.0
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Sean Dague (<email address hidden>) on branch: master
Review: https://review.openstack.org/103806
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Removing "In Progress" status and assignee as change is abandoned.

Changed in nova:
status: In Progress → Confirmed
assignee: tinytmy (tangmeiyan77) → nobody
Revision history for this message
jichenjc (jichenjc) wrote :

per comment #1, mark this invalid

Changed in nova:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.