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
Remove unused RPC calls from n1kv plugin code

Change-Id: I75a70786827a5fd6c321b560f1f2ef02a69aa85d
Closes-Bug: #1275166
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
Parse JSON in ovs_lib.get_vif_port_by_id

This patch replaces regex matching of text output with parsing
of JSON output in ovs_lib.get_vif_port_by_id.
This makes the code more reliable as subtle, possibly even
cosmetic, changes in ovs-vsctl output format could cause the
regular expression match to fail.

Also, this makes the code consistent with ovs_lib.get_vif_port_set
which already uses JSON output.

Finally this patch slightly changes the behaviour of
ovs_lib.get_vif_port_by_id returning None if elements such as
mac address or ofport were not available.

Change-Id: Ia985a130739c72b5b88414a79b2c6083ca6a0a00
Closes-Bug: #1280827
Add update from agent to plugin on device up

Add RPC message to plugin on device up once configured.
Update device details attribute to use segmentation_id
instead of vlan_id.

Change-Id: I9be8389c01c4c29025bbe868919e39fde3251a58
Closes-Bug: #1242532
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
Imported Translations from Transifex

Change-Id: Iacb4571f529a6697aa722fc88f0ca1b40fe61e8c
Revert "Skip a test for nicira service plugin"

This reverts commit 95807c9436be7eb34fe37289d76fb4611ab77783.

Change-Id: I03dc9bb99b8372bfa4bb05246916b856569969f7
Merge "Remove unused RPC calls from n1kv plugin code"
Merge "Imported Translations from Transifex"
Merge "Revert "Skip a test for nicira service plugin""
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