<div dir="ltr">We have an image promotion process that does this for us.  The command I use to get images from a specific tenant is:<br><br><div>glance --os-image-api-version 1 image-list --owner=<uuid><br></div><div><br></div><div>I'm sure using the v1 API will make some cringe, but I haven't found anything similar in the v2 API.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 25, 2016 at 8:29 AM, Steve Martinelli <span dir="ltr"><<a href="mailto:stevemar@ca.ibm.com" target="_blank">stevemar@ca.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p>You can also use `openstack image list --long` -- this should include the owner ID (which is the project ID) and do some grepping and cutting for that output. Not the cleanest, but it'll work.<br><br>$ openstack image list --long --format value | grep $project_id | cut -f 1 -d " "<br><br>Adding to Thomas' suggestion, you can use `--format value and -c ID` to only get the image IDs<br><br>$ openstack image list --property owner=1ed19ee75d6840cf94cfb04e4405a25e --format value -c ID<br>ab1629bc-692c-4947-b3f1-968cbdfcd55c<br>8360a76c-ee86-4a52-8735-d9a3b9f5ce3a<br>c12b0aff-2b88-4060-ae2b-3208e0edbd6c<br><br>Of course, if you feel strongly that there should be a `--project <project_id>` option directly, then please report a bug: <a href="https://bugs.launchpad.net/python-openstackclient/+filebug" target="_blank">https://bugs.launchpad.net/python-openstackclient/+filebug</a><br><br><br><tt>Thomas Blank - Hetzner Online AG <<a href="mailto:thomas.blank@hetzner.de" target="_blank">thomas.blank@hetzner.de</a>> wrote on 2016/01/25 10:49:34 AM:<br><br>> From: Thomas Blank - Hetzner Online AG <<a href="mailto:thomas.blank@hetzner.de" target="_blank">thomas.blank@hetzner.de</a>></tt><br><tt>> To: <a href="mailto:openstack-operators@lists.openstack.org" target="_blank">openstack-operators@lists.openstack.org</a></tt><br><tt>> Date: 2016/01/25 10:52 AM</tt><br><tt>> Subject: Re: [Openstack-operators] how to get glance images for a <br>> specific tenant with the openstack client ?</tt></p><div><div class="h5"><br><tt>> <br>> Hey there,<br>> <br>> have you tried using the --property option of the openstack-client?<br>> You could filter images by their owner (openstack_project_id or name).<br>> <br>> "openstack image list --property owner=[openstack_project_id]"<br>> <br>> see:<br>> <br>> <a href="http://docs.openstack.org/developer/python-openstackclient/command-" target="_blank">http://docs.openstack.org/developer/python-openstackclient/command-</a><br>> objects/image.html#cmdoption-image-list--property<br>> <br>> thomas blank,<br>> <br>> <br>> <br>> On 25.01.2016 16:19, Saverio Proto wrote:<br>> > Hello there,<br>> > <br>> > I need to delete some users  and tenants from my public cloud. Before<br>> > deleting the users and tenants from keystone, I need to delete all the<br>> > resources in the tenants.<br>> > <br>> > I am stucked listing the glance images uploaded in a specific tenant.<br>> > I cannot find the way, I always get either all the images in the<br>> > system, or just the ones of the active OS_TENANT_NAME<br>> > <br>> > openstack help image list<br>> > usage: openstack image list [-h] [-f {csv,json,table,value,yaml}] <br>> [-c COLUMN]<br>> >                             [--max-width <integer>] [--noindent]<br>> >                             [--quote {all,minimal,none,nonnumeric}]<br>> >                             [--public | --private | --shared]<br>> >                             [--property <key=value>] [--long]<br>> >                             [--sort <key>[:<direction>]]<br>> > <br>> > As a work around I can add a user with member role in the tenant, and<br>> > list in that way ... but, there is really no way to specifiy<br>> > --tenant=id in the openstack client ?<br>> > <br>> > thank you<br>> > <br>> > Saverio<br>> > <br>> > _______________________________________________<br>> > OpenStack-operators mailing list<br>> > <a href="mailto:OpenStack-operators@lists.openstack.org" target="_blank">OpenStack-operators@lists.openstack.org</a><br>> > <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br>> > <br>> <br>> _______________________________________________<br>> OpenStack-operators mailing list<br>> <a href="mailto:OpenStack-operators@lists.openstack.org" target="_blank">OpenStack-operators@lists.openstack.org</a><br>> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br>> <br></tt><br>
</div></div><p></p></div>
<br>_______________________________________________<br>
OpenStack-operators mailing list<br>
<a href="mailto:OpenStack-operators@lists.openstack.org">OpenStack-operators@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>David W.</div>Unix, because every barista in Seattle has an MCSE.</div></div>
</div>