call neutron api twice for list subnet when count subnet quotas

Bug #1663170 reported by Min Sun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Akihiro Motoki

Bug Description

When update a tenant's subnet quota, we have to list all existed subnets to count the minimal quota for subnet. In current code, it first lists none-shared subnets and then lists shared subnets. At last, put the two values together. It has to call neutron list subnet api twice. In fact, it can be done by one api call without shared parameter.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/431793

Changed in horizon:
assignee: nobody → Min Sun (minsu)
status: New → In Progress
Changed in horizon:
assignee: Min Sun (minsu) → Akihiro Motoki (amotoki)
Akihiro Motoki (amotoki)
Changed in horizon:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/431793
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=af8a01b362acd85aff34dfde0a7ace197007f768
Submitter: Jenkins
Branch: master

commit af8a01b362acd85aff34dfde0a7ace197007f768
Author: MinSun <email address hidden>
Date: Fri Feb 10 09:00:35 2017 +0800

    usage: Ensure to count resources of a given project

    When retrieving resource usage, the current code calls subnet_list
    twice for shared=False/True, but 'shared' attribute of subnet is
    not defined in the Networking API and actually there is no need to
    use it (even though it works as expected accidentally).

    What we need here is to specify tenant_id as a query parameter
    with a single API to limit the scope to a given project.

    The same way can be used for network_list() and router_list() calls
    and it is more efficient. By doing so, we now need only one
    network_list() call.

    Change-Id: I40d61ed9cbae4b083e4f3cec9caa269e92daf306
    Closes-Bug: #1663170

Changed in horizon:
status: In Progress → Fix Released
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → pike-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.0.0b2

This issue was fixed in the openstack/horizon 12.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.