neutron/neutron/tests/unit/openvswitch
Salvatore Orlando 231010bdf2 Do not mark device as processed if it wasn't
Currently treat_devices_added_or_updated in the OVS agent skips
processing devices which disappeared from the integration bridge
during the agent loop.
This is fine, however the agent should not mark these devices as
processed. Otherwise they won't be processed, should they appear
again on the bridge.

This patch ensures these devices are not added to the current
device set.

The patch also changes treat_devices_added_or_updated. The
function now will return the list of skipped devices and not
anymore a flag signalling whether a resync is required.
With the current logic a resync would be required if retrieval
of device details fails. With this change, the function
treat_devices_added_or_updated will raise in this case and the
exception will be handled in process_network_ports.

For the sake of consistency, this patch also updates the
similar function treat_ancillary_devices_added in order to
use the same logic.

Finally, this patch amends an innaccurate related comment.

Closes-Bug: #1329546

Conflicts:
	neutron/plugins/openvswitch/agent/ovs_neutron_agent.py

Required changes:
- fetch all device details first before proceeding with handling ports
  to reflect Juno behaviour.
- unit test was modified to run with get_device_details since
  get_devices_details_list is not available in Icehouse.
- fixed E128 violation in the backported code.

Change-Id: Icc744f32494c7a76004ff161536316924594fbdb
(cherry picked from commit 90fedbe44c)
2014-07-23 15:35:47 +02:00
..
__init__.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
test_agent_scheduler.py Utilizes assertIsNone and assertIsNotNone 2013-10-03 23:01:48 +00:00
test_openvswitch_plugin.py Add enable_security_group option 2014-03-21 00:50:15 +01:00
test_ovs_db.py Fix bug:range() is not same in py3.x and py2.x 2014-03-11 16:44:47 +08:00
test_ovs_defaults.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
test_ovs_lib.py Default to setting secure mode on the integration bridge 2014-06-09 20:08:52 +00:00
test_ovs_neutron_agent.py Do not mark device as processed if it wasn't 2014-07-23 15:35:47 +02:00
test_ovs_rpcapi.py Replace stubout with fixtures 2013-11-24 10:46:08 -05:00
test_ovs_security_group.py Removes calls to mock.patch.stopall in unit tests 2014-03-12 04:17:11 +00:00
test_ovs_tunnel.py ovs-agent: Ensure integration bridge is created 2014-06-19 10:22:55 +00:00