On Mon, Oct 5, 2015 at 11:03 AM, Doug Hellmann <d...@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

-- 

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

Reply via email to