Redundant code in quantum.api.v2.base.create()

Bug #1093390 reported by Zhongyue Luo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Zhongyue Luo

Bug Description

The quota check routine has duplicated code between collections and one item.
It can be refactored to use the same code by creating a item list for both cases.
i.e
       if self._collection in body:
                # Have to account for bulk create
                items = body[self._collection]
            else:
                items = [body]

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

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

Changed in quantum:
assignee: nobody → Zhongyue Luo (zyluo)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/18612
Committed: http://github.com/openstack/quantum/commit/1ad371422f35e238b4b40ed4ec744f9ac75f209d
Submitter: Jenkins
Branch: master

commit 1ad371422f35e238b4b40ed4ec744f9ac75f209d
Author: Zhongyue Luo <email address hidden>
Date: Mon Dec 24 11:49:46 2012 +0800

    Removes redundant code in quantum.api.v2.base.create()

    Handles collections and one item in one routine by creating a items list

    Fixes bug #1093390

    Change-Id: I24b892ebff52889f17ed9ea8d17e8964e3de25f6

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: grizzly-2 → 2013.1
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.