L3 Agent restart causes network outage

When a L3 agent controlling multiple qrouter namespaces
restarts, it destroys all qrouter namespaces even if
some of them are still in use.  As a result, network
traffic could be stopped on the VMs that use the
networks associated with these namespaces.

So what is needed is for the L3 agent to preserve those
qrouter namespaces a L3 agent instance recognizes and to
destroy those it does not know about.

Closes-Bug: #1175695

Change-Id: Idae77886bd195d773878c3d212ccfd56269216fb
Removes an incorrect and unnecessary return

The current return statement creates a new object that is
not used anywhere and does not provide a functionality

Change-Id: Id53f6fbc8cc6fb38419e5616a352279f1a9b917f
Closes-Bug: #1276367
Don't document non-existing flag '--hide-elapsed'

Closes-Bug: 1277051
Change-Id: I4435645025dabcecf3dc1b7168ce17f10d6df534
Refactor to remove _recycle_ip

Since _recycle_ip is now just a pass-through to _delete_ip_allocation
it can be removed.

Change-Id: Ifba3da902de599f748038a33ef3bd98ff77c22b9
Closes-Bug: #1269501
LBaaS: move agent based driver files into a separate dir

Replace agent based driver files from haproxy driver dir
Same for unit tests files

Finalizes blueprint lbaas-common-agent-driver

Change-Id: Ibff85a9c2e1f1c59d72616836d56a697dce72c59
Fix ValueError in ip_lib.IpRouteCommand.get_gateway()

As metric is not necessarily the 5th word of the gateway line, the
method should search the string 'metric' in the line and pick the next
word as the metric value.

Change-Id: I2663ddbae82f80b912b364c07f9ab92c5b90b718
Closes-Bug: #1267790
Add additional unit tests for the ML2 plugin

This commit adds extended unit test coverage for the ML2 plugin.py file.

Partial-Bug: 1236127

Change-Id: I2f4465c84810965679a585007cd9005ba8a7da71
Fix request timeout errors during calls to NSX controller

Sometimes two correlated exception traces are observed in
the server log for the Neutron Server backed by NSX:
RequestTimeout (The nsx request has timed out) and
OperationalError (Lock wait timeout exceeded). This is
generally described by Guru Salvatore Orlando as the,
and I quote, the "infamous eventlet-mysql deadlock".

This patch tries to address the issue by adding a
cooperative yield in the nsx client code (it’s a good idea
to call sleep(0) occasionally in any case) and also by
avoiding the unnecessary spawning of another Greenthread
within a call that is already executed in Greenthred
itself.

Closes-bug: #1267101
Related-bug: #1279497

Change-Id: I8e298468fb730f11a66fbd4211121ee7d3e2a548
Validate rule uuids provided for update_policy

Add corresponding validation method to fwaas extension

Change-Id: I643c10a996813d251684d3b5de04c8826729129f
Closes-Bug: #1281083
Fix typo in service_drivers.ipsec

Closes-Bug: #1280597

Change-Id: If2238d66af4db1b0134bbd6407b2229b4af363ee
tests/unit: Initialize core plugin in TestL3GwModeMixin

TestL3GwModeMixin can fail randomly because it doesn't initialize
core_plugin and can be run random core plugin depending on execution
order of tests. It also fails with core plugin uninitialized when it
is run without other tests.

This patch refactors the setup code of core plugin and apply it to the
related tests.
This patch reveled the same bug of test_metaplugin.py which is also
fixed by this patch.

Closes-bug: #1273259
Change-Id: I3c1d4d8b3d69262b89c7747daa8267bf2c8e7f6b
Add support to request vnic type on port

This patch adds support for requested vnic_type to be plugged to neutron port to ML2 plugin.
This patch contains:
1. New attribute 'binding:vnic_type' added to port binding extension.
   Possible values are 'direct', 'macvtap' and 'normal'.
   'binding:vnic_type' is allowed to be defined on port creation or changed
   on port update by admin or tenant user.
   'binding:vnic_type' can be also skipped in port defintion
2. Management of vnic_type by ML2 plugin, assuming default
vnic_type=normal
3. Add 'vnic_type' to ml2_port_bindings DB table
4. Add supported vnic_types for MechanismDrivers that are capable to bind
port.
5. Add DB migration script for ml2_vnic_type.

DocImpact: Need to update portbindings API docs and include in SR-IOV user docs

Change-Id: Ic88708fa9ece742f807c1d09bb49e499f99bd092
Implements: blueprint ml2-request-vnic-type
BigSwitch: Move config and REST to diff modules

No functionality change. Separates the config,
rest call, and backend server management from
the main plugin.py file. Necessary to make
downstream patches more managable and easier
to review.

Implements: blueprint bigswitch-separate-server-module
Change-Id: Ie1fd18a9d8cde24945513c06f7b62239202258a3
Copy cache package from oslo-incubator

Related-Bug: #1276440
Change-Id: I7aaf8ae2eb909816d85092baa5c111f00e60d2c7
vshield task manager: abort tasks in stop() on termination

This patch kills the manager thread, and aborts active tasks
rather than sending an exception to the manager thread and
have it do the abort on termination.

Unit tests involving vshield task manager might take longer
as a side effect of this patch.

Related-bug: #1282452

Change-Id: I9e9e41ce7e8969a2ea51bfce96b1303125a24308
Merge "vshield task manager: abort tasks in stop() on termination"
Merge "Validate rule uuids provided for update_policy"
Sync minimum requirements

Change-Id: I1a0653058f1f8085918d7c43147d6b2631acb013
Closes-bug:1280941
Use different context for each API request in unit tests

test_router_add_interface_subnet_with_port_from_other_tenant in
neutron.tests.unit.test_l3_plugin.L3NatTestCaseBase was mocking
neutron.context.Context thus performing multiple API requests
with the same context instance. As a context instance also has
a DB session attribute, this might cause unexpected side effects,
especially for plugins which process request asynchronously.

The plugin neutron.plugins.nicira.NeutronServicePlugin was being
affected.

This patch ensures each request has a different context object
without changing the unit test semantics.

It also refactors slightly test_edge_router.py in the nicira
unit test package to avoid executing twice the same unit tests.

Change-Id: I4895faa00ebd915eb9e259930db2d004a9e78a86
Closes-Bug: #1280035
Merge "Refactor to remove _recycle_ip"