neutron/neutron/tests/unit/openvswitch
Salvatore Orlando 3c44da1a96 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
	neutron/tests/unit/openvswitch/test_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.

Additional changes in Havana:
- modified patch not to pass ovs_restarted argument into
  treat_devices_added_or_updated() since it's not present in Havana.
- disabled test_schedule_pool_with_down_agent that fails in gate.

Change-Id: Icc744f32494c7a76004ff161536316924594fbdb
(cherry picked from commit 90fedbe44c)
(cherry picked from commit 231010bdf2)
2014-09-15 17:30:28 +02:00
..
__init__.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
test_agent_scheduler.py Ensure router exists when auto_schedule_routers 2013-09-26 22:48:46 +08:00
test_openvswitch_plugin.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
test_ovs_db.py Use assertEqual instead of assertEquals 2013-08-29 13:46:04 +08:00
test_ovs_defaults.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
test_ovs_lib.py Fixing lost vlan ids on interfaces 2014-09-08 12:38:29 +02:00
test_ovs_neutron_agent.py Do not mark device as processed if it wasn't 2014-09-15 17:30:28 +02:00
test_ovs_rpcapi.py change port status only if port is bound to the good host 2013-10-08 11:02:55 -04:00
test_ovs_security_group.py Implement Allowed Address Pairs 2013-09-05 03:53:59 -07:00
test_ovs_tunnel.py Improve handling of security group updates 2014-04-10 10:43:13 -04:00