Fix DetachedInstanceError for Agent instance

The stacktrace observed seems to hint to a
situation where a session is not properly
rolled back when duplicate agent entries are
found.

Since it is ok to deal with duplicates, the
addition of agents to the DB must be done
one by one, otherwise we go against the
ATOMICITY property of a transaction of all
or none. It's either that or I am barking at
the wrong tree.

This patch also added UT to cover affected
code.

Closes-bug: 1282421
Related-bug: 1282253

Change-Id: Ic5f77808cc10f885d67f5a9cf3b3836283692850
NSX: passing wrong security_group id mapping to nsx backend

When the async secgroup work was added the update_port() code was not changed
to pass in the nsx security_group uuids. This patch fixes that so that the
nsx uuids are passed in instead of neutron.

Closes-bug: #1287419

Change-Id: I1a075564f2548764de15b85b2970b5f360412eb2
Replaces network:* strings by constants

This patch replaces all occurences of the strings
prefixed by network:* by their constant equivalent.

Closes-bug: #1270863
Change-Id: I149cc0ab7bde08ea83057e6c0697f668edbe29db
Add OpenDaylight ML2 MechanismDriver

This commit adds support for OpenDaylight as an ML2 MechanismDriver. The
ODL MechanismDriver does not need an agent since ODL itself handles
programming bridges, tunnels, and ports on the host.

Implements bp ml2-opendaylight-mechanism-driver

Change-Id: Ic1612cd3e8efd39e74a7ed8cff28e91b1f388971
Imported Translations from Transifex

Change-Id: Ia38baf018f201f8c1bfac3363e93587d491accb4
Merge "Fix DetachedInstanceError for Agent instance"
NEC plugin: delete old OFC ID mapping tables

Before Grizzly release, data format of OFC ID mapping tables was changed
and there are two types of ID mapping tables for old and new format.
This commit migrate data from old mapping tables into new tables,
drop old mapping tables and remove the logic handling the old tables.

In the db migration scripts, built-in compiler of sqlalchemy does not
support "INSERT INTO table (col1, col2,...) (SELECT ....)" format,
so a custom sqlalchemy.expression compiling method is defined.

Closes-Bug: #1286733
Change-Id: I7dae6b728ab9e10f1dc5d63418a69ee4c26354ea
Merge "Replaces network:* strings by constants"
Merge "NEC plugin: delete old OFC ID mapping tables"
Merge "NSX: passing wrong security_group id mapping to nsx backend"
Merge "Add OpenDaylight ML2 MechanismDriver"
Merge "Imported Translations from Transifex"