17 Commits

Author SHA1 Message Date
Steve Martinelli
0ef8535036 translate all command help strings
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
2016-11-17 02:33:42 +00:00
Yan Xing'an
8ca1cc6370 Add --long option and more columns to the hypervisor list command
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
2016-10-27 04:33:47 -07:00
Hironori Shiina
98bafda7e9 Display hypervisor information without uptime
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
2016-09-11 21:58:55 +09:00
Hironori Shiina
d6f99b721d Fix regular expression for uptime in hypervisor show
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
2016-09-11 21:48:23 +09:00
Dean Troyer
6357202971 Fix foundation copyrights
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
2016-06-14 09:49:28 -05:00
Dean Troyer
9e2b8e6730 osc-lib: command
Leave command.py and test_command.py as a sanity check during the
deprecation period.

Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
2016-06-13 11:00:22 -05:00
Dean Troyer
e5e29a8fef osc-lib: utils
Use osc-lib directly for utils.

Leave openstackclient.common.utils for deprecation period.

Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
2016-06-13 10:50:44 -05:00
Tang Chen
5398c96e2a Fix i18n support for help and error messages in compute
Change-Id: Id6eebcb48d1b7b49b6636524506294edbc44a83f
Partial-bug: #1574965
2016-05-24 11:03:49 +08:00
Akihiro Motoki
258c1102cc log take_action parameters in a single place
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
2016-02-02 09:58:32 +09:00
David Moreau Simard
3bfaf79732 Show which aggregate a hypervisor is member of
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
2015-07-02 10:23:22 -04:00
lin-hua-cheng
5fddec359d Add 'uptime' in 'hypervisor show'
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
2015-03-06 00:09:20 -08:00
lin-hua-cheng
09665052ac Add hypervisor docs
Change-Id: I444734925316e876afcbfdeffafea9973a837022
2015-03-05 21:42:03 -08:00
Dean Troyer
5bb6c72ef7 Normalize more help strings
Change-Id: I2b21bc904e35c1cc50da369d148e607fe3e8cf90
2014-07-24 11:22:29 -05:00
Christian Berendt
3b485de6b0 replace string format arguments with function parameters
There are files containing string format arguments inside
logging messages. Using logging function parameters should
be preferred.

Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
2014-05-20 13:49:56 +02:00
Dean Troyer
dfb0e3e3c1 Begin Python 3 compatability
* 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
2013-07-29 19:12:29 -05:00
Steve Martinelli
1a0d5ccc68 Remove api = apiName calls from each method
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
2013-07-12 11:07:33 -05:00
Josh Kearney
ebfad587b3 Added compute hypervisor support.
Change-Id: Ib8109550b06d152773394a1d15f6202b9f9b029c
2013-03-11 18:21:07 -05:00