[openstack-dev] I love csv output in openstackclient, please never removed it
Doug Hellmann
doug at doughellmann.com
Mon Oct 5 16:43:12 UTC 2015
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 <doug at doughellmann.com>
> 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
More information about the OpenStack-dev
mailing list