Removes unnecessary Embrane module-level mocks

The embrane unit tests install a magicmock into
the system modules at the module level which
persists across all unit tests and isn't required.
This patch removes the unnecessary and limits the
life of the module mocks where they are necessary.

Partial-Bug: #1316401
Change-Id: Iaa38ee0c6821d46a6d78eefef39006df2c1c47e5
Return no active network if the agent has not been learnt yet

Sometimes the agent message to get the active networks is
processed before the agent is learnt by Neutron. Neutron throws an
error, but it should simply return no network

Change-Id: I6da0ca578cfe1fe0885138a5e2da76278f791491
Closes-bug: #1302838
Big Switch: Add missing data to topology sync

Adds data to the topology sync function that was
missing in the case where it is called from the
ML2 driver.

Closes-Bug: #1328222
Change-Id: I1cc3b0430f63f62c881f28139d1e5ebf22766357
Increase default metadata_workers, backlog to 4096

While deployment tools might want to change the number of workers
to match the number of cores (Or some fraction of it), any default
other than 1 should be outright better.

Inspired from 19:34:
https://www.youtube.com/watch?v=AF9r_VQrcJ0

DocImpact
Closes-Bug: #1323005
Change-Id: Ie90000183ae67ff391a23ca3213fd23aef5f4dc5
Fix NVP FWaaS occurs error when deleting a shared rule

It is due to the lack of edge_id query index  when deleting the
vcns_edge_firewallrule_binding entry, which leads to deleting
rule binding entrys on both edges.
Closes-Bug: #1322105

Change-Id: I1d15a06bd2a6c42f29c8258d4b9344c8e9338638
Big Switch: Catch exceptions in watchdog thread

Catch and log exceptions in the watchdog greenthread to prevent
them from stopping the periodic consistency checks.

Closes-Bug: #1330135
Change-Id: I6834c0fee0429bb72b8c61307be7bdca77f6de9b
Control update, delete for cisco-network-profile

Add new behavior to control update and delete operations for the
cisco-network-profile resource extension.
The new behavior is to allow update and delete operations only if
there are no neutron networks associated with a particular
cisco-network-profile instance

Change-Id: I000a03c1ffd5c02e7b827ec757287633e5a5dd64
Closes-Bug: #1323867
Brocade mechanism driver should be derived from ML2 plugin base class

Change-Id: Iddcb6a43d60d5c9f472912efdecbb2aaa9b7ea4a
Fixes-bug: #1327001
ovs-agent: Ensure integration bridge is created

ovs-agent will fail to launch if integration bridge(br-int by default) is not
existed. To fix this, the agent should check and create the bridge if necessary
during launching.

Closes-Bug: 1328076
Change-Id: Iaa6c4d766ca086deb28c8ef7310dbfdcef2c105f
Fix invalid IPv6 address used in FakeV6 variables

Uses RFC 5180 benchmark scope to change bad IPv6 addresses

Closes-Bug: #1328889
Change-Id: I224ec8db28d62484f5f4142cfd361162fb37e1b6
Allowed address pair: Removing check for overlap with fixed ips

Some of the overlap check has been removed in the following patch:
https://review.openstack.org/#/c/94508/
But the patch did not remove all the overlap check. I remove the
rest part.

Change-Id: I575ec54c0b3d6dc31ef80819d4258c6d162b4cfd
Closes-Bug: #1326007
When l2-pop ON, clean stale ports in table0 br-tun

When l2-pop is turned ON, the tunnels towards a
specific node are created and torn down by other nodes,
based on availability of ports on that specific node in
specific networks. This generally reclaims the resources
used for such tunnels in all the nodes.

Under such conditions, in the current code (without this
fix), the cleaned up ports continue to be present in
rules of table0 of br-tun, resulting in flow explosion.

This fix adds cleanup-logic to remove such rules that
continue to use l2-pop cleaned up ports, from table0 of
br-tun.

Change-Id: I2639ff6432a13320adcadbcc0841319a99ce8c24
Closes-Bug: #1318261
Big Switch: Import DB module in unit test

Import the portbinding db module in the Big Switch base test case
so the table gets created before the test is run. Otherwise the
tests will fail when being run with testtools because the portbinding
db isn't normally imported until a function call from the Plugin.

Closes-Bug: #1331240
Change-Id: Icbd2248a0c013c142ccf9b302a1ffa15c5a4e5ae
Big Switch: Remove unnecessary initialization code

Removes a server_timeout parameter that was never set by anything
in the Big Switch plugin and the ML2 driver.

Also eliminates an __init__ method that didn't do anything except
incorrectly log an unset server pool warning before the inheriting
class setup the server pool.

Closes-Bug: #1331249
Change-Id: I77dd22295305b96d4702f1ea0e319dc5f82c71a8
Add logging for NSX status sync cache

This patch simply adds some log statements with debug
severity for tracking events related to the NSX object
cache kept by the operational status synchronization
thread.

This will  be helpful when debugging error conditions.

Change-Id: Ieb7b44b1117048c126d275dea2b8503b85eaba04
Related-Bug: 1329560
Add missing keyword raise to get_profile_binding function

Improve corresponding unit tests.

Change-Id: I8f71ee7aa8fcafbf3ef6e3f9d4f0b89c874af73b
Closes-Bug: #1329426
Add 'ip rule ...' support to ip_lib

This change adds 'ip rule add', 'ip rule delete' and extends the IpRoute
class to support more ip commands

Change-Id: I8ba2f2d2ee896d9f4a378570be1524077d5b663c
Partially-Implements: blueprint neutron-ovs-dvr
Merge "Removes unnecessary Embrane module-level mocks"
Merge "When l2-pop ON, clean stale ports in table0 br-tun"
remove pep8 E122 exemption and correct style

This change removes the E122 exemption for pep8. E122 is "continuation line missing indentation or outdented"

Change-Id: I4bd1e6c787648a3dfa69b514efeeff05996aabc1
Partial-Bug: 1329017