]> 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 <blak111@gmail.com>
Wed, 3 Jun 2015 00:04:49 +0000 (17:04 -0700)
commit75f3aaa4cc42c2c1280f6c578e27e64cff8f860c
tree074e0b129e04d9dc2e94c58e179afc8399c2a4f1
parent26747e5cbff14e7a03d6c0658452af6f4444085a
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
neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
neutron/tests/unit/plugins/openvswitch/agent/test_ovs_neutron_agent.py