]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Validate expected parameters in add/remove router interfaces
authorEdgar Magana <emagana@gmail.com>
Thu, 5 Jun 2014 23:33:16 +0000 (16:33 -0700)
committerEdgar Magana <emagana@gmail.com>
Fri, 11 Jul 2014 21:28:59 +0000 (14:28 -0700)
commiteb8973dc34901406f4ca8e47956cde5c43ca54c6
treeb65b5d0631bd8cccb7473a0bcc001d7002a12b2f
parentc5169571bd6ebfadaf9fb61757efdcdaa24fd01b
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
neutron/db/l3_db.py
neutron/tests/unit/test_l3_plugin.py