14 Commits

Author SHA1 Message Date
Jude Cross
24b06ef273 Fix limits show command without Nova and Cinder
This patch implements an endpoint lookup when showing limits. This
addresses the issue when showing limits without both Nova and Cinder
and will display limits if one is missing.

Change-Id: I2214b281e0206f8fe117aae52de2bf4c4e2c6525
Closes-bug: #1707960
2018-04-03 00:47:00 -07:00
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
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
Huanxuan Ao
b36d521ff6 Fix i18n supports in commom
I checked all the files in openstackclient/common
and fixed the missing i18n supprots.

Change-Id: Id7f76a24aae663f5832ef9bcf1bd5a6b7081af24
Partial-bug: #1574965
2016-06-07 19:56:00 +08:00
Tang Chen
3e0e1f8c41 Trivial: Fix typo in common/limits.py
Change-Id: I3040cc69512df50459960f96b862de55804068ac
2016-03-23 16:04:21 +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
Xi Yang
54b0ef3358 Use Block Storage instead of Volume
Volume is better to be replaced by Block Storage in the
doc.

Change-Id: I736669ee01c7385b6e701cb20f4334eff1c49286
2015-11-27 17:56:10 +08:00
Jenkins
0daa096939 Merge "Use a common decorator to log 'take_action' activation" 2015-09-11 02:43:54 +00:00
Joshua Harlow
e3c46ece4a Use a common decorator to log 'take_action' activation
Instead of duplicating the same log statement throughout
the code, the same logic can be provided by a shared decorator
that abstracts away the logging capability and unifies it behind
a common function instead.

Change-Id: Icc63bced7347c8bbf0299a4c5821425a10892a79
2015-09-01 16:49:54 -07:00
Major Hayden
0f0d66f3f1 Running 'limits show' returns nothing
Running limits show without --absolute or --rate returns nothing and
the user is left to figure out what they need to provide to get the
correct data back.  This patch prints an error and help output by making
at least one of the arguments required.

Change-Id: I576cf8ec0e05524ee67d46c48b56da8d44258667
2015-08-14 10:31:53 -04:00
Steve Martinelli
77e3fbae1a Add support for showing limits of a specific project
Looks like the option to show limits of a specific project was
missing. This resulted in always using the authenticated project.

Change-Id: I512a05df20860ffb52af34f3b64c9eb81dae8c61
Closes-Bug: 1438379
2015-04-03 02:26:22 -04: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
75dcdb0c66 Add show limits command
* This is a combination of the compute and volume API limits as they are
  very similar.  As such, the command lives in a new command group
  'openstack.common' that is unversioned.
* Implements 'limits show [--absolute|--rate]

Updated for https://review.openstack.org/#/c/36772/

Bug: 1172057

Change-Id: I2bd181cd0d098f7143360ae67944c2f221379af5
2013-07-12 12:13:27 -05:00