Drop service* tables only if they exist

Tables servicedefinitions and servicetypes are not used by neutron but
created using db migration tool. If quantum-server in grizzly was
started without using migration tool then tables mentioned above are not
created. During migration from grizzly to havana alembic attempts to
drop these unused tables. This patch uses "IF EXISTS" clause when
dropping mentioned tables.

Closes-bug: #1273355
Change-Id: I33fcb3e1dc96ce37ec9c00987cb5a3a953ca691d
Database exception causes UnboundLocalError in linuxbridge-agent

When database exception raises from update_device_down,
the linuxbridge-agent doesn't deal with them in a proper way
that causes accessing not-existed local variables.

A straightforward workaround is to set it as None by default
and verify its value then.

Change-Id: I32a9467876a619a7d0ad53ff3d5d95ff977e54f4
Closes-Bug: #1311971
Reference new get_engine() method from wsgi.py

wsgi.py referenced get_engine in neutron.openstack.common.db.sqlalchemy.session.
This method was removed from that file in commit 53609f29f3c8fcadc545afb891189253c07b33c3
change-id I0e1d86878d3eb924b01e04dced0f90b4e57757d8. This patch references the
replacement method added to neutron.db.api.

Closes-Bug: #1314850
Change-Id: Ifd4db5f49e2aaebc67eccb8bdcef8eea54983112
lbaas on a network without gateway

Not only check the gateway_ip in subnet, but also
check the host_routes. If there is a default route in host_routes
then the next hop of the default route is also a gateway_ip.

Closes-Bug: 1300017
DocImpact

Change-Id: Id3ae04bfa6cefb1c030857894f0594828b8e856d
Fix H302 violations

H302 violation is reported by flake8 when importing separated objects from
modules instead of importing the whole module.
e.g.   from package.module import function
       function()
is changed to
       from package import module
       module.function()

Change-Id: Ifbf31b52316d3cade40743752a49ce700f384a21
Closes-Bug: #1291032
Remove duplicate module-rgx line in .pylintrc

The correct neutron configuration will no longer be overwritten by
the old quantum configuration.

Change-Id: I4923ad4e35a5053966edb307587c72c0b684d149
Closes-Bug: 1316334
Remove explicit dependency on amqplib

kombu already depends on amqp or amqplib depending on its
version, and no explicit access to amqplib exists in neutron code.

Closes-Bug: #1317094
Change-Id: I5cf189d7173b732cba6df3f9b6aff1d2bb85cdfe
Merge "Database exception causes UnboundLocalError in linuxbridge-agent"
Start ping listener also for postgresql

Make use of the automatic connection disposal for
PostgreSQL as well.

oslo-incubator commit: 4a591eaafe035fa3fd508c910f057bfa8ff51005

Change-Id: I6e6adb612968639dbc8deae31e5409aac44e340e
Closes-Bug: 1288438
Merge "Start ping listener also for postgresql"
Merge "Remove explicit dependency on amqplib"
Merge "Fix H302 violations"
Merge "lbaas on a network without gateway"
Merge "Reference new get_engine() method from wsgi.py"
Merge "Remove duplicate module-rgx line in .pylintrc"
Merge "Drop service* tables only if they exist"