<div dir="ltr">Hello, Matt<div><br></div><div>Just checked it, nova quota-show command just shows current quota limits for a given tenant, below is an output for may Devstack admin tenant:</div><div><br></div><div><div>timur@devstack:~/devstack$ nova quota-show --tenant 9f6cc244fd9d41668d49c00f12b70219</div><div>+-----------------------------+-------+</div><div>| Quota                       | Limit |</div><div>+-----------------------------+-------+</div><div>| instances                   | 10    |</div><div>| cores                       | 20    |</div><div>| ram                         | 51200 |</div><div>| floating_ips                | 10    |</div><div>| fixed_ips                   | -1    |</div><div>| metadata_items              | 128   |</div><div>| injected_files              | 5     |</div><div>| injected_file_content_bytes | 10240 |</div><div>| injected_file_path_bytes    | 255   |</div><div>| key_pairs                   | 100   |</div><div>| security_groups             | 10    |</div><div>| security_group_rules        | 20    |</div><div>| server_groups               | 10    |</div><div>| server_group_members        | 10    |</div><div>+-----------------------------+-------+</div></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Dec 19, 2015 at 5:58 PM Matt Riedemann <<a href="mailto:mriedem@linux.vnet.ibm.com">mriedem@linux.vnet.ibm.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 12/18/2015 12:35 PM, Timur Sufiev wrote:<br>
> Matt,<br>
><br>
> actually Ivan (Ivan, thanks a lot!) showed me the exact cinderclient<br>
> call that I needed. Now I know how to retrieve Cinder quota usage info<br>
> per-tenant, seems that to retrieve the same info cloud-wide I should sum<br>
> up all the available tenant usages.<br>
><br>
> With Cinder quota usages being sorted out, my next goal is Nova and<br>
> Neutron. As for Neutron, there are plenty of quota-related calls I'm<br>
> going to play with next week, perhaps there is something suitable for my<br>
> use case. But as for Nova, I haven't found something similar to 'usage'<br>
> of cinderclient call, so help from someone familiar with Nova is very<br>
> appreciated :).<br>
><br>
> [0]<br>
> <a href="https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L36" rel="noreferrer" target="_blank">https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L36</a><br>
><br>
> On Fri, Dec 18, 2015 at 5:17 PM Matt Riedemann<br>
> <<a href="mailto:mriedem@linux.vnet.ibm.com" target="_blank">mriedem@linux.vnet.ibm.com</a> <mailto:<a href="mailto:mriedem@linux.vnet.ibm.com" target="_blank">mriedem@linux.vnet.ibm.com</a>>> wrote:<br>
><br>
><br>
><br>
>     On 12/17/2015 2:40 PM, Ivan Kolodyazhny wrote:<br>
>      > Hi Timur,<br>
>      ><br>
>      > Did you try this Cinder API [1]?  Here [2] is cinderclient output.<br>
>      ><br>
>      ><br>
>      ><br>
>      > [1]<br>
>      ><br>
>     <a href="https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L33" rel="noreferrer" target="_blank">https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L33</a><br>
>      > [2] <a href="http://paste.openstack.org/show/482225/" rel="noreferrer" target="_blank">http://paste.openstack.org/show/482225/</a><br>
>      ><br>
>      > Regards,<br>
>      > Ivan Kolodyazhny,<br>
>      > <a href="http://blog.e0ne.info/" rel="noreferrer" target="_blank">http://blog.e0ne.info/</a><br>
>      ><br>
>      > On Thu, Dec 17, 2015 at 8:41 PM, Timur Sufiev<br>
>     <<a href="mailto:tsufiev@mirantis.com" target="_blank">tsufiev@mirantis.com</a> <mailto:<a href="mailto:tsufiev@mirantis.com" target="_blank">tsufiev@mirantis.com</a>><br>
>      > <mailto:<a href="mailto:tsufiev@mirantis.com" target="_blank">tsufiev@mirantis.com</a> <mailto:<a href="mailto:tsufiev@mirantis.com" target="_blank">tsufiev@mirantis.com</a>>>> wrote:<br>
>      ><br>
>      >     Hello, folks!<br>
>      ><br>
>      >     I'd like to initiate a discussion of the feature request I'm<br>
>     going<br>
>      >     to make on behalf of Horizon to every core OpenStack service<br>
>     which<br>
>      >     supports Quota feature, namely Cinder, Nova and Neutron.<br>
>      ><br>
>      >     Although all three services' APIs support special calls to get<br>
>      >     current quota limitations (Nova and Cinder allows to get and<br>
>     update<br>
>      >     both per-tenant and default cloud-wide limitations, Neutron<br>
>     allows<br>
>      >     to do it only for per-tenant limitations), there is no<br>
>     special call<br>
>      >     in any of these services to get current per-tenant usage of<br>
>     quota.<br>
>      >     Because of that Horizon needs to get, say for 'volumes' quota, a<br>
>      >     list of Cinder volumes in the current tenant and then just<br>
>     calculate<br>
>      >     its length [1]. When there are really a lot of entities in<br>
>     tenant -<br>
>      >     instances/volumes/security groups/whatever - all this calls<br>
>     sum up<br>
>      >     and make rendering pages in Horizon much more slower than it<br>
>     could<br>
>      >     be. Is it possible to provide special API calls to alleviate<br>
>     this?<br>
>      ><br>
>      >     [1]<br>
>      ><br>
>     <a href="https://github.com/openstack/horizon/blob/9.0.0.0b1/openstack_dashboard/usage/quotas.py#L350" rel="noreferrer" target="_blank">https://github.com/openstack/horizon/blob/9.0.0.0b1/openstack_dashboard/usage/quotas.py#L350</a><br>
>      ><br>
>      ><br>
>       __________________________________________________________________________<br>
>      >     OpenStack Development Mailing List (not for usage questions)<br>
>      >     Unsubscribe:<br>
>      > <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
>     <<a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>><br>
>      ><br>
>       <<a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>><br>
>      > <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
>      ><br>
>      ><br>
>      ><br>
>      ><br>
>      ><br>
>     __________________________________________________________________________<br>
>      > OpenStack Development Mailing List (not for usage questions)<br>
>      > Unsubscribe:<br>
>     <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
>     <<a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>><br>
>      > <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
>      ><br>
><br>
>     I think Timur is asking for a way to filter on only certain resources<br>
>     for quota usage/limits, like volumes in cinder or instances in nova,<br>
>     rather than getting back all resource usage/limits per tenant.<br>
><br>
>     Is that correct, Timur?<br>
><br>
>     While it's possible to add this, I'm not sure how much time it's<br>
>     actually going to save in the DB query time to get the quota information<br>
>     for a tenant.<br>
><br>
>     Anyway, it's an API change so it would require a spec for nova which<br>
>     means we wouldn't be getting to that until at least N since we're in<br>
>     spec freeze for mitaka.<br>
><br>
>     --<br>
><br>
>     Thanks,<br>
><br>
>     Matt Riedemann<br>
><br>
><br>
>     __________________________________________________________________________<br>
>     OpenStack Development Mailing List (not for usage questions)<br>
>     Unsubscribe:<br>
>     <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
>     <<a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>><br>
>     <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
><br>
><br>
><br>
> __________________________________________________________________________<br>
> OpenStack Development Mailing List (not for usage questions)<br>
> Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
><br>
<br>
The nova quota-show command [1] is similar to the cinder quota-usage<br>
command, you provide a tenant (or user) and get back the quota usage.<br>
<br>
[1]<br>
<a href="http://docs.openstack.org/cli-reference/content/novaclient_commands.html#novaclient_subcommand_quota-show" rel="noreferrer" target="_blank">http://docs.openstack.org/cli-reference/content/novaclient_commands.html#novaclient_subcommand_quota-show</a><br>
<br>
--<br>
<br>
Thanks,<br>
<br>
Matt Riedemann<br>
<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div>