Re: [openstack-dev] I love csv output in openstackclient, please never removed it

2015-10-05 Thread Sean Dague
On 10/05/2015 12:16 AM, Steve Martinelli wrote:
> I loved reading this email as much as zigo loves csv output, great
> feedback is an amazing motivator!
> 
> And don't worry, the csv output was never going away :)
> 
> stevemar

It might be nice to change some of the devstack usage into that. It
would help spread the word about it, and be a bit easier to understand.

-Sean

-- 
Sean Dague
http://dague.net

__
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] I love csv output in openstackclient, please never removed it

2015-10-05 Thread Dean Troyer
On Mon, Oct 5, 2015 at 11:03 AM, Doug Hellmann 
wrote:

> Devstack should also look at using the shell output formatter,
> especially for show commands. Combining that formatter with eval means
> no parsing in a lot of cases.
>

It may in places, but it turns out the 'value' formatter is most useful,
especially in the get_or_create_* functions where you really only need a
single value, avoids an eval or extra subshell.

group_id=$(
# Creates new group with --or-show
openstack --os-token=$OS_TOKEN --os-url=$os_url \
--os-identity-api-version=3 group create $1 \
--domain $2 --description "$desc" --or-show \
-f value -c id
)
echo $group_id

dt

-- 

Dean Troyer
dtro...@gmail.com
__
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] I love csv output in openstackclient, please never removed it

2015-10-05 Thread Doug Hellmann
Excerpts from Sean Dague's message of 2015-10-05 06:57:06 -0400:
> On 10/05/2015 12:16 AM, Steve Martinelli wrote:
> > I loved reading this email as much as zigo loves csv output, great
> > feedback is an amazing motivator!
> > 
> > And don't worry, the csv output was never going away :)
> > 
> > stevemar
> 
> It might be nice to change some of the devstack usage into that. It
> would help spread the word about it, and be a bit easier to understand.
> 
> -Sean
> 

Devstack should also look at using the shell output formatter,
especially for show commands. Combining that formatter with eval means
no parsing in a lot of cases.

Doug

__
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] I love csv output in openstackclient, please never removed it

2015-10-05 Thread Doug Hellmann
Excerpts from Dean Troyer's message of 2015-10-05 11:18:55 -0500:
> On Mon, Oct 5, 2015 at 11:03 AM, Doug Hellmann 
> wrote:
> 
> > Devstack should also look at using the shell output formatter,
> > especially for show commands. Combining that formatter with eval means
> > no parsing in a lot of cases.
> >
> 
> It may in places, but it turns out the 'value' formatter is most useful,
> especially in the get_or_create_* functions where you really only need a
> single value, avoids an eval or extra subshell.
> 
> group_id=$(
> # Creates new group with --or-show
> openstack --os-token=$OS_TOKEN --os-url=$os_url \
> --os-identity-api-version=3 group create $1 \
> --domain $2 --description "$desc" --or-show \
> -f value -c id
> )
> echo $group_id
> 
> dt
> 

Yep, that's another good tip.

Doug

__
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] I love csv output in openstackclient, please never removed it

2015-10-04 Thread Steve Martinelli
I loved reading this email as much as zigo loves csv output, great feedback
is an amazing motivator!

And don't worry, the csv output was never going away :)

stevemar

Thomas Goirand  wrote on 2015/10/02 03:49:01 PM:

> From: Thomas Goirand 
> To: "OpenStack Development Mailing List (not for usage questions)"
> 
> Date: 2015/10/02 03:50 PM
> Subject: [openstack-dev] I love csv output in openstackclient,
> please never removed it
>
> Hi,
>
> I saw the csv output format of openstackclient going and coming back.
> Please leave it in, it's super useful, especially when you combine it
> with "q-text-as-data". Just try to apt-get install q-text-as-data" and
> try by yourself:
>
> openstack endpoint list --long -f csv | \
>q -d , -H 'SELECT ID FROM - WHERE `Service Name`="cinder"'
>
> This is so much better than any awk hacks to get IDs... :)
> I just wanted to share, hoping it could be useful to someone.
>
> Cheers,
>
> Thomas Goirand (zigo)
>
>
__
> 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] I love csv output in openstackclient, please never removed it

2015-10-03 Thread Daniel Comnea
thanks for sharing, useful indeed.



On Fri, Oct 2, 2015 at 8:51 PM, Ricardo Carrillo Cruz <
ricardo.carrillo.c...@gmail.com> wrote:

> Erm, yeah, I hear your pain with processing output with awk.
>
> Having the option to output CSV is cool :-).
> Thanks for sharing.
>
> Cheers
>
> 2015-10-02 21:49 GMT+02:00 Thomas Goirand :
>
>> Hi,
>>
>> I saw the csv output format of openstackclient going and coming back.
>> Please leave it in, it's super useful, especially when you combine it
>> with "q-text-as-data". Just try to apt-get install q-text-as-data" and
>> try by yourself:
>>
>> openstack endpoint list --long -f csv | \
>> q -d , -H 'SELECT ID FROM - WHERE `Service Name`="cinder"'
>>
>> This is so much better than any awk hacks to get IDs... :)
>> I just wanted to share, hoping it could be useful to someone.
>>
>> Cheers,
>>
>> Thomas Goirand (zigo)
>>
>> __
>> 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] I love csv output in openstackclient, please never removed it

2015-10-02 Thread Ricardo Carrillo Cruz
Erm, yeah, I hear your pain with processing output with awk.

Having the option to output CSV is cool :-).
Thanks for sharing.

Cheers

2015-10-02 21:49 GMT+02:00 Thomas Goirand :

> Hi,
>
> I saw the csv output format of openstackclient going and coming back.
> Please leave it in, it's super useful, especially when you combine it
> with "q-text-as-data". Just try to apt-get install q-text-as-data" and
> try by yourself:
>
> openstack endpoint list --long -f csv | \
> q -d , -H 'SELECT ID FROM - WHERE `Service Name`="cinder"'
>
> This is so much better than any awk hacks to get IDs... :)
> I just wanted to share, hoping it could be useful to someone.
>
> Cheers,
>
> Thomas Goirand (zigo)
>
> __
> 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