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

2016-02-25 Thread Carl Baldwin
On Wed, Feb 24, 2016 at 2:58 PM, Steve Baker  wrote:
> My intention was that it be a usability improvement rather than merely an
> aesthetic one. Yes, it is unfortunate that it affects this specific copy
> paste scenario but there are others where it is improved. I've often been in
> the situation where I don't know which uuid to copy because of the amount of
> overlap of unrelated columns.

So, this helps you figure out which which uuid to copy but how do you
copy it when you've found it?  Do you do more than one copy/paste for
each?

>> How can I turned this off now?  Also, can I request that this new
>> "feature" be disabled by default?
>>
> Table resizing only occurs when a tty is present. This means that any
> existing script which parses table output will not be affected. It also
> means that you can disable it by piping your command to cat.

I'd be okay encouraging scripts to use the more script-friendly output
formats as mentioned by Akihiro.  But, I'm not talking about scripts
here.  I'm talking about human interaction.  Copy/paste is a human
interaction.  In my opinion, this change has not improved the
situation.

> If you're unwilling to adapt, or specify formatting options, or pipe to cat,
> then I would recommend that you submit a change to cliff to read a user set
> environment variable to switch off table resizing.

If I am unwilling to adapt, how would that help me?  It requires
adaptation, right?  ;)  In all seriousness, this thread is not about
anyone's willingness to adapt.  It is about whether this is the right
thing to do.  If it is then I'm happy to adapt.  But, I continue to
argue that it isn't the right thing to do.

Carl

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


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

2016-02-25 Thread Brian Haley

On 2/24/16 3:58 PM, Steve Baker wrote:

On 25/02/16 06:23, Carl Baldwin 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.

My intention was that it be a usability improvement rather than merely
an aesthetic one. Yes, it is unfortunate that it affects this specific
copy paste scenario but there are others where it is improved. I've
often been in the situation where I don't know which uuid to copy
because of the amount of overlap of unrelated columns.


But even in your case, if the uuid of interest was wrapped it wouldn't 
be a candidate for cut/paste, so it's just as broken.



How can I turned this off now?  Also, can I request that this new
"feature" be disabled by default?


Table resizing only occurs when a tty is present. This means that any
existing script which parses table output will not be affected. It also
means that you can disable it by piping your command to cat.

If you're unwilling to adapt, or specify formatting options, or pipe to
cat, then I would recommend that you submit a change to cliff to read a
user set environment variable to switch off table resizing.


I don't think it's OK to change the formatting, then introduce a change 
to get the original behavior back, the change should be considered a 
bug.  If we want a different behavior then *that* should be controlled 
through some new option.


I filed https://bugs.launchpad.net/python-cliff/+bug/1549906

-Brian

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


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

2016-02-24 Thread Steve Baker

On 25/02/16 06:23, Carl Baldwin 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.
My intention was that it be a usability improvement rather than merely 
an aesthetic one. Yes, it is unfortunate that it affects this specific 
copy paste scenario but there are others where it is improved. I've 
often been in the situation where I don't know which uuid to copy 
because of the amount of overlap of unrelated columns.

How can I turned this off now?  Also, can I request that this new
"feature" be disabled by default?

Table resizing only occurs when a tty is present. This means that any 
existing script which parses table output will not be affected. It also 
means that you can disable it by piping your command to cat.


If you're unwilling to adapt, or specify formatting options, or pipe to 
cat, then I would recommend that you submit a change to cliff to read a 
user set environment variable to switch off table resizing.


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


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

2016-02-24 Thread Kevin Benton
Right, but it breaks for humans too because it interferes with copy-paste.
:)

On Wed, Feb 24, 2016 at 9:46 AM, Akihiro Motoki  wrote:

> 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 -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 :
> > 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 
> 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-requ...@lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


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

2016-02-24 Thread Rick Jones

On 02/24/2016 09:46 AM, Akihiro Motoki wrote:

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 -create.


Be that as it may, it is equally bad if not worse to gratuitously (IMO) 
change output formats.  Even if it is meant to be "only" human-readable.


And it is arguably the case that this new format is less human-readable 
than what was before, even discounting the loss of straight-forward 
cut-and-paste.  And I would not discount the importance of 
straight-forward cut-and-paste.


rick jones



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 :

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  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-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


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

2016-02-24 Thread Akihiro Motoki
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 -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 :
> 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  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-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


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

2016-02-24 Thread Carl Baldwin
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  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-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


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

2016-02-24 Thread Carl Baldwin
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-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev