Re: [openstack-dev] [Horizon] [Cinder] [Nova] [Neutron] Gathering quota usage data in Horizon

2015-12-23 Thread Timur Sufiev
Duncan,

Thank you for the suggestion, will do.
On Wed, 23 Dec 2015 at 10:55, Duncan Thomas  wrote:

> On a cloud with a large number of tenants, this is going to involve a
> large number of API calls. I'd suggest you put a spec into cinder to add an
> API call for getting the totals straight out of the DB - it should be easy
> enough to add.
>
> On 18 December 2015 at 20:35, Timur Sufiev  wrote:
>
>> Matt,
>>
>> actually Ivan (Ivan, thanks a lot!) showed me the exact cinderclient call
>> that I needed. Now I know how to retrieve Cinder quota usage info
>> per-tenant, seems that to retrieve the same info cloud-wide I should sum up
>> all the available tenant usages.
>>
>> With Cinder quota usages being sorted out, my next goal is Nova and
>> Neutron. As for Neutron, there are plenty of quota-related calls I'm going
>> to play with next week, perhaps there is something suitable for my use
>> case. But as for Nova, I haven't found something similar to 'usage' of
>> cinderclient call, so help from someone familiar with Nova is very
>> appreciated :).
>>
>> [0]
>> https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L36
>>
>> On Fri, Dec 18, 2015 at 5:17 PM Matt Riedemann <
>> mrie...@linux.vnet.ibm.com> wrote:
>>
>>>
>>>
>>> On 12/17/2015 2:40 PM, Ivan Kolodyazhny wrote:
>>> > Hi Timur,
>>> >
>>> > Did you try this Cinder API [1]?  Here [2] is cinderclient output.
>>> >
>>> >
>>> >
>>> > [1]
>>> >
>>> https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L33
>>> > [2] http://paste.openstack.org/show/482225/
>>> >
>>> > Regards,
>>> > Ivan Kolodyazhny,
>>> > http://blog.e0ne.info/
>>> >
>>> > On Thu, Dec 17, 2015 at 8:41 PM, Timur Sufiev >> > > wrote:
>>> >
>>> > Hello, folks!
>>> >
>>> > I'd like to initiate a discussion of the feature request I'm going
>>> > to make on behalf of Horizon to every core OpenStack service which
>>> > supports Quota feature, namely Cinder, Nova and Neutron.
>>> >
>>> > Although all three services' APIs support special calls to get
>>> > current quota limitations (Nova and Cinder allows to get and update
>>> > both per-tenant and default cloud-wide limitations, Neutron allows
>>> > to do it only for per-tenant limitations), there is no special call
>>> > in any of these services to get current per-tenant usage of quota.
>>> > Because of that Horizon needs to get, say for 'volumes' quota, a
>>> > list of Cinder volumes in the current tenant and then just
>>> calculate
>>> > its length [1]. When there are really a lot of entities in tenant -
>>> > instances/volumes/security groups/whatever - all this calls sum up
>>> > and make rendering pages in Horizon much more slower than it could
>>> > be. Is it possible to provide special API calls to alleviate this?
>>> >
>>> > [1]
>>> >
>>> https://github.com/openstack/horizon/blob/9.0.0.0b1/openstack_dashboard/usage/quotas.py#L350
>>> >
>>> >
>>>  __
>>> > OpenStack Development Mailing List (not for usage questions)
>>> > Unsubscribe:
>>> > openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>>> > <
>>> http://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
>>> >
>>>
>>> I think Timur is asking for a way to filter on only certain resources
>>> for quota usage/limits, like volumes in cinder or instances in nova,
>>> rather than getting back all resource usage/limits per tenant.
>>>
>>> Is that correct, Timur?
>>>
>>> While it's possible to add this, I'm not sure how much time it's
>>> actually going to save in the DB query time to get the quota information
>>> for a tenant.
>>>
>>> Anyway, it's an API change so it would require a spec for nova which
>>> means we wouldn't be getting to that until at least N since we're in
>>> spec freeze for mitaka.
>>>
>>> --
>>>
>>> Thanks,
>>>
>>> Matt Riedemann
>>>
>>>
>>>
>>> __
>>> 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:
>> 

Re: [openstack-dev] [Horizon] [Cinder] [Nova] [Neutron] Gathering quota usage data in Horizon

