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
Fix pool statistics for LBaaS Haproxy driver

Total connections was mapped to none of the counters
of haproxy. Active connections was mapped to active request
counter(qcur)) of haproxy which in low load situations
always remains zero.

Patch maps connections API counters to haproxy session counters
and fixes unit test accordingly.

Change-Id: I0ef4f76a75340232eb11a9b95453769ecd89d13a
Closes-Bug: #1319361
Added missing core_plugins symbolic names

Some plugins miss short symbolic name in setup.cfg, specifically Nuage
and Metaplugin.

Change-Id: I0198ae98654bbdddf8f2ba8dd3b80d0d447d6341
Closes-Bug: 1324487
Notify systemd when starting Neutron server

systemd is notified only when Neutron is started with multiple api
workers. This patch adds systemd.notify_once() call when starting
Neutron server with api_workers=0

Change-Id: I95581dc5dffde6168c68d9f04cf8bdfcdb773ba8
Closes-Bug: #1330532
Merge "Added missing core_plugins symbolic names"
Merge "Add logging for NSX status sync cache"
Configure agents using neutron.common.config.init (formerly .parse)

After oslo.messaging port is done, we'll need to initialize RPC layer
from all RPC agents. We'll put initialization into init() function, so
the first step for migration is to make agents use it.

The function is renamed to be explicit about the fact that we don't just
parse configuration by calling it, but also do other common
initializations, like setting RPC layer.

blueprint oslo-messaging

Change-Id: I71c62f270ac7a1ff1426a3f49a32133b65580e35
Don't instantiate RPC clients on import

In oslo.messaging port, we'll need to make sure no RPC clients or
servers or notifiers are created before RPC layer is initialized using
n_rpc.init(). This means that there should be no global objects that
create those objects on __init__.

There should also be no such class attributes because in that case
import will itself instantiate the object, probably before RPC layer is
ready.

blueprint oslo-messaging

Change-Id: Ia8a9fd39777c75e4253f5518c2de6be551cc365b
Don't explicitly call .stop() on mock.patch objects

BaseTestCase already cleans up all mocks via .stopall(), so there is no
need to do it in each test case.

Change-Id: I7165ea9682a3dce3a76e90e309b763c939729d84
Make sure we call BaseTestCase.setUp() first

Some test cases instantiate RPC clients in setUp() before calling to
super(). After we port to oslo.messaging, we'll initialize RPC layer in
BaseTestCase, so we should make sure we call there before proceeding
with clients in subclasses.

blueprint oslo-messaging

Change-Id: I6fdcba0ba690c75d1a472b3ad050c21f5f53a1d0
Add vlan type driver unittests

Closes-Bug: #1269127

Change-Id: Ie2c1c5d2eea6627063dd77a08591d972060f59ee
Merge "Notify systemd when starting Neutron server"
Merge "Big Switch: Import DB module in unit test"
Big Switch ML2: sync detection in port-update

Adds logic to the update_port_postcommit method of the
Big Switch ML2 driver to detect when afailure to update
the port via REST was caused by the backend being out-of-sync
with neutron.

This was accomplished by checking for the NXNETWORK message
which indicates that a port request referenced a network that
does not exist on the backend. This only occurs when they are
out-of-sync so the driver will then trigger a full topology sync.

The same logic exists in the port creation method shared with
the Big Switch plugin. However, the Big Switch ML2 driver does
not send port requests to the controller unless the port binding
host ID is set, which doesn't occur until a port update after
binding in the ML2 scenario. Therefore, the logic has to be repeated
in the ML2 driver port update operation.

Closes-Bug: #1331335
Change-Id: Id6488fbdea2c8c22a34e775977d94389c8da74f8
Improve docstring for OVSNeutronAgent constructor

Add description of l2_population parameter

Change-Id: Iedc9a46c127472a16629e7d2af78db87256c88b1
Merge "Fix pool statistics for LBaaS Haproxy driver"
Merge "Add vlan type driver unittests"
Merge "Big Switch ML2: sync detection in port-update"