Fix handling of CIDR in allowed address pairs

A CIDR in allowed address pairs would screw up
the calculation of remote security group member
IP addresses due to a call that assumed each entry
was an IP. This patch fixes that an adds a remote
security group reference to the address pairs SG
test case to exercise this code-path.

Closes-Bug: #1382562
Change-Id: I2676f4b56bce7449579d67fb221b3edb7b885103
Fix incorrect int/tuple comparison during binary search

The code contains an incorrect int/tuple comparison during the binary
search, which completely breaks the "priority" feature.
(Apparently python2 thinks int < tuple is not an error and always True.)

Change-Id: Ic404b38eabc87b105c7c2443b6177071b26d97ce
Closes-Bug: #1386946
Support pudb as a different post mortem debugger

Post mortem debugger starts pdb at the assert failure place
when OS_POST_MORTEM_DEBUGGER is set and an exception or assert
failure happens.

This patch adds a neutron env variable OS_POST_MORTEM_DEBUGGER
to allow invocation of pudb instead of pdb. pudb module is not
a hard requisite as it will be only imported if you set
OS_POST_MORTEM_DEBUGGER=pudb.

The old OS_POST_MORTEM_DEBUG env variable is removed now.

Change-Id: I5d40913add439cf9c30305bafc98af9f8cd4d12f
Fix PYTHONHASHSEED bugs in test_security_groups_rpc

This fixes the test_security_groups_rpc unit test that breaks with a
randomized PYTHONHASHSEED (see the bug report).

The test assumed that several Dicts had elements in a particular order.
Found with PYTHONHASHSEED=2701526934.

The fix refactors the test case by using an OrderedDict instead of a Dict.
Or in the case of the regex strings, injecting different values depending
on the order of the devices2 and devices3 Dicts.

An upstream spelling mistake is also addressed in this patch.

Partial-bug: #1348818

Note: There are several other unrelated unit tests that also break with a
randomized PYTHONHASHSEED, but they are not addressed here. They will be
addressed in separate patches.

Change-Id: I744117edfc5869b0750349a89f2792f622e4285d
ofagent: Remove obsolete bridge_mappings (plugin side)

For ofagent, it has been superseded by physical_interface_mappings
and was planned to be removed in Kilo.

Related: blueprint ofagent-physical-interface-mappings
Change-Id: I1f7cbcde429a03e7e918dc224d8cbd8c6aa47049
enable H401 hacking check

This change corrects H401 (docstring should not start with a space)
errors and enables the check
Change-Id: I2f798421d5895fcec349c757d27b7f085ee001e7
Partial-Bug: 1329017
Tighten up try/except block around rpc call

The try is too broad.  This commit moves code outside of the try block
where exceptions are not expected to be raised.  This only leaves the
rpc call in the current code.  In legacy code, there used to be more
but now this code merely queues updates for workers to handle
in other threads.

Change-Id: I15407553fc6ad6eeb5b483499fe1a5adffe1edca
Fix metadata proxy start problem for v6-v4 network

Commit 1b66e11b5d8c0b3de0610ca02c3e10b6f64ae375 introduces
a new problem that metadata proxy will not be started when
an isolated network contains ipv6 subnet with dhcp enabled
and a ipv4 subnet.

This fix separates the checks to enable dhcp and enable metadata
so metadata proxy can be started if there is ipv4 subnet exists
in the network with metadata enabled.

Change-Id: If26806083db225e9ab30d75fa6c728ce99a7cafe
Closes-Bug: 1392564
Update rally-jobs files

*) Rename rally-scenarios that is quite misleading to rally-jobs.
   rally-jobs makes much more sense, cause it actually contains files
   related to rally job

*) Update rally-jobs/README.rst to add more info

*) Update rally-jobs/plugins/README.rst to expaling plugins

*) Add new directory rally-jobs/extra, this directory is copy pasted
   in gates and can be used for files that are required by some of
   benchmarks

Change-Id: I6d0c0435a4bb4658ddf4adb871bc36ab8c157f3e
Drop RpcProxy usage from brocade plugin

