Define some abstract methods in VpnDriver class

Define the <op>_ipsec_site_connection() methods to ensure any new
service drivers will implement them.

Closes-Bug: 1326793

Change-Id: Idfe67632893592859990db486393a7108362447e
Fix session's InvalidRequestError because of nested rollback

This patch addresses the issue by removing the extra nesting
(which is effectively redundant).

The longer story about this patch is the following:

Race conditions may cause DBDuplicateEntry exceptions that
require a transaction to be rollbacked back, and yet make
the whole operation succeed. A classic example is what has
been solved in commit fbc6b99. If the rollback is done in a
nested transaction, the above mentioned exception is raised.

To address the problem, we could use savepoints by means of
sqlalchemy's begin_nested(); Even though this approach is
preferable, it causes quite a bit of changes in the unit
tests (because of sqlite); it may also require that certain
DBMS, or certain DB backend configurations, support savepoints.

In the end, the simpler approach was chosen.

Closes-bug: #1354072

Change-Id: Ic9393319e55f71d681124bd3052e939724ebab6b
Fixing neutron-db-manage with some options other than upgrade/downgrade

"mysql-engine" argument was added to upgrade and downgrade option of
neutron-db-manage.
Reference commit: http://tinyurl.com/mzepbmq

migration environment's run_migration_offline/online() gets called
even for other neutron-db-manage options as well such as current,
history, stamp, branches etc. For those options since the argument
can not be set, it throws oslo.config.cfg.NoSuchOptError.
This fix tries to catch it and set the value accordingly.

Closes-bug: #1353180

Change-Id: I044daf04216ec61245ddb51689f8e50be5666e34
Opencontrail plug-in implementation for core resources

Adds Opencontrail plug-in implementation with unit tests
This patch has no dependency on any other blueprints
The link below describes how to install VIF driver for opencontrail
https://github.com/Juniper/contrail-controller/wiki/
OpenContrail-bring-up-and-provisioning

- The contrail_plugin_core.py is the main interface for neutron common
  infrastructure. It relays API requests to the opencontrail controller

DocImpact
Change-Id: I501bf669b2a999a171f9a3ee3e9893d4ead50e3b
Implements: blueprint juniper-plugin-with-extensions
Preserve link local IP allocations for DVR fip ns across restart

The L3 agent allocates link local address pairs used in connecting the
routers to the floating ip namespace.  When those allocations are
forgetten by restarting the L3 agent they all get rewired on restart.
This change preserves the allocations using a file in the local file
system.  Storing them in the database would be overkill and would
affect system performance.

Change-Id: I39614c7ea2a7dcc35bf969c90045adc5926ea9df
Closes-Bug: #1348306
Partially-Implements: blueprint neutron-ovs-dvr
Co-Authored-By: Rajeev Grover <rajeev.grover@hp.com>
Fix duplicate function: test_getattr_unallowed_attr

This meant only one of the two test cases was ever being run.  Renamed
one.

Change-Id: I37cfe2bb531a3f5015e729bed93d6a59d7d9c15d
Fix PortNotFound error during update_device_up for DVR

An agent's request to update the ARP entry for a VM port
may come after a deletion request has been processed,
resulting in a PortNotFound exception being raised.

This patch takes care of this condition. A test has
been added, which required a minor refactoring of the
test case class, in order to accommodate the use of
side effects for the objects being mocked.

Closes-bug: #1356120

Change-Id: I40d635bcf47c683663cb4dedf20323902dff2c7f
ML2: Make get_device_details report mac address as well

This will be used by ofagent to route packets to local VMs.

Partially-implements: blueprint ofagent-merge-bridges
Change-Id: Icaa26448a370dd75d09e95ed439df5b486a862cf
l2pop: get_agent_ports: Don't yield (None, {})

There's no point to yield None lvm with empty entries.

Closes-Bug: #1355759
Related: blueprint ofagent-l2pop
Change-Id: I42aeb48a062d35038116978d70c8dac4139a5583
Merge "Fix session's InvalidRequestError because of nested rollback"
Merge "ML2: Make get_device_details report mac address as well"
Merge "l2pop: get_agent_ports: Don't yield (None, {})"
Merge "Preserve link local IP allocations for DVR fip ns across restart"
Updated from global requirements

Change-Id: I3b7f5b18ef5b2bd257eb11669ec35397653cbc8b
NSX: lift restriction on DVR update

The restriction in place in the code is not justified considered
the capabilities of the DVR extension and the NSX backend.

Transformations of centralized routers into distributed should be
allowed.

Change-Id: I099b90d39247bc9a7adfb87344d77ccd8acfad9e
Closes-Bug: #1357048
Merge "NSX: lift restriction on DVR update"
Merge "Fixing neutron-db-manage with some options other than upgrade/downgrade"
Merge "Define some abstract methods in VpnDriver class"
Merge "Fix PortNotFound error during update_device_up for DVR"
correct getLoggers to use __name__ in code

Previousy the NSX plugin would log as NeutronPlugin. Now it contains
the whole class path like the rest of the log statements.

Change-Id: Ib27a2016a37c808c404489d11b56cc513c003ca1
Closes-bug: 1357214