Fix UnboundLocalError raised during L3 router sync task

This can be fixed in a number of ways: a) consolidating the
two except clauses into one; b) adding a 'return' after the
last except clause c) by calling the cleanup method only on
success; d) initializing 'routers' before usage.

Approach c) has the benefit of stating the developer's intent
more explicitly and minimize chances of regression.

Closes-bug: #1336566

Change-Id: Ib91ac5bb07869cbec6825b60d7c4c5b23c4c4d3a
Fixed spelling mistake in securitygroups_rpc

Fixed spelling mistake in a doctext.

Change-Id: I04a44521403aa00048c875b44a3c0bf5ce8a6c4b
Updated from global requirements

Change-Id: I128b621ecb9f54db5054e24a8db807e2722ce619
Add a link to a blog post by RedHat that discusses GRE tunnels in OVS

Change-Id: I6f3f458eadac12bcb907a2ee6b5d795b8e9593e2
Fix 'server_default' parameter usage in models

In ml2 models parameter 'default' is used for vnic_type, profile and
vif_details, but in migrations 27cc183af192_ml2_vnic_type,
157a5d299379_ml2_binding_profile and
50d5ba354c23_ml2_binding_vif_details is used 'server_default' parameter.
Usage 'default' and 'server_default' should be equal in models and
migration. So models in models is added 'server_default' parameter.

Partial-bug: #1295539

Change-Id: If6a17f381d2550daf64916ad3c1b120f41406d56
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

Change-Id: Icc744f32494c7a76004ff161536316924594fbdb
Merge "Fix UnboundLocalError raised during L3 router sync task"
Merge "Add a link to a blog post by RedHat that discusses GRE tunnels in OVS"
Imported Translations from Transifex

Change-Id: Id49bf1194e06adfcda63a706e95de504a6f5fb5b
Merge "Updated from global requirements"
Merge "Fix 'server_default' parameter usage in models"
Merge "Imported Translations from Transifex"
Merge "Do not mark device as processed if it wasn't"
Merge "Fixed spelling mistake in securitygroups_rpc"
Extract CommonDBMixin to a separate file

db_base_plugin_v2 imports too much modules that are not necessary
usually, so extract CommonDBMixin in different file.
Plus using db_base_plugin_v2 for some types of modules can lead to
cycles in imports, this refactoring should resolve the issue.

Closes-Bug: #1340145
Change-Id: Idb027d7c5cee2d5bc7598f805c56c55fd4aca048
New extension for version 2 of LBaaS API

Partially-implements: blueprint lbaas-api-and-objmodel-improvement

Change-Id: I43270fdf9cd52a57274575ecea502f660ff0d5a9
Co-authored-by: Brandon Logan <brandon.logan@rackspace.com>
Co-authored-by: Vijayendra Bhamidipati <vbhamidipati@paypal.com>
Plugin/DB additions for version 2 of LBaaS API

Added alembic migrations, models, db methods and plugin methods.
Added DEFERRED status for entities not linked to a load balancer.

Partially-implements: blueprint lbaas-api-and-objmodel-improvement

Change-Id: Iaec2c2315ae54418b341eb31e6b3ff53b02ca9d7
Co-authored-by: Brandon Logan <brandon.logan@rackspace.com>
Co-authored-by: Vijayendra Bhamidipati <vbhamidipati@paypal.com>
Co-authored-by: Craig Tracey <Craig.Tracey@gmail.com>
Tests for extension, db and plugin for LBaaS V2

Adding needed driver interface changes for tests.
Adding LoggingNoop driver needed changes for tests.
Adding extension, plugin, and db unit tests.

Partially-implements: blueprint lbaas-api-and-objmodel-improvement

Change-Id: I1f7762bf3c9484b8bf46ce32ab78574aa081324b
Co-authored-by: Brandon Logan <brandon.logan@rackspace.com>
Co-authored-by: Phillip Toohill <phillip.toohill@rackspace.com>
Co-authored-by: Doug Wiegley <dougw@a10networks.com>
Plugin/DB additions for version 2 of LBaaS API

Added alembic migrations, models, db methods and plugin methods.
Added DEFERRED status for entities not linked to a load balancer.

Partially-implements: blueprint lbaas-api-and-objmodel-improvement

Change-Id: Iaec2c2315ae54418b341eb31e6b3ff53b02ca9d7
Co-authored-by: Brandon Logan <brandon.logan@rackspace.com>
Co-authored-by: Vijayendra Bhamidipati <vbhamidipati@paypal.com>
Co-authored-by: Craig Tracey <Craig.Tracey@gmail.com>
Tests for extension, db and plugin for LBaaS V2

Adding needed driver interface changes for tests.
Adding LoggingNoop driver needed changes for tests.
Adding extension, plugin, and db unit tests.

Partially-implements: blueprint lbaas-api-and-objmodel-improvement

Change-Id: I1f7762bf3c9484b8bf46ce32ab78574aa081324b
Co-authored-by: Brandon Logan <brandon.logan@rackspace.com>
Co-authored-by: Phillip Toohill <phillip.toohill@rackspace.com>
Co-authored-by: Doug Wiegley <dougw@a10networks.com>