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.
Reviewed: https:/ /review. openstack. org/248300 /git.openstack. org/cgit/ openstack/ python- novaclient/ commit/ ?id=c3dda7636cb 7cf1d613c027703 b88b41144dec32
Committed: https:/
Submitter: Jenkins
Branch: master
commit c3dda7636cb7cf1 d613c027703b88b 41144dec32
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: I5c339bdd1ab867 d972759ade9a10b 86bfda1e70a