← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1527113] Re: Code duplication in neutron/api/v2attribute.py

 

Reviewed:  https://review.openstack.org/258867
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=dd5f5716c9a32634caa2a44d362cd77461ba873d
Submitter: Jenkins
Branch:    master

commit dd5f5716c9a32634caa2a44d362cd77461ba873d
Author: Hong Hui Xiao <xiaohhui@xxxxxxxxxx>
Date:   Thu Dec 17 03:26:56 2015 -0500

    Remove duplicated code in attribute.py
    
    The _validate_XXX_list functions in [1] are mostly duplicated, this
    patch will use one function to validate list of items and remove
    others.
    
    [1] neutron/api/v2/attributes.py
    
    Change-Id: I86905018914becb64451941f0ecb06be30f2c740
    Closes-Bug: #1527113


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1527113

Title:
  Code duplication in neutron/api/v2attribute.py

Status in neutron:
  Fix Released

Bug description:
  Found this when reviewing code.

  neutron/api/v2attribute.py may validate list of items, there are
  different functions to validate list of different items. The code are
  mostly duplicated in [1-3]. And more can be expected in future.




  [1] https://github.com/openstack/neutron/blob/b8d281a303ca12440aebb55895ebb192d25cecf8/neutron/api/v2/attributes.py#L121
  [2] https://github.com/openstack/neutron/blob/b8d281a303ca12440aebb55895ebb192d25cecf8/neutron/api/v2/attributes.py#L350
  [3] https://github.com/openstack/neutron/blob/b8d281a303ca12440aebb55895ebb192d25cecf8/neutron/api/v2/attributes.py#L411

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1527113/+subscriptions


References