]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Check for 'removed' in port_info before reference
authorKevin Benton <blak111@gmail.com>
Tue, 2 Jun 2015 23:52:14 +0000 (16:52 -0700)
committerKevin Benton <kevinbenton@buttewifi.com>
Thu, 11 Jun 2015 18:36:15 +0000 (18:36 +0000)
commitc49c9c528680fa63faf0cbb382b11f42a790358f
tree5a5d0511dd4218079933a3bc39645bfb6bf5802e
parent3acb1ce2747c7ea1498de48b05bdc319f20038ea
Check for 'removed' in port_info before reference

scan_ports can return early on no changes, in which case
'removed' won't be present in the dict. The deleted_ports
logic wasn't setup to handle that.

This patch checks for the key before trying to reference it.

Change-Id: I0e2c6d76515ad8e2a2addc8d40451ac003a150f7
Closes-Bug: #1461325
(cherry picked from commit 75f3aaa4cc42c2c1280f6c578e27e64cff8f860c)
neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
neutron/tests/unit/plugins/openvswitch/agent/test_ovs_neutron_agent.py