summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2/hypervisor.py
Commit message (Collapse)AuthorAgeFilesLines
* compute: Add missing options for 'hypervisor list'Stephen Finucane2021-01-121-7/+56
| | | | | | | Yet more pagination parameters. Change-Id: I9f0145c89ddc49c1d907e6e6e294319cf80fc6ff Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* compute: Fix 'hypervisor show -f yaml' outputStephen Finucane2021-01-061-3/+21
| | | | | | | | | | | | The 'cpu_info' field returned by the 'os-hypervisors' API is an object and should be formatted as such. However, this is complicated by the fact that the object in this field is stringified until microversion 2.28 and is only returned as an actual object on later microversions. Handle the conversion from the string for older microversions and display things correctly for all releases. Change-Id: Ide31466cbb9e89c96d6bd542fe039ab5ed1fac1f Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Replace six.iteritems() with .items()lihaijing2020-01-091-2/+1
| | | | | | | | | | | | | | | | 1. As mentioned in [1], we should avoid using six.iteritems to achieve iterators. We can use dict.items instead, as it will return iterators in PY3 as well. And dict.items/keys will more readable. 2. In py2, the performance about list should be negligible, see the link [2]. [1] https://wiki.openstack.org/wiki/Python3 [2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html Co-Authored-By: Akihiro Motoki <amotoki@gmail.com> Change-Id: I4b9edb326444264c0f6c4ad281acaac356a07e85 Implements: blueprint replace-iteritems-with-items
* Bump hacking versionStephen Finucane2019-08-271-1/+1
| | | | | | | | Pick up newer versions of this library. Thankfully no serious changes are needed. Change-Id: I69e523844529fc1c8aa0c1ce764182dbe29cfeb6 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* translate all command help strings3.4.0Steve Martinelli2016-11-171-2/+2
| | | | | | | | | | | | | | Leverage the new cliff command class attribute (_description) to get the help of a command, this allows us to mark strings for translation. We could not do this before since the help was grabbed from the docstring. This also depends on a new release of cliff and a bump to the minimum level in osc's requirements. Closes-Bug: 1636209 Depends-On: Id915f6aa7d95a0ff3dc6e2ceaac5decb3f3bf0da Change-Id: I8673080bb5625e8e3c499feaefd42dfc7121e96f
* Add --long option and more columns to the hypervisor list commandYan Xing'an2016-10-271-1/+11
| | | | | | | | | | Support --long option and more columns in output of hypervisor list command, including 'Hypervisor Type', 'Host IP', 'State', and 'vCPU Used', 'vCPUs', 'Memory MB Used', 'Memory MB' with --long option. Change-Id: I0c790c7835309dded03e230cf497168e19404537 Closes-Bug: #1637074
* Display hypervisor information without uptimeHironori Shiina2016-09-111-12/+17
| | | | | | | | | | | | | | Some virt drivers such as ironic virt driver doesn't implement a method to get host uptime. For such drivers, hypervisor show command displays no information although these drivers provides other host information. This patch fixes the command to display hypervisor information in case where a virt driver doesn't provide host uptime by ignoring a HTTPNotImplemented exception. Change-Id: I7bcca5862cd9c05aadaf6192cb80aa651cd77cad Closes-Bug: 1612065
* Fix regular expression for uptime in hypervisor showHironori Shiina2016-09-111-2/+3
| | | | | | | | | | | | Hypervisor show command has a few bugs as follows. - It doesn't trim an extra whitespace in the head of uptime information. - It doesn't display uptime information when the number of user is 1. This patch fixes the regular expression to match uptime information. Change-Id: Ic2f7fd9a9274466717084a0886f95f78e98a9007 Closes-Bug: 1611809
* Fix foundation copyrightsDean Troyer2016-06-141-1/+1
| | | | | | | | The OpenStack LLC copyrights date from before OpenStack was transferred to the foundation. These appear to be getting copy-pasted to new files so at least should reflect the correct entity. Change-Id: I02953d752cb24ead6aa4ad8bfe257a48317c9f13
* osc-lib: commandDean Troyer2016-06-131-1/+1
| | | | | | | Leave command.py and test_command.py as a sanity check during the deprecation period. Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
* osc-lib: utilsDean Troyer2016-06-131-1/+2
| | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* Fix i18n support for help and error messages in computeTang Chen2016-05-241-2/+4
| | | | | Change-Id: Id6eebcb48d1b7b49b6636524506294edbc44a83f Partial-bug: #1574965
* log take_action parameters in a single placeAkihiro Motoki2016-02-021-12/+3
| | | | | | | | | | | | Previously each command logs take_action parameters explicitly by using @utils.log_method decorator or log.debug(). Some commands have no logging. This commit calls a logger in the base class and drops all logging definition from individual commands. Closes-Bug: #1532294 Change-Id: I43cd0290a4353c68c075bade9571c940733da1be
* Show which aggregate a hypervisor is member ofDavid Moreau Simard2015-07-021-0/+23
| | | | | | | | | This adds support for showing which host aggregates a hypervisor is member of, if any. It supports hypervisors with or without nova cells. Closes-bug: #1470875 Change-Id: I0cfe4f15fa8f8ba0be3295b79cd438998893114c
* Add 'uptime' in 'hypervisor show'lin-hua-cheng2015-03-061-0/+13
| | | | | | | | | | Fetch the 'uptime' by making a call to hypervisor-uptime. Update the help for 'hypervisor show' to mention that it supports by Name or Id. Change-Id: I31060d203e87749cfc05810c2d9db42f2416051d Partial-Bug: #1423748
* Add hypervisor docslin-hua-cheng2015-03-051-7/+7
| | | | Change-Id: I444734925316e876afcbfdeffafea9973a837022
* Normalize more help stringsDean Troyer2014-07-241-5/+5
| | | | Change-Id: I2b21bc904e35c1cc50da369d148e607fe3e8cf90
* replace string format arguments with function parametersChristian Berendt2014-05-201-2/+2
| | | | | | | | There are files containing string format arguments inside logging messages. Using logging function parameters should be preferred. Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
* Begin Python 3 compatabilityDean Troyer2013-07-291-1/+2
| | | | | | | | | | | * use six.iteritems() * replace basestring with six.string_types * convert print statements to functions (they're all debugging and should be removed eventually anyway) * clean up OpenStack copyright: LLC -> Foundation Change-Id: Icb14212bcb408e63816bfec3922a697bc1a6c946
* Remove api = apiName calls from each methodSteve Martinelli2013-07-121-2/+0
| | | | | | | | | | | As discussed in https://review.openstack.org/#/c/36352/ for each command, we were setting api = identity or volume... etc, this was for an old way of calling commands that are is no longer used. Also removed openstackclient/common/command.py Change-Id: I2705f35d343f2ae729dc22d6aed0b852b2f8ca19
* Added compute hypervisor support.Josh Kearney2013-03-111-0/+84
Change-Id: Ib8109550b06d152773394a1d15f6202b9f9b029c