Ensure DB pooling code works with newer eventlet versions

Bug 1097992

Change-Id: Id14697a0a4815d0aacbae769bf538a96d6846567
NVP metadata access - create elevated context once

Bug 1155051

Create elevated context in handle_metadata_access_network and then
pass it to the create or remove function.

Change-Id: Id8f81419fbbc3616e216e4da0c16898757905933
Add bulking support for Cisco plugin

For each bulk request, the Cisco plugin will handle the call,
and, through the base class method, convert them into a series of
non-bulking calls wrapped in a transaction (emulated bulking).

Those non-bulking requests will all be forwarded to the Cisco
model (VirtualPhysicalSwitchModelV2), which will either handle
the request locally (as in create_port), or delegate the request
to the OVS plugin (OVSQuantumPluginV2).

As a result, the model should not receive any bulking calls.
However, the model was set up to delegate any bulk calls to the
OVS plugin (which would act like the existing code, in case we
decide later to pass along any bulk calls). An alternative would
be to raise an exception, if a bulk call was made to the model.

Prior to this change, all bulking calls were forwarded from the
Cisco plugin to the model plugin, which would would delegate
(directly or indirectly) to the OVS plugin. The OVS plugin would
turn the request into a transction of non-bulking calls.

The effective difference proposed is that the create_port will now
create the port in OVS and then create the network in the Nexus
plugin.

The Nexus plugin does not currently handle bulking so this commit
is implementing emulated (versus native) bulking.

This patch has been updated with latest from upstream (Havana).

blueprint bulk-api-cisco-plugin
Change-Id: I874295b32ea20c2ca393228b0893a9dd6c77baf2
Merge "Add bulking support for Cisco plugin"
Imported Translations from Transifex

Change-Id: I27566fdd84cb400628a4aa2a95fd1026e8606072
Fix DB query returning ready devices in LoadBalancerCallbacks

fixes bug 1156782

Change-Id: I6efdb32955c1b1f8f3dec7b3b1581e97ea0af4d8
Merge "Fix DB query returning ready devices in LoadBalancerCallbacks"
Fix typo in policy.json and checks in nicira plugin

Bug 1155379

This patch removes extra colons from policy.json.
Also, it fixes some checks in the nicira plugin which were not
passing correctly the target resource for the policy engine.

Change-Id: I89a1d170818173eaa90b50158289a06455febadc
Imported Translations from Transifex

Change-Id: I7e5b222e5b8609631f955dc552412ff0023dff46
Merge "Imported Translations from Transifex"
Merge "NVP metadata access - create elevated context once"
Ensure that lockfile are defined in a common place

Fixes bug 1158146

Change-Id: I0e986eb16a7ec5b9972a37af583f697ba3624a80
use the fact that empty sequences are false

fixed bug #1156473

Change-Id: I43470eb884107111cbea958868f4cf8241c8d6e6
Fix issues with db pooling

Fixes bug 1157045

In addition to this a cast is used instead of a call for the
report update.

Change-Id: I1b0ea5b18b3d75dc3d047975b234275420af189c
adding parameter to configure QueuePool in SQLAlchemy

This patch introduces the parameter sqlalchemy_pool_size.
The parameter is used to configure the QueuePool, created
in configure_db(). At the moment the configuration of the
pool is only possible when using eventlet's db_pool for
MySQL (sql_dbpool_enable = True).

Change-Id: I64dec2863c1ee88215ef9b28054ba3bfaafa3b32
fixes: bug #1158235
Fix race condition in dhcp agent

This patch fixes a race condition that can happen in the dhcp agent when
a subnet is created and then a host route is then immediately added to that
subnet following a subnet.update.end notification. The race condition occurs
in refresh_dhcp_helper() where self.enable_dhcp_helper() gets called twice
since the first call had not completed self.cache.put(network). This same race
condition can also occur in the other events so lockutils.synchronized() is
added to synchronize those code segments as well.

Fixes bug 1155748

Change-Id: I2ff52adc3dfebddd6d9c15d5dc79aa65be107179
NVP metadata access - create elevated context once

Bug 1155051

This is a follow-up patch which fixes a problem with elevated
context not being passed to subroutines.

Change-Id: Ic270d8e48075b6b58117970ab870c3fb3962d93b
Imported Translations from Transifex

Change-Id: Ib20d6e551d180d84c4246a9e9684f09d5a018312
Merge "Imported Translations from Transifex"
Merge "adding parameter to configure QueuePool in SQLAlchemy"