Add two util methods for handling column name backward compatibility,
that can be used in commands of ShowOne and Lister class.
Change-Id: I1fb62219b092346ea380099811cbd082cae5bafe
Partial-Bug: #1657956
Error raise when changing a 'None' data to a new format:
"TypeError: 'NoneType' object is not iterable"
we also met that bug before in the previous patch [1]
This change is to handle the 'None' data and avoid
the error
[1] https://review.openstack.org/#/c/420420/
Change-Id: I649b4fc65ef7c19b8193b07f3bd59f00e6095f9f
Closes-bug: #1656363
Include option '--human-readable' to 'image show' command.
This option displays image size in human readable format
(such as K, M, G, T,..)
(Re-submitted as the original https://review.openstack.org/#/c/399982/ had
a parent commit not present in Gerrit, was proposed by "OpenStack
Proposal Bot")
Change-Id: I0ef74c2ec978483fe49156c88acf5c369a8fa5c2
Closes-Bug: #1640086
Co-Authored-By: Badhmapriya Boopalan <Badhmapriya.Boopalan@cognizant.com>
Some object fields are allowed to be set to None, in such cases we
shouldn't call any formatters on the field.
For example, a subnet has a field 'service_types' which could be a list
of values but is also nullable.
Change-Id: I6574bdf742c0cd24cc824f08e8ba4c40d390cbe0
Closes-Bug: #1652025
In keystone, to look up resources we just need the ID. Supplying
query arguments in a get() request to the client will result in
a list being performed. The resulting query will always come up
with no hits since it'll be trying to find the user "name" even
if an ID is given.
Change-Id: I111b2730eefec83968ee89aa4a56cb518ca9b203
Closes-Bug: #1597246
Utils_find_resource function cannot raise a no-unique-match error
when manager (eg. image) has no find() function.
It just deletes the first match.
Change-Id: I0caa9d3985ce5c01ef418f62d3ee5677886e0240
find_min_match() is used to filter a list of resources according to
the minimum value of one or more attributes. For example, to locate
a server flavor that has at least 4 VCPUs and 1GB RAM.
Also make TestUtils.get_test_items private and fix a typo or two.
Change-Id: Ie524b41ba0716d6ac94aeea9367be414724d99e6