2015-12-22 Thread Duncan Thomas
On a cloud with a large number of tenants, this is going to involve a large
number of API calls. I'd suggest you put a spec into cinder to add an API
call for getting the totals straight out of the DB - it should be easy
enough to add.

On 18 December 2015 at 20:35, Timur Sufiev  wrote:

> Matt,
>
> actually Ivan (Ivan, thanks a lot!) showed me the exact cinderclient call
> that I needed. Now I know how to retrieve Cinder quota usage info
> per-tenant, seems that to retrieve the same info cloud-wide I should sum up
> all the available tenant usages.
>
> With Cinder quota usages being sorted out, my next goal is Nova and
> Neutron. As for Neutron, there are plenty of quota-related calls I'm going
> to play with next week, perhaps there is something suitable for my use
> case. But as for Nova, I haven't found something similar to 'usage' of
> cinderclient call, so help from someone familiar with Nova is very
> appreciated :).
>
> [0]
> https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L36
>
> On Fri, Dec 18, 2015 at 5:17 PM Matt Riedemann 
> wrote:
>
>>
>>
>> On 12/17/2015 2:40 PM, Ivan Kolodyazhny wrote:
>> > Hi Timur,
>> >
>> > Did you try this Cinder API [1]?  Here [2] is cinderclient output.
>> >
>> >
>> >
>> > [1]
>> >
>> https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L33
>> > [2] http://paste.openstack.org/show/482225/
>> >
>> > Regards,
>> > Ivan Kolodyazhny,
>> > http://blog.e0ne.info/
>> >
>> > On Thu, Dec 17, 2015 at 8:41 PM, Timur Sufiev > > > wrote:
>> >
>> > Hello, folks!
>> >
>> > I'd like to initiate a discussion of the feature request I'm going
>> > to make on behalf of Horizon to every core OpenStack service which
>> > supports Quota feature, namely Cinder, Nova and Neutron.
>> >
>> > Although all three services' APIs support special calls to get
>> > current quota limitations (Nova and Cinder allows to get and update
>> > both per-tenant and default cloud-wide limitations, Neutron allows
>> > to do it only for per-tenant limitations), there is no special call
>> > in any of these services to get current per-tenant usage of quota.
>> > Because of that Horizon needs to get, say for 'volumes' quota, a
>> > list of Cinder volumes in the current tenant and then just calculate
>> > its length [1]. When there are really a lot of entities in tenant -
>> > instances/volumes/security groups/whatever - all this calls sum up
>> > and make rendering pages in Horizon much more slower than it could
>> > be. Is it possible to provide special API calls to alleviate this?
>> >
>> > [1]
>> >
>> https://github.com/openstack/horizon/blob/9.0.0.0b1/openstack_dashboard/usage/quotas.py#L350
>> >
>> >
>>  __
>> > OpenStack Development Mailing List (not for usage questions)
>> > Unsubscribe:
>> > openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> > <
>> http://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
>> >
>>
>> I think Timur is asking for a way to filter on only certain resources
>> for quota usage/limits, like volumes in cinder or instances in nova,
>> rather than getting back all resource usage/limits per tenant.
>>
>> Is that correct, Timur?
>>
>> While it's possible to add this, I'm not sure how much time it's
>> actually going to save in the DB query time to get the quota information
>> for a tenant.
>>
>> Anyway, it's an API change so it would require a spec for nova which
>> means we wouldn't be getting to that until at least N since we're in
>> spec freeze for mitaka.
>>
>> --
>>
>> Thanks,
>>
>> Matt Riedemann
>>
>>
>> __
>> 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
>
>


-- 
-- 
Duncan Thomas
__
OpenStack Development Mailing List (not for usage questions)

Re: [openstack-dev] [Horizon] [Cinder] [Nova] [Neutron] Gathering quota usage data in Horizon

2015-12-21 Thread Timur Sufiev
Hello, Matt

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:

timur@devstack:~/devstack$ nova quota-show --tenant
9f6cc244fd9d41668d49c00f12b70219
+-+---+
| Quota   | Limit |
+-+---+
| instances   | 10|
| cores   | 20|
| ram | 51200 |
| floating_ips| 10|
| fixed_ips   | -1|
| metadata_items  | 128   |
| injected_files  | 5 |
| injected_file_content_bytes | 10240 |
| injected_file_path_bytes| 255   |
| key_pairs   | 100   |
| security_groups | 10|
| security_group_rules| 20|
| server_groups   | 10|
| server_group_members| 10|
+-+---+


On Sat, Dec 19, 2015 at 5:58 PM Matt Riedemann 
wrote:

>
>
> On 12/18/2015 12:35 PM, Timur Sufiev wrote:
> > Matt,
> >
> > actually Ivan (Ivan, thanks a lot!) showed me the exact cinderclient
> > call that I needed. Now I know how to retrieve Cinder quota usage info
> > per-tenant, seems that to retrieve the same info cloud-wide I should sum
> > up all the available tenant usages.
> >
> > With Cinder quota usages being sorted out, my next goal is Nova and
> > Neutron. As for Neutron, there are plenty of quota-related calls I'm
> > going to play with next week, perhaps there is something suitable for my
> > use case. But as for Nova, I haven't found something similar to 'usage'
> > of cinderclient call, so help from someone familiar with Nova is very
> > appreciated :).
> >
> > [0]
> >
> https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L36
> >
> > On Fri, Dec 18, 2015 at 5:17 PM Matt Riedemann
> > > wrote:
> >
> >
> >
> > On 12/17/2015 2:40 PM, Ivan Kolodyazhny wrote:
> >  > Hi Timur,
> >  >
> >  > Did you try this Cinder API [1]?  Here [2] is cinderclient output.
> >  >
> >  >
> >  >
> >  > [1]
> >  >
> >
> https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L33
> >  > [2] http://paste.openstack.org/show/482225/
> >  >
> >  > Regards,
> >  > Ivan Kolodyazhny,
> >  > http://blog.e0ne.info/
> >  >
> >  > On Thu, Dec 17, 2015 at 8:41 PM, Timur Sufiev
> > 
> >  > >>
> wrote:
> >  >
> >  > Hello, folks!
> >  >
> >  > I'd like to initiate a discussion of the feature request I'm
> > going
> >  > to make on behalf of Horizon to every core OpenStack service
> > which
> >  > supports Quota feature, namely Cinder, Nova and Neutron.
> >  >
> >  > Although all three services' APIs support special calls to get
> >  > current quota limitations (Nova and Cinder allows to get and
> > update
> >  > both per-tenant and default cloud-wide limitations, Neutron
> > allows
> >  > to do it only for per-tenant limitations), there is no
> > special call
> >  > in any of these services to get current per-tenant usage of
> > quota.
> >  > Because of that Horizon needs to get, say for 'volumes'
> quota, a
> >  > list of Cinder volumes in the current tenant and then just
> > calculate
> >  > its length [1]. When there are really a lot of entities in
> > tenant -
> >  > instances/volumes/security groups/whatever - all this calls
> > sum up
> >  > and make rendering pages in Horizon much more slower than it
> > could
> >  > be. Is it possible to provide special API calls to alleviate
> > this?
> >  >
> >  > [1]
> >  >
> >
> https://github.com/openstack/horizon/blob/9.0.0.0b1/openstack_dashboard/usage/quotas.py#L350
> >  >
> >  >
> >
>  __
> >  > OpenStack Development Mailing List (not for usage questions)
> >  > Unsubscribe:
> >  > openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> > <
> http://openstack-dev-requ...@lists.openstack.org?subject:unsubscribe>
> >  >
> >   <
> http://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
> > <
> 

Re: [openstack-dev] [Horizon] [Cinder] [Nova] [Neutron] Gathering quota usage data in Horizon

2015-12-19 Thread Matt Riedemann



On 12/18/2015 12:35 PM, Timur Sufiev wrote:

Matt,

actually Ivan (Ivan, thanks a lot!) showed me the exact cinderclient
call that I needed. Now I know how to retrieve Cinder quota usage info
per-tenant, seems that to retrieve the same info cloud-wide I should sum
up all the available tenant usages.

With Cinder quota usages being sorted out, my next goal is Nova and
Neutron. As for Neutron, there are plenty of quota-related calls I'm
going to play with next week, perhaps there is something suitable for my
use case. But as for Nova, I haven't found something similar to 'usage'
of cinderclient call, so help from someone familiar with Nova is very
appreciated :).

[0]
https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L36

On Fri, Dec 18, 2015 at 5:17 PM Matt Riedemann
> wrote:



