[openstack-dev] [Neutron] Intra-column wrapping in python-neutronclient

Akihiro Motoki amotoki at gmail.com
Wed Feb 24 17:46:13 UTC 2016


cliff-based client including neutronclient and openstackclient
supports various formatters.
I don't think it is a good idea to depend on the output of 'table' formatter.
My understanding is 'table' formatter (the default formatter) is for
human readability.
IMHO it is better to use json formatter or value formatter if we need
to pick up a returned value.
You can use '-f json' or '-f value -c id' with xxxx-create.

This is the reason I proposed fixes around non-table formatters like
https://review.openstack.org/#/c/255696/ or
https://review.openstack.org/#/c/284088/.

Anyway, it is bad to break devstack :(

2016-02-25 2:32 GMT+09:00 Carl Baldwin <carl at ecbaldwin.net>:
> I ran this by our all-knowing PTL who told me to go back to
> cliff==1.15.0.  My devstack had picked up cliff==2.0.0 which is what
> seems to have introduced this behavior.  Reverting to the older
> version fixed this quirky behavior.
>
> Before today, I didn't even know what cliff was.  :)
>
> Carl
>
> On Wed, Feb 24, 2016 at 10:23 AM, Carl Baldwin <carl at ecbaldwin.net> wrote:
>> Hi,
>>
>> I've noticed a new behavior from the python-neutronclient which
>> disturbs me.  For me, this just started happening with my latest build
>> of devstack which I built yesterday.  It didn't happen with another
>> recent but little bit older devstack.
>>
>> The issue is that the client is now wrapping content within columns.
>> For example:
>>
>>   +---------------------------------+---------+----------------------------------+
>>   | id                              | name    | subnets
>>           |
>>   +---------------------------------+---------+----------------------------------+
>>   | eb850219-6a42-42ed-ac6a-        | public  |
>> 099745e5-4925-4572-a88f-         |
>>   | 927b03a0dc77                    |         | a5376206c892
>> 172.24.4.0/24       |
>>   |                                 |         | 5b6dfb0d-c97e-48ae-
>>           |
>>   |                                 |         | 98c9-7fe3e1e8e88b
>> 2001:db8::/64  |
>>   | ec73110f-                       | private | 4073b9e7-a58e-4d6e-
>>           |
>>   | 86ad-4292-9547-7c2789a7023b     |         | a2e4-7a45ae899671
>> 10.0.0.0/24    |
>>   |                                 |         |
>> f12aee80-fc13-4adf-a0eb-         |
>>   |                                 |         | 706af4319094
>> fd9d:e27:3eab::/64  |
>>   +---------------------------------+---------+----------------------------------+
>>
>> Notice how the ids in the first column are wrapped within the column.
>> I personally don't see this as an aesthetic improvement.  It destroys
>> by ability to cut and paste the data within this column.  When I
>> stretch my console out to fix it, I have to rerun the command with the
>> new window width to fix it.  I used to be able to stretch my console
>> horizontally and the wrapped would automatically go away.
>>
>> How can I turned this off now?  Also, can I request that this new
>> "feature" be disabled by default?
>>
>> Carl
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list