Switch to using spawn to properly treat errors during sync_state

Changes f1b9ac5a and 9f6ff7e3 were aimed at improving the robustness
of the sync_state method. However both missed switching from spawn_n
to spawn to properly deal with raised exceptions.

Change-Id: Ieda4a5ecca63de67d8a9757962e7e3383fd9c9ea
Related-bug: #1257514
Update common network type consts to same origin

This patch removes new definitions of common network type constants (TYPE_FLAT,
TYPE_LOCAL, etc.) and modifies uses of aforementioned constants to a common
place where constants are defined (neutron.plugins.common.constants). This
patch does not change values that are equal in value but different in name:
NETWORK_TYPE_FLAT vs TYPE_FLAT. A second changeset will be made to handle that
case.

Unit tests were modified as well when they referred to the constant.

Finally, the ovs agent code refers to the OVS plugin constants directly and
these had to be changed as well. A TODO flag was put in that file due to use
of another plugin specific constant.

Network types that were only defined in a single plugin, such as mellanox's
infiniband (IB) network type was not carried over to the common constants file.

Fixes-bug: #1196170

Change-Id: Ib6bfc8275496a24bf247946d177c734b62ae44bb
fix --excluded of meter-label-rule-create is not working

rule['excluded'] is boolean type, should not be compared with 'true'

Closes-Bug: #1248002
Change-Id: Ie78c307ede1f7124c58354825a411474ff6c1234
Updates tox.ini to use new features

tox 1.6 allows us to skip the sdist step, which is slow. This does that.
It also allows us to override the install line. In this case, it's
important as it allows us to stop getting pre-release software we
weren't asking for.

Original patch by Monty Taylor, talked about here:
http://lists.openstack.org/pipermail/openstack-dev/2013-September/015495.html

Change-Id: I87f172cfcc44c9afff9c5162791d6c6b31972702
NVP plugin: Avoid timeouts if creating routers in parallel

There is a well-known issue of eventlet causing deadlocks with
mysql transactions; such condition might occur when
creating NVP routers in parallel.

To avoid this, this patch moves the long-running method
_update_router_gw_info outside of the mysql transaction, adding
the appropriate failure management code, and adds a lock to the
method _nvp_create_ext_gw_port, to ensure serial access to it.

Unit tests for verifying correct behaviour in case of failures
are added as well.

Closes Bug: #1251847

Change-Id: I2864e2f5bfd3982875ef9df97186f64a9fcaa0e0
NVP plugin: Do backend router delete out from db transaction

Performing the NVP API operation from within a DB transaction
increases the risk of a deadlock between sqlalchemy and eventlet.

With this patch, the operation is moved outside of the db transaction
and appropriate mechanism are put in place for:
i) ensuring neutron db consistency in case of NVP failures
ii) avoiding deleting from backend if neutron logic does not allow it

This patch also synchronizes the routine for removing a router
gateway port from NVP.

Change-Id: I58d156e303e7a56ceb8c62766c192e154b0a3bb4
Closes-Bug: #1258150
Revert "move rpc_setup to the last step of __init__"

This reverts commit f691ebe03916a78cbf18017d628a28b17f147700.

Change-Id: Idc0bb0e4401e2561f2d8e3132f14df14b7537448
Partial-Bug: #1253896
Merge "Updates tox.ini to use new features"
Merge "Revert "move rpc_setup to the last step of __init__""
Imported Translations from Transifex

Change-Id: Ib37e90be421f09b9e9d3324f7b3152b87226ac99
Merge "NVP plugin: Do backend router delete out from db transaction"
Include lswitch id in NSX plugin port mappings

This patch adds the logical switch identifier in the model class
for describing mappings between neutron and nsx switch ports.
This will allow for a better handling of the chained logical switch
use case.

This patch also moves the routines for retrieving nsx identifiers
in a separate module in preparation for the introduction of async
operations and renames relevant model classes, attributes, and
functions from 'nvp' to 'nsx'.

Related to blueprint nvp-async-backend-communication
Related to blueprint nicira-plugin-renaming

Change-Id: I5fa1e8f0d863b7d1fc278ffdeac8acc076a843e8
Nicira: Fix core_plugin path and update default values in README

The following patch fixes the core_plugin path in the README file
which broke during the rename of quantum to neutron here ee3fe4e8.
This patch also updates a few of the default values and removes
the promise of adding support for multiple control clusters.

Issue reported by: Ben Lin <blin@nicira.com>

Change-Id: Ia46d80384efaa220685f98afa591177d00021362
Closes-bug: #1260550
Merge "Switch to using spawn to properly treat errors during sync_state"
Imported Translations from Transifex

Change-Id: I2b76e7d72593ce2ae6b1299257a917f01d8788ea
NVP: propagate net-gw update to backend

When a network gateway's name is updated, propagate the
update to the backend.

Closes-Bug: #1261334
Change-Id: Icaae84e7f5373946e8c82e0e519528409925dd9d
Merge "Update common network type consts to same origin"
ml2: gre, vxlan type driver can leak segment_id

When multiple region of segment_id is specified, segment_id can leak
(will be never reused) on deletion of network.

Change-Id: Ia27b7e2c0ff4ab58be304e54123a679a5e35ab00
Closes-Bug: #1260262
Merge "Imported Translations from Transifex"
ml2/type_gre: Adds missing clear_db to test_type_gre.py

GreTypeTest.setUp() in test_type_gre.py should have
self.addCleanup(db.clear_db). This patch adds it.

Change-Id: I1f2ac5d2cae47812591fc5b50099053a4ad9ba85
Closes-Bug: #1261593