On 12/17/2015 2:40 PM, Ivan Kolodyazhny wrote:
 > Hi Timur,
 >
 > Did you try this Cinder API [1]?  Here [2] is cinderclient output.
 >
 >
 >
 > [1]
 >

https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L33
 > [2] http://paste.openstack.org/show/482225/
 >
 > Regards,
 > Ivan Kolodyazhny,
 > http://blog.e0ne.info/
 >
 > On Thu, Dec 17, 2015 at 8:41 PM, Timur Sufiev

 > >> wrote:
 >
 > Hello, folks!
 >
 > I'd like to initiate a discussion of the feature request I'm
going
 > to make on behalf of Horizon to every core OpenStack service
which
 > supports Quota feature, namely Cinder, Nova and Neutron.
 >
 > Although all three services' APIs support special calls to get
 > current quota limitations (Nova and Cinder allows to get and
update
 > both per-tenant and default cloud-wide limitations, Neutron
allows
 > to do it only for per-tenant limitations), there is no
special call
 > in any of these services to get current per-tenant usage of
quota.
 > Because of that Horizon needs to get, say for 'volumes' quota, a
 > list of Cinder volumes in the current tenant and then just
calculate
 > its length [1]. When there are really a lot of entities in
tenant -
 > instances/volumes/security groups/whatever - all this calls
sum up
 > and make rendering pages in Horizon much more slower than it
could
 > be. Is it possible to provide special API calls to alleviate
this?
 >
 > [1]
 >

https://github.com/openstack/horizon/blob/9.0.0.0b1/openstack_dashboard/usage/quotas.py#L350
 >
 >
  __
 > 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
 >

I think Timur is asking for a way to filter on only certain resources
for quota usage/limits, like volumes in cinder or instances in nova,
rather than getting back all resource usage/limits per tenant.

Is that correct, Timur?

While it's possible to add this, I'm not sure how much time it's
actually going to save in the DB query time to get the quota information
for a tenant.

Anyway, it's an API change so it would require a spec for nova which
means we wouldn't be getting to that until at least N since we're in
spec freeze for mitaka.

--

Thanks,

Matt Riedemann


__
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



The 

Re: [openstack-dev] [Horizon] [Cinder] [Nova] [Neutron] Gathering quota usage data in Horizon

2015-12-18 Thread Matt Riedemann



On 12/17/2015 2:40 PM, Ivan Kolodyazhny wrote:

Hi Timur,

Did you try this Cinder API [1]?  Here [2] is cinderclient output.



[1]
https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L33
[2] http://paste.openstack.org/show/482225/

Regards,
Ivan Kolodyazhny,
http://blog.e0ne.info/

On Thu, Dec 17, 2015 at 8:41 PM, Timur Sufiev > wrote:

Hello, folks!

I'd like to initiate a discussion of the feature request I'm going
to make on behalf of Horizon to every core OpenStack service which
supports Quota feature, namely Cinder, Nova and Neutron.

Although all three services' APIs support special calls to get
current quota limitations (Nova and Cinder allows to get and update
both per-tenant and default cloud-wide limitations, Neutron allows
to do it only for per-tenant limitations), there is no special call
in any of these services to get current per-tenant usage of quota.
Because of that Horizon needs to get, say for 'volumes' quota, a
list of Cinder volumes in the current tenant and then just calculate
its length [1]. When there are really a lot of entities in tenant -
instances/volumes/security groups/whatever - all this calls sum up
and make rendering pages in Horizon much more slower than it could
be. Is it possible to provide special API calls to alleviate this?

[1]

https://github.com/openstack/horizon/blob/9.0.0.0b1/openstack_dashboard/usage/quotas.py#L350

__
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



I think Timur is asking for a way to filter on only certain resources 
for quota usage/limits, like volumes in cinder or instances in nova, 
rather than getting back all resource usage/limits per tenant.


Is that correct, Timur?

While it's possible to add this, I'm not sure how much time it's 
actually going to save in the DB query time to get the quota information 
for a tenant.


Anyway, it's an API change so it would require a spec for nova which 
means we wouldn't be getting to that until at least N since we're in 
spec freeze for mitaka.


--

Thanks,

Matt Riedemann


__
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] [Horizon] [Cinder] [Nova] [Neutron] Gathering quota usage data in Horizon

