neutron/neutron/tests/unit
Lujin Luo 6281fddbcb Add a unique key to port_id in routerports table
If multiple commands to add router interfaces to different routers
by the same port are executed concurrently, then all the commands
would show success.

However, there are three issues:
1. Only one router interface is actually added by the port
2. Multiple router ports records are stored in routerports table
3. The port table is updated multiple times and eventually the
last-arrived command would truly take effect

This patch adds a unique key to port_id in routerport table,
so that only the first-arrived command will insert router port
record and all later requests would raise exceptions.

Besides, port.device_id and port.device_owner in port table
needs to be updated again after routerport record is inserted.
Otherwise, in race condition the port table will store the router
information from last-arrived request. However, in routerport table,
only the first-arrived request's router information is inserted.

Change-Id: I15be35689ec59ac02ed34abe5862fa4580c8587c
Closes-Bug: #1535551
2016-08-03 08:52:53 +09:00
..
agent Merge "Refactoring config options for common config opts" 2016-07-29 19:32:50 +00:00
api Merge "Filter out subnets on different segments for dhcp" 2016-07-26 19:49:44 +00:00
callbacks Separate exception class for retriables in callbacks 2016-06-22 23:03:09 +00:00
cmd enable OVSDB native interface by default 2016-06-25 10:43:12 +03:00
common Refactoring config options for common config opts 2016-07-26 15:55:49 +00:00
core_extensions Respond negatively to tenant detachment of enforced QoS policies 2016-05-16 21:54:15 +00:00
db Merge "Filter HA router without HA port bindings after race conditions" 2016-07-29 21:44:41 +00:00
debug tests: stop validating neutronclient in neutron-debug tests 2016-01-14 06:46:45 +00:00
extensions Add a unique key to port_id in routerports table 2016-08-03 08:52:53 +09:00
hacking Add a hacking rule for string interpolation at logging 2016-07-11 22:54:56 +00:00
ipam Replace device owners hard coded strings to neutron_lib constants 2016-07-12 04:11:35 -04:00
notifiers Merge "Notify nova with network-vif-plugged in case of live migration" 2016-07-25 21:54:55 +00:00
objects tests: enable test_get_objects_queries_constant for trunk ports 2016-07-28 16:25:46 +02:00
plugins Merge "Fix for check_vlan_transparency on mech drivers not called" 2016-07-29 19:31:05 +00:00
quota Fix module's import order 2016-01-22 06:38:42 -08:00
scheduler Merge "tests: stop using ml2 plugin full import paths in tests" 2016-07-27 15:35:02 +00:00
services Merge "Add flavor/service provider support to routers" 2016-07-28 23:48:35 +00:00
tests Use neutron-lib constants 2016-06-13 14:02:35 +00:00
__init__.py Avoid eventlet monkey patching for the tempest plugin 2016-04-29 22:47:24 -05:00
_test_extension_portbindings.py Fix module's import order 2016-01-22 06:38:42 -08:00
dummy_plugin.py Make service plugins' get_plugin_type classmethods 2016-06-07 15:33:07 -05:00
extension_stubs.py Add a description field to all standard resources 2016-03-05 02:29:35 +00:00
test_auth.py Fix params order in assertEqual 2016-01-13 18:24:04 +05:30
test_context.py Support Unicode request_id on Python 3 2015-11-27 16:21:16 +01:00
test_manager.py Add the ability to load a set of service plugins on startup 2016-02-10 10:04:15 -06:00
test_opts.py Fix the sriov agent config group name 2016-05-05 16:16:08 +08:00
test_policy.py Use constants from neutron-lib 2016-04-23 21:23:56 -04:00
test_service.py Fix that api_workers=0 doesn't spawn any api workers 2016-07-29 05:40:05 -04:00
test_wsgi.py Use exceptions from neutron-lib 2016-04-21 21:29:44 -04:00
testlib_api.py New engine facade from oslo_db: Step 2 2016-07-06 16:32:43 +03:00