ofagent: Add a missing push_vlan action

Fix the flow for _provision_local_vlan_inbound_for_tunnel
to push-vlan explicitly.  While the old code happened to
work with older versions of OVS, it was spec-wise incorrect because
it failed to meet the prerequisite of the following set-field.
The latest version of OVS correctly rejects such a flow.

Closes-Bug: #1308927
Change-Id: I66221eec0cb4083d178d7d5651360ee1874e3d1b
Add 'secret' property for 'connection' option

Neutron cli registers 'connection' option without
'secret=True' property. This commit makes sure
'connection' option has 'secret' property when
it is registered.

Change-Id: I0b0a5aca44a8eeee1c12513f30b9559f1d008442
Closes-Bug: #1319651
NSX: replace strong references to the plugin with weakref ones

This is done in accordance to a refactoring done in change 92793.

Partial-bug: #1234857

Change-Id: Iaf2bc93182c01e62bb755b4e3f104f5a926b73fc
Make linux.utils.execute log error on return codes

Previously, the execute method in neutron logs everything as debug which hides
a lot of extremely fatal errors like unable to apply security group rules!
This patch changes this code so that we log all non 0 returns as error.

Change-Id: I7328e62269212ccd9c7950ff064a3e337de56918
Closes-bug: 1323832
Related-bug: 1322945
Handle errors from run_ofctl() when dumping flows

The function dump_flows_for_table() calls run_ofctl(). If this occurs during an OVS
restart, run_ofctl() will return None. dump_flows_for_table() needs to realize this
and not try to call splitlines() on a None object.

Change-Id: Ide26028656e634113f955dfc89569149d4d5b306
Closes-Bug: #1324659
Remove unnecessary MagicMocks in cisco unit tests

Two patches that just return static data never have
assertions made on the MagicMocks generated. This
replaces the magicmocks with lambdas to make the code
easier to read and to get a minor performance gain.

Change-Id: I064c57a66a0f7a8e3080f39cf48bd4b67cf304e3
Partial-Bug: #1316401
Remove function replacement with mock patch

In the hyperv unit tests, an rpc method is
manually replaced with a MagicMock using setattr.
This prevents it from being cleaned up by mock.patch.stopall.
This patch replaces it with a short-lived patch call
in a with statement.

Change-Id: I7b10a8115c474977e3acd16dc49d6f3ae67b0c3b
Partial-Bug: #1316401
Merge "Handle errors from run_ofctl() when dumping flows"
Merge "Make linux.utils.execute log error on return codes"
NSX: fix invalid docstring

Updated the text of docstring.

Change-Id: Ic82fe4719c8b04d01cfb5ebb69411f2f35e7f646
LBaaS add missing rootwrap filter for route

If one runs the lbaas agent from packages and does not have the l3-agent
installed on the same box as the lbaas agent it will fail to add the
default gw route. This is because it's missing the rootwrap filter for
route which is only present in l3.filters.

Change-Id: I59cd0a549a1f1d1564d139d42daf55d02898bf76
Closes-bug: 1325406
Merge "NSX: replace strong references to the plugin with weakref ones"
Merge "Remove unnecessary MagicMocks in cisco unit tests"
Merge "Remove function replacement with mock patch"
Merge "LBaaS add missing rootwrap filter for route"
Merge "Add 'secret' property for 'connection' option"
Merge "ofagent: Add a missing push_vlan action"
Merge "NSX: fix invalid docstring"
Added migration scripts for object model refactor

Change-Id: Ib018925110be09ab556748000994165c303e1136
Added db models

Change-Id: Ia5e92def777ebbed7dc15bc9d07d1533ab9f0339