Restore ability to run functional tests with run_tests.sh

Change f20b1d42 which split the running of functional tests from
the running of unit tests caused running:
  ./run_tests.sh neutron.tests.functional
to fail as the OS_TEST_PATH variable will be defaulted to
neutron.tests.unit which means that the functional tests will not
be discovered in the above case.

This patch trys to detect an argument passed in the form of a
neutron.tests string and correctly sets the OS_TEST_PATH variable
based on it.

Change-Id: I8ccdc7f10d3c8478281aeaf8d02175d0eeb8d6e9
Fix some typos in neutron/db and IBM SDN-VE plugin

For example, in neutron/db/agents_db.py, db_plugin_base_v2 should be changed to db_base_plugin_v2.
There is no bug or blueprint related to this fix.

Change-Id: I0d348d92c9c32f172d1e505cf660aed4d064a440
OFAgent: Avoid processing ports which are not yet ready

Port the following patch to OFAgent.
commit: 2702baed390d094b0eac07d0ae167ed236868d00
https://review.openstack.org/#/c/65838/

Closes-Bug: 1307745

Change-Id: Ie1fe0944fb541ba45ffb5b03747d5da289cede51
Log iptables rules when they fail to apply

Log the set of rules that causes iptables-restore
to fail in the Linux agent iptables manager.

If a specific rule is identified as the cause, only
that rule and a few surrounding it will be logged to
reduce the output.

Closes-Bug: #1306399
Change-Id: I8e94c1faae75760e439c5abe3d9b723548398105
OFAgent: Fixing lost vlan ids on interfaces

Port the following patch to OFAgent.
commit: 60cb0911712ad11688b4d09e5c01ac39c49f5aea
https://review.openstack.org/#/c/66375/

Closes-Bug: #1309286

Change-Id: I04f99ef7928cd07959b29eb64b5744df397979b8
Remove redundant default=None for config options

By default the cfg modules set the default value as None. There
is no reason to set this.

Change-Id: I58e09e01760b573612c2ee169a8dd1784fd36a82
Synced jsonutils from oslo-incubator

The sync includes change that makes sure we get unicode-only dicts from
jsonutils no matter which json module implementation is selected.

The latest commit in oslo-incubator:
- 0f4586c0076183c6356eec682c8a593648125abd

The sync adds a new 'strutils' module that is now used in jsonutils.

Change-Id: Ic815ca3df94c33edec9104172048b2cd94b92e3f
Closes-Bug: 1314129
Merge "Log iptables rules when they fail to apply"
Merge "Fix some typos in neutron/db and IBM SDN-VE plugin"
Merge "Synced jsonutils from oslo-incubator"
Merge "OFAgent: Avoid processing ports which are not yet ready"
Merge "OFAgent: Fixing lost vlan ids on interfaces"
Support 'infinite' dhcp_lease_duration

Process a dhcp_lease_duration value of -1 as 'infinite'
when setting the dnsmasq dhcp-range values to support
cases where it is undesirable for instance dhcp leases
to expire.

DocImpact

Closes-Bug: #1315430
Change-Id: I1cc3cfebfec355014e6d5b5cbd656a1300c43c0b
Disallow regular user to update firewall's shared attribute

Shared firewalls should only be operable by  admins.
Currently only admin can provide shared attribute at firewall creation,
so update_firewall should be consistent with that as well.

Change-Id: I093743514637824207b375d724404d51f778d012
Closes-Bug: #1323322
NSX: fix bug for flat provider network

The flat provider network would cause an exception when writing to
database. This is due to the fact that the DB expected an integer
and received an object instead.

Change-Id: Ib9d38711c0c2ef16d8bf74bfae44864a1bc272b1
Closes-bug: #1324120
Fix KeyError exception while updating dhcp port

This is caused by a missing network_id in the port body.
This patch adds it so that a warning message can be traced
correctly. Wording is slightly tweaked to ensure it applies
to the right context.

Closes-bug: #1324194

Change-Id: I4b67b5c3584aa33278eb0e9e879ca338ba0ca8b0
Updated from global requirements

Change-Id: I91778ac6d505f8808a359765555a1619c2f34d3c
Revert "fix openvswitch requirement check"

This reverts commit be340d1bab015c47650687f97393c6c9015fb537.

The fix did not fix anything.
See comments at
https://review.openstack.org/#/c/95592/

Change-Id: I2926acf4b0a7020a7ad3237e6d03d5b78bfcb6c4
Reprogram flows when ovs-vswitchd restarts

When OVS is restarted, by default it will not reprogram flows which were
programmed. For the case of the OVS agent, this means a restart will cause
all traffic to be switched using the NORMAL action. This is undesirable for
a number of reasons, including obvious security reasons.

This change provides a way for the agent to check if a restart of ovs-vswitchd
has happened in the main agent loop. If a restart of ovs-vswitchd is detected,
the agent will run through the setup of the bridges on the host and reprogram
flows for all the ports connected.

DocImpact
This changes adds a new table (table 23) to the integration bridge, with a
single 'drop' flow. This is used to monitor OVS restarts and to reprogram
flows from the agent.

Change-Id: If9e07465c43115838de23e12a4e0087c9218cea2
Closes-Bug: #1290486
Merge "Remove redundant default=None for config options"