cinder list used to print None when volume was created without name.
Now it prints '-' dash when display_name is None
Closes-Bug: #1422244
Change-Id: I195ccc37fe96dbb54a0460527fabf55146170bc7
The cinder client supports invoking the volumes REST API with the
sort_dir and sort_key parameters. However, the client output table
is always sorted by ID even though the REST API is returning in
sorted order based on the sort key/direction provided.
For example, the command below supplies the 'size' sort key but the
output table is still sorted by ID:
cinder list --sort_key size --sort_dir desc
This fix contains:
* Updates to the print_list utility to prevent any re-ordering so
that the current object order is maintained
* Updates to the shell to disable re-ordering if the user supplies
sort parameters
Change-Id: I4cc111a8bdd2b89158dfc4bb0d16fa6dbf36cc57
Closes-Bug: 1402846
Some tests used incorrect order assertEqual(observed, expected).
The correct order expected by testtools is...
def assertEqual(self, expected, observed, message=''):
"""Assert that 'expected' is equal to 'observed'.
:param expected: The expected value.
:param observed: The observed value.
:param message: An optional message to include in the error.
"""
The string length of the sum of the results of repr(expected) and
repr(observed) is greater than 70, then, MismatchError message is
changed, as below.
Ex.:
raise mismatch_error
MismatchError: !=:
reference = '_123456789_123456789_bar'
actual = '_123456789_123456789_123456789_123456789_123456789'
Change-Id: Id02ddfb2ca03df7f432cff67a7bed182cccc4924
Closes-Bug: #1259292
Currently, due to the way that resources are being retrieved by the
findall() function, an administrator can do a list, snapshot-list, etc.
with the --all_tenants option and see other tenants' resources. If the
admin then tries to delete the another tenants' resource by name, it fails
with a 'No <resource> with a name or ID of <name> exists.' error.
The solution to this is to change the call to the list() function in
findall() to set the all_tenants search option to 1. This causes the
admin to get a list of all the resources that they have access to back
when the search is done instead of just a list of their resources. The
delete by name is then possible. The server takes care of ensuring that
only resources that the user has access to are returned.
This will enable delete by name for all resources that use the find_resource
function.
Closes-bug: 1241682
Change-Id: I4e9957b66c11b7e1081f066d189cedc5a3cb2a6c
These exceptions can be used in novaclient, keystoneclient,
glanceclient, and other client projects.
Partially implements: blueprint common-client-library
Change-Id: I43918316622b1c1d722872fe30199db6a3a7bb76
Python3 reorganized the standard library and moved several functions
to different modules. Six provides a consistent interface
to them through the fake six.moves module.
However, the urlparse, urllib2, etc modules have been combined
into one module which Six does not support so do it the old
fashioned way.
Change-Id: Ieb7cc7ee2a4a97807873cfe2fc3fa0a5cf3c3980
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Instead of globally ignoring Pyflakes and Hacking
warnings, only blacklist those that occur frequently
and fix the others. Start gating on those checks.
Change-Id: Ice032c16d445ef08ef018bcdc5c221ab3c323755
tests/__init__.py implies a package in the global namespace called
tests. That's not what these are - they're tests in the cinderclient
namespace.
Change-Id: I29c95bcd8747c3f5f21d5d900879c9b6b1c9a963