This patch drops the usage of the RpcProxy compatibility class from
the brocade plugin.  The equivalent usage of oslo.messaging APIs is
now used instead.

Note that there is one very minor functional change included.  The
previous code set the base version to '1.1'.  It should be '1.0'.  The
proper pattern to use is to set the base version on the client side to
be the initial version of the API (X.0).  Then, any methods that
require a newer version need to specify it.

Part of blueprint drop-rpc-compat.

Change-Id: I6cc343c1e88d666dd90842e5da36787b6693fc98
Drop RpcProxy usage from cisco.cfg_agent

Drop usage of the RpcProxy compatibility class from cisco.cfg_agent.
The equivalent direct usage of oslo.messaging APIs is now used
instead.

Part of blueprint drop-rpc-compat.

Change-Id: I3ec71b3689adf7e96cdc2fdbf501c5cc37a9e0e4
Drop RpcProxy usage from cisco.l3

Drop usage of the RpcProxy compatibility class from cisco.l3.  This
was the last of RpcProxy usage in the cisco plugin.  The equivalent
APIs from oslo.messaging are now used instead.

Part of blueprint drop-rpc-compat.

Change-Id: I340b6969e32ec20cb4864021ec332eb9c5bdf19c
Drop RpcProxy usage from hyperv plugin

Drop the usage of the RpcProxy compatibility class from the hyperv
plugin.  The equivalent oslo.messaging APIs are now used instead.

Part of blueprint drop-rpc-compat.

Change-Id: Ic0ec43d2fe1929b7225d8e797495f7949f98184a
Drop RpcProxy usage from ibm plugin

Drop usage of the RpcProxy compatibility class from the ibm plugin.
Direct usage of oslo.messaging APIs is now done instead.

Part of blueprint drop-rpc-compat.

Change-Id: I3163d0a5e5f042c02e83995e84eb962e002f27cb
Drop RpcProxy usage from mlnx plugin

This patch drops usage of the RpcProxy compatibility class from the
mlnx plugin.  The equivalent oslo.messaging APIs are now used instead.

Note that one test case was dropped, but only because it did not
provide any actual additional test coverage.

Also note that the base rpc version is set to '1.0' instead of '1.1'
as it was in the original code.  Setting the base to X.0 is the right
pattern.  Methods that require a newer version should specify it in
their implementation.  According to the API history comment here, the
methods in this class were not the ones changed in '1.1', so they
don't specify '1.1' as a requirement.

Part of blueprint drop-rpc-compat.

Change-Id: Ia8174b3e3415aa1e8588d908117e79a604e63881
Drop RpcProxy usage from nec plugin

This patch removes the usage of the RpcProxy compatibility class from
the nec plugin.  The equivalent usage of oslo.messaging APIs is now
used instead.

Part of blueprint drop-rpc-compat.

Change-Id: I0b3ee1437ad4525f1354caaba686b6ab7442db2f
Remove ryu plugin

Ryu plugin was marked deprecated in Juno.
This commit actually removes the code for Kilo.

We (Ryu team) recommend users to migrate to ofagent, on which
we aim to concentrate our development resources by this deprecation.

DocImpact
Partial-Bug: #1391714
Change-Id: I4916ce3c246730dc00516404471f8a1a008e27b6
Update i18n translation for Cisco plugins and cfg agent log msg's

All the existing LOG.info, LOG.warning, LOG.error and LOG.critical
messages should have _LI, _LW, _LE and _LC respectively. Also, debug
level log shouldn't be translated. This patch set will cover the cisco
directory under neutron/plugins.

Change-Id: I4463ea3f4ec72f683d61043105a7883f629cefe9
Partial-Bug: #1320867
Remove Python 2.6 classifier

Neutron does not support Python 2.6 anymore starting with Kilo and might
not work correctly with it, so remove the classifier.

Change-Id: Ib7cddecdbec2c5152fe526bada6587129cf63ffd
Merge "Remove ryu plugin"