| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: I9af45c062d179ab3dc2a5e969e1c467932753a2b
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
|
|
|
|
|
|
|
| |
Update usage list and usage show to use the compute component of the
OpenStack SDK instead of directly using the nova interface.
Change-Id: I1c4d2247c9c1a577ed9efad7e8332e7c9b974ad5
|
|
|
|
|
|
|
|
|
| |
Make use of 'FormattableColumn'-derived formatters, which provide better
output than what we were using before, particularly for the YAML output
format.
Change-Id: Ic770f27cb1f74222636f05350f97400808adffbf
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
since nova api 2.40 the os-simple-tenant-usage API supports pagination
and will by default return a number of entities configured internally in
Nova.
This means that when there are many enough projects,
the single call to usage.list() will not return usages for all projects.
This patch effectively copy-pastes the logic to paginate over usage list
results from novaclient/v2/shell.py code.
Change-Id: I1b639fe386b7b7db3223f6965495094b9d51533a
Story: #2005099
Task: #29713
|
|
|
|
|
|
|
|
| |
This is a followup to https://review.openstack.org/#/c/541609/ that
changes most outstanding direct uses of sys.stdout to use the encoded
stdout set up by cliff.
Change-Id: I07cfc418385fc787d3b7d3c32d39676cf81bb91f
|
|
|
|
|
|
|
| |
We usually call v3 keystoneclient APIs for V2 OSC, this patch
modified 'tenants' to 'projects'.
Change-Id: Idbf74f098cd1386aa675c081480b89bbc11c8534
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Leave command.py and test_command.py as a sanity check during the
deprecation period.
Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
|
|
|
|
|
|
|
|
| |
Use osc-lib directly for utils.
Leave openstackclient.common.utils for deprecation period.
Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
|
|
|
|
|
| |
Change-Id: Id6eebcb48d1b7b49b6636524506294edbc44a83f
Partial-bug: #1574965
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Remove the 'project usage list' command that was deprecated in version
1.0.2 in review Ie08d4f88d71a660fca1862405351109cd0aa86b6.
Note that the removed command class is a good example of how to wrap a
command and show a deprecation message.
Change-Id: I6c750730963615895f5d9953487d2d5a905885a8
|
|
|
|
|
|
|
|
|
| |
When there is no resouce usage associated with the project,
an odd output will be displayed.
This patch tried to fix this issue.
Change-Id: I6f254c6ba37fbb760ada08e640c4938668d560dc
Closes-Bug: #1512220
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than pointing the 'project usage list' entry point directly to
ListUsage, this makes a ListProjectUsage subclass to alias the desired
command and still allow for changing behaviour or issuing a deprecation
messages. This implementation simply sets a new 'deprecated' attribute
in the command class that cliff will use to skip this command when
generating help output.
The actual skipping of the command in help output is dependant on
https://review.openstack.org/147349 merging in cliff, this review will
simply have no effect on help output until a version of cliff with
that update is present.
The deprecation message printed is somewhat generic until
https://review.openstack.org/147381 is merged in cliff.
Until that is merged, the deprecation message will not have the name
of the actual command given by the user in it, but rather the text
'this command'.
Closes-bug: #1406654
Change-Id: Ie08d4f88d71a660fca1862405351109cd0aa86b6
|
|
|
|
| |
Change-Id: Iaf911d69a0b63d705f8789a4640018a428b87be6
|
|
|
|
|
|
|
|
| |
Should show basic usage by project id, if not specified then
use the project id the user is authN'ing with.
Change-Id: I0284a5efd84075b18e1a7117cc9f8f7fecf16274
Closes-Bug: #1400796
|
|
|
|
|
|
|
| |
* Added number of servers column, was missing
* Added a new line character after the initial usage message
Change-Id: I6c4e5bda6ba9ceafa92ecf13987c56d0bbe99961
|
|
|
|
|
|
|
|
| |
So we can update requriements.txt. But fix a couple of easy ones:
* Fix E251 (1 occurrance)
* Fix E131 (1 occurrance)
Change-Id: I62aaa423aa6da9e9f0ca026ec586b51cc6a6df03
|
|
|
|
|
|
|
|
| |
There are files containing string format arguments inside
logging messages. Using logging function parameters should
be preferred.
Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
|
|
|
|
|
|
|
|
|
|
| |
This fixes some errors and inconsistencies I found reviewing the
help strings:
* Capitalize help strings
* Add missing space between words (in multi-line strings)
* Improve wording
Change-Id: I2fb31ab4191c330146e31c1a9651115a6657769a
|
|
|
|
|
|
| |
I think these are the last two stragglers, including debugging lines
Change-Id: Ic3dd98480211d0f7d3cc951bec5cd54f902a101f
|
|
|
|
|
|
|
| |
Mostly options and help strings:
* image, server, project usage, volume
Change-Id: I788b0660f8c2daacde53c20a72dd1afc60cf5159
|
|
As per the blueprint: nova-client, adding usage command for
compute
Change-Id: Ib694b0b1ebf56b2a62b6f09c67ffaa6959911605
|