[openstack-dev] [Cinder] Display NoneType fields correctly in python-cinderclient output
shrirang.phadke at izeltech.com
Fri Dec 20 10:33:20 UTC 2013
I am fixing a Bug #1261713: Volume type 'None' gives indistinguishable CLI
Currently if any value in cinder-api response is a NoneType (i.e. NULL)
then python-cinderclient shows an entry as None in the output. This is
because of JSON parsing null to NoneType.
Please check the following cinder list output:
In the given output JSON correctly shows "volume_type" as null, but while
using python-cinderclient it converts JSON null to python NoneType which is
sometimes confusing as mentioned in the bug above.
So instead we should show the null entries as either hyphen( - ) or just a
space ( ) in the output of python-cinderclient.
Expected output of python-cinderclient in case of NoneType values for Name
and Volume_Type would be as follows:
The information contained in this e-mail and any attachment(s) to this
message are intended for the exclusive use of the addressee(s) and may
contain proprietary, confidential or privileged information of Izel
Technologies Pvt. Ltd. If you are not the intended recipient, you are
notified that any review, use, any form of reproduction, dissemination,
copying, disclosure, modification, distribution and/or publication of this
e-mail message, contents or its attachment(s) is strictly prohibited and
you are requested to notify us the same immediately by e-mail and delete
this mail immediately. Izel Technologies Pvt. Ltd accepts no liability for
virus infected e-mail or errors or omissions or consequences which may
arise as a result of this e-mail transmission.
*****End of Disclaimer*****
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev