Remove default dictionary from function def

Removes an unnecessary dictionary created in the default
parameters definition for the execute function in ip_lib.

Partial-Bug: #1327473
Change-Id: I9b60e87d1043aa67a14675dad2185395df940301
Execute udevadm on other linux installs

When ofa and ovs neutron agents start, they use the linux utility
'udevadm'.  It is passed as an argument with an absolute directory path
which can vary on each linux install.  By removing the directory path,
it will find this utility by way of the user's environment path since
linux executables are configured in each user's path upon user creation.

Change-Id: I2344290d38c7889b8f32d8fb9c5161b09826e037
Closes-bug:  #1367697
Ignore top-level hidden dirs/files by default

Rather than waiting for each contributor to attempt to submit
a change to .gitignore trying to add the $editor_of_the_week
hidden directory just to be rejected, let's just ignore hidden
files/dirs by default in the top-level neutron directory.

Change-Id: I145bec958a3db7423a4e820a310b138ed189d2cc
Refactor l2_pop code to pass mac/ip info more readably

Previous code used a 2 element array to represent a mac/ip address
pair.  Code assumed that element 0 was mac and 1 was ip.  This made
the code difficult to read and difficult to maintain.  An attempt was
made to insert a third value that failed miserably because of the
position dependence and other code that assumed not only positions but
also the number of elements.

Using a namedtuple seems to be the best way to get better
maintainability.  Named tuples can be compared with regular tuples.
The json serializer still uses an array to represent it so the on-wire
representation of the object has not changed.  A short snip of code
was required to restore the namedtuple from the RPC message.

Change-Id: I7f8c93b0e12ee0179bb23dfbb3a3d814615b1c2e
Closes-Bug: #1352801
Switch run-time import to using importutils.import_module

.. and enable the cyclic-import pylint check, now that this particular
import is invisible to pylint.

Change-Id: I9bfe7f77742b0db3ebead6a6767ade9b91e54c22
Validate local_ip for OVS agent is actual ip address

tunnel_sync() writes this value into ovsdb and value is not validated. In
case non-ip value is written into ovsdb row must be deleted manually.

Change-Id: I57eee81e6821eb2cb26b3d07a39bc94b81243570
Closes-bug: #1284684
Big Switch: Send notification after port update

The Big Switch plugin was not sending port update
notifications for security group changes after the
port was updated. This patch corrects that behavior
by calling the port_update method on the RPC notifier
when necessary after a port update.

Closes-Bug: #1376527
Change-Id: Ic2fd872725c1da8e2dc394473b7feb407d21268f
Drop and recreate FK if adding new PK to routerl3bindings

Since MySQL 5.6 FK columns cannot be altered. As a workaround we can
drop the FK before ALTER COLUMN and then recreate it.

Change-Id: Icd1b3075cf29a6b0c477a4ddea2e6ebee91baef8
Closes-Bug: 1384555
Use correct base class for unit tests for ML2 drivers

In unit tests for several ML2 mechanism drivers (listed below)
the NeutronDbPluginV2TestCase class is used instead of Ml2PluginV2TestCase
which is desired to be used.

Unit tests for ML2 mechanism drivers in neutron/tests/unit/ml2:
   drivers/cisco/nexus/test_cisco_mech.py
   drivers/brocade/test_brocade_mechanism_driver.py
   drivers/freescale/test_mechanism_fslsdn.py
   test_mechanism_ncs.py
   test_mechanism_odl.py
   test_l2population.py

Partial-Bug: #1373153

Change-Id: I9524cafb39975b1384954a2eefcbf754231d2198
Include call to delete_subnet from delete_network at DB level

Removes an extra lock in bsn plugin that causes a deadlock
when delete_subnet is invoked form delete_network, agreed
with kevinbenton to remove it
Modifies a unit test to cover this change per reviewer request
Co-author amirosh

Closes-bug: #1197176

Change-Id: Ie3414848a91cc737b16b79399ae19800545e533f
Remove useless return

This change removes a never executed return after a raise.

Change-Id: I6e6cc1580469f6cc676492c8c27b3e45dd444031
Add rootwrap filters for ofagent

neutron-ofagent-agent currently relies on the fact the rootwrap
filters for neutron-openvswitch-agent covers what it needs.
as they are independent agents and their requirements are
getting more different, introduce a dedicated rootwrap filters
for ofagent.

Closes-Bug: #1392560
Change-Id: Iba205260a238431432caf8d9697268ceeef85eca
Cleanup and refactor methods in unit/test_security_groups_rpc

We had strings repeating all along the code which already were
in constant form, those have been refactored. Also global configuration
changes are now handled by functions to enhance code readability.

Change-Id: I0d4e508cda2537abe431f04a278ba2e1d2f5d97d
Update i18n translation for neutron.db log msg's

Validate that hacking rules apply to directory neutron/db
Partial-bug: #1320867

Change-Id: Iffdaa28bf5d5d503623f1f6dec4a8003f48974d8
Update i18n translation for neutron.extension log msg's

Validate that hacking rules apply to directory neutron/extensions

Change-Id: Ifbc97ae2b5670fbdf22c7d0ae48f91a7776daf01
Partial-bug: #1320867
Moved out common testcases from test_type_vxlan.py

This patch-set will refactor the test_type_vxlan.py and test_type_gre.py.

We need to add testcases for TunnelRpcCallbackMixin() so better we
should move common test cases from test_type_vxlan.py to test_type_tunnel.py and
add testcases for TunnelRpcCallbackMixin() into it.

Partial-Bug: #1381071
Change-Id: I81f8930cf665ccd89c03f0bd2199ce5d1d9dff65
linuxbridge-agent: make vxlan unicast check more efficent

A list with the full range of vxlan VNIs (1 to 2**24) was using
over 300MB of memory. This patch uses xrange instead of range.

Closes-Bug: #1393362
Change-Id: I21ccab758e7911712690fd5e732f64361e809264
Subnet delete for IPv6 SLAAC should not require prior port disassoc

With the current Neutron implementation, a subnet cannot be deleted
until all associated IP addresses have been remove from ports (via
port update) or the associated ports/VMs have been deleted.

In the case of SLAAC-enabled subnets, however, it's not feasible to
require removal of SLAAC-generated addresses individually from each
associated port before deleting a subnet because of the multicast
nature of RA messages. For SLAAC-enabled subnets, the processing of
subnet delete requests needs to be changed so that these subnets will
be allowed to be deleted, and all ports get disassociated from their
corresponding SLAAC IP address, when there are ports existing on
the SLAAC subnet.

Change-Id: I281f5a1553248e09174dc49d0a42aef4b5c44bee
Closes-Bug: 1393435
BSN: Set inconsistency record on delete failure

Set a bad value in the consistency DB on a delete
failure so a sync is triggered the next time the backend
servers become available.

This fixes the issue where the backend servers are unavailable
when an object is deleted from ML2 but not deleted from the
backend.

Closes-Bug: #1377350
Change-Id: I24713a03af4d3499645241f900de1f572689c235
Correct raw table regex in test_security_groups_rpc

Currently in test_security_groups_rpc, raw table regex uses nat table
chains regex but raw table chains[1] is a strict subset of nat table
chains[2] so a more strict regex should be used as raw table chains
regex.

[1] OUTPUT, PREROUTING
[2] OUTPUT, POSTROUTING, PREROUTING, float-snat, snat

Change-Id: I6f32cda917c2f882f5fd17b6fa105def5572cdef