Comment 6 for bug 1434167

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

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

commit c3dda7636cb7cf1d613c027703b88b41144dec32
Author: melanie witt <email address hidden>
Date: Sat Nov 21 00:15:21 2015 +0000

    Fix repr of a host from a hosts.list()

    The os-hosts API uses different attribute names depending on
    whether the host was returned as part of a list or not.
    A host returned from 'show host' has the attribute "host"
    whereas a host returned from 'list hosts' has the attribute
    "host_name".

    This adds a host_name property to the Host class that will set the
    "host" attribute if necessary. Although this doesn't exactly mirror
    the responses coming back from nova api, it will make it easier for
    users to use the objects interchangeably for hosts.list() operations
    and hosts.update() operations, for example.

    Co-Authored-By: Chung Chih, Hung <email address hidden>

    Closes-Bug: #1434167

    Change-Id: I5c339bdd1ab867d972759ade9a10b86bfda1e70a