l3_db add/remove_router_interface: interface_info validation is incomplete

Bug #1325982 reported by Oleg Bondarev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Edgar Magana

Bug Description

L3_NAT_db_mixin add_router_interface() and remove_router_interface() methods check that interface_info is not empty but don't check that it contains any of expected parameters - port_id or subnet_id:
 if not interface_info:
   msg = _("Either subnet_id or port_id must be specified")
   raise n_exc.BadRequest(resource='router', msg=msg)

Expected parameters should be explicitly checked.

Tags: l3-ipam-dhcp
description: updated
tags: added: l3-ipam-dhcp
Edgar Magana (emagana)
Changed in neutron:
assignee: nobody → Edgar Magana (emagana)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit eb8973dc34901406f4ca8e47956cde5c43ca54c6
Author: Edgar Magana <email address hidden>
Date: Thu Jun 5 16:33:16 2014 -0700

    Validate expected parameters in add/remove router interfaces

    The add and remove router interface methods check that interface_info
    is not empty but don't check if it contains any of expected parameters:
    port_id and subnet_id
    This patch adds a helper method to validate that interface_info contains
    at least one of the expected parameters
    Include a unit test for the empty port_id and subnet_id case

    Closes-Bug: #1325982

    Change-Id: Ia370565235a33a847704b972c875d8f1573306c0

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