2015-12-18 Thread Salvatore Orlando
The point raised by Matt for Nova applies to Neutron as well.
Neutron does not have strict deadlines for blueprint approval; however even
if in theory it would still be possible to achieve this for Mitaka, it is
rather unlikely since the number of blueprints already in the pipeline is
way more than what can reasonably be implemented in this release cycle.

Anyway, it would be a matter of resuscitate the blueprint [1] and pretty
much rework it in light of the discussion we had around "usage APIs" with
the API working group [2]
I will be happy to assist with design and implementations. so if you have
any requirement from the horizon side, like the ability of filtering either
by tenant or resource just let me know.

Salvatore

[1] https://review.openstack.org/#/c/102199/
[2]
http://lists.openstack.org/pipermail/openstack-dev/2014-November/051152.html

On 18 December 2015 at 15:12, Matt Riedemann 
wrote:

>
>
> On 12/17/2015 2:40 PM, Ivan Kolodyazhny wrote:
>
>> Hi Timur,
>>
>> Did you try this Cinder API [1]?  Here [2] is cinderclient output.
>>
>>
>>
>> [1]
>>
>> https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L33
>> [2] http://paste.openstack.org/show/482225/
>>
>> Regards,
>> Ivan Kolodyazhny,
>> http://blog.e0ne.info/
>>
>> On Thu, Dec 17, 2015 at 8:41 PM, Timur Sufiev > > wrote:
>>
>> Hello, folks!
>>
>> I'd like to initiate a discussion of the feature request I'm going
>> to make on behalf of Horizon to every core OpenStack service which
>> supports Quota feature, namely Cinder, Nova and Neutron.
>>
>> Although all three services' APIs support special calls to get
>> current quota limitations (Nova and Cinder allows to get and update
>> both per-tenant and default cloud-wide limitations, Neutron allows
>> to do it only for per-tenant limitations), there is no special call
>> in any of these services to get current per-tenant usage of quota.
>> Because of that Horizon needs to get, say for 'volumes' quota, a
>> list of Cinder volumes in the current tenant and then just calculate
>> its length [1]. When there are really a lot of entities in tenant -
>> instances/volumes/security groups/whatever - all this calls sum up
>> and make rendering pages in Horizon much more slower than it could
>> be. Is it possible to provide special API calls to alleviate this?
>>
>> [1]
>>
>> https://github.com/openstack/horizon/blob/9.0.0.0b1/openstack_dashboard/usage/quotas.py#L350
>>
>>
>> __
>> 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
>>
>>
> I think Timur is asking for a way to filter on only certain resources for
> quota usage/limits, like volumes in cinder or instances in nova, rather
> than getting back all resource usage/limits per tenant.
>
> Is that correct, Timur?
>
> While it's possible to add this, I'm not sure how much time it's actually
> going to save in the DB query time to get the quota information for a
> tenant.
>
> Anyway, it's an API change so it would require a spec for nova which means
> we wouldn't be getting to that until at least N since we're in spec freeze
> for mitaka.
>
> --
>
> Thanks,
>
> Matt Riedemann
>
>
>
> __
> 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] [Horizon] [Cinder] [Nova] [Neutron] Gathering quota usage data in Horizon

2015-12-18 Thread Timur Sufiev
Matt,

actually Ivan (Ivan, thanks a lot!) showed me the exact cinderclient call
that I needed. Now I know how to retrieve Cinder quota usage info
per-tenant, seems that to retrieve the same info cloud-wide I should sum up
all the available tenant usages.

With Cinder quota usages being sorted out, my next goal is Nova and
Neutron. As for Neutron, there are plenty of quota-related calls I'm going
to play with next week, perhaps there is something suitable for my use
case. But as for Nova, I haven't found something similar to 'usage' of
cinderclient call, so help from someone familiar with Nova is very
appreciated :).

[0]
https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L36

On Fri, Dec 18, 2015 at 5:17 PM Matt Riedemann 
wrote:

>
>
> On 12/17/2015 2:40 PM, Ivan Kolodyazhny wrote:
> > Hi Timur,
> >
> > Did you try this Cinder API [1]?  Here [2] is cinderclient output.
> >
> >
> >
> > [1]
> >
> https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L33
> > [2] http://paste.openstack.org/show/482225/
> >
> > Regards,
> > Ivan Kolodyazhny,
> > http://blog.e0ne.info/
> >
> > On Thu, Dec 17, 2015 at 8:41 PM, Timur Sufiev  > > wrote:
> >
> > Hello, folks!
> >
> > I'd like to initiate a discussion of the feature request I'm going
> > to make on behalf of Horizon to every core OpenStack service which
> > supports Quota feature, namely Cinder, Nova and Neutron.
> >
> > Although all three services' APIs support special calls to get
> > current quota limitations (Nova and Cinder allows to get and update
> > both per-tenant and default cloud-wide limitations, Neutron allows
> > to do it only for per-tenant limitations), there is no special call
> > in any of these services to get current per-tenant usage of quota.
> > Because of that Horizon needs to get, say for 'volumes' quota, a
> > list of Cinder volumes in the current tenant and then just calculate
> > its length [1]. When there are really a lot of entities in tenant -
> > instances/volumes/security groups/whatever - all this calls sum up
> > and make rendering pages in Horizon much more slower than it could
> > be. Is it possible to provide special API calls to alleviate this?
> >
> > [1]
> >
> https://github.com/openstack/horizon/blob/9.0.0.0b1/openstack_dashboard/usage/quotas.py#L350
> >
> >
>  __
> > OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe:
> > openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> > <
> http://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
> >
>
> I think Timur is asking for a way to filter on only certain resources
> for quota usage/limits, like volumes in cinder or instances in nova,
> rather than getting back all resource usage/limits per tenant.
>
> Is that correct, Timur?
>
> While it's possible to add this, I'm not sure how much time it's
> actually going to save in the DB query time to get the quota information
> for a tenant.
>
> Anyway, it's an API change so it would require a spec for nova which
> means we wouldn't be getting to that until at least N since we're in
> spec freeze for mitaka.
>
> --
>
> Thanks,
>
> Matt Riedemann
>
>
> __
> 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-dev] [Horizon] [Cinder] [Nova] [Neutron] Gathering quota usage data in Horizon

2015-12-17 Thread Timur Sufiev
Hello, folks!

I'd like to initiate a discussion of the feature request I'm going to make
on behalf of Horizon to every core OpenStack service which supports Quota
feature, namely Cinder, Nova and Neutron.

Although all three services' APIs support special calls to get current
quota limitations (Nova and Cinder allows to get and update both per-tenant
and default cloud-wide limitations, Neutron allows to do it only for
per-tenant limitations), there is no special call in any of these services
to get current per-tenant usage of quota. Because of that Horizon needs to
get, say for 'volumes' quota, a list of Cinder volumes in the current
tenant and then just calculate its length [1]. When there are really a lot
of entities in tenant - instances/volumes/security groups/whatever - all
this calls sum up and make rendering pages in Horizon much more slower than
it could be. Is it possible to provide special API calls to alleviate this?

[1]
https://github.com/openstack/horizon/blob/9.0.0.0b1/openstack_dashboard/usage/quotas.py#L350
__
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] [Horizon] [Cinder] [Nova] [Neutron] Gathering quota usage data in Horizon

2015-12-17 Thread Ivan Kolodyazhny
Hi Timur,

Did you try this Cinder API [1]?  Here [2] is cinderclient output.



[1]
https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L33
[2] http://paste.openstack.org/show/482225/

Regards,
Ivan Kolodyazhny,
http://blog.e0ne.info/

On Thu, Dec 17, 2015 at 8:41 PM, Timur Sufiev  wrote:

> Hello, folks!
>
> I'd like to initiate a discussion of the feature request I'm going to make
> on behalf of Horizon to every core OpenStack service which supports Quota
> feature, namely Cinder, Nova and Neutron.
>
> Although all three services' APIs support special calls to get current
> quota limitations (Nova and Cinder allows to get and update both per-tenant
> and default cloud-wide limitations, Neutron allows to do it only for
> per-tenant limitations), there is no special call in any of these services
> to get current per-tenant usage of quota. Because of that Horizon needs to
> get, say for 'volumes' quota, a list of Cinder volumes in the current
> tenant and then just calculate its length [1]. When there are really a lot
> of entities in tenant - instances/volumes/security groups/whatever - all
> this calls sum up and make rendering pages in Horizon much more slower than
> it could be. Is it possible to provide special API calls to alleviate this?
>
> [1]
> https://github.com/openstack/horizon/blob/9.0.0.0b1/openstack_dashboard/usage/quotas.py#L350
>
> __
> 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