Stop exception log in Big Switch unit tests

Reduce unit test log sizes by removing stack trace
exception logging in Big Switch unit tests.

Closes-Bug: #1370898
Change-Id: Id808edb5db567db31b6c1366e20948683f20118a
Adds macvtap support

The current logic handles only VFs with direct vnic-type.
This fix will add support for VFs with macvtap vnic-type,
By checking the relevant upper_macvtap directory.

Change-Id: Id69b7e64858020682fd0f68b0e162e5e8022eea3
Closes-Bug: 1383098
NSX: Fix foreign key constraint delete provider network

The cascade delete on the tz_network_bindings table is not
taking effect with the NSX plugin. In order to fix this, this
will require a db migration. This patch allows us to provide a
fix for this by deleting the tz_network_bindings within a transaction
to avoid the foreign key constraint. This patch fixes it this way so
that it can be backported to icehouse. Later a patch will be pushed with a
migration which corrects the db schema.

Closes-bug: #1367032

Change-Id: I19d389acc710224baff79ad114fab756b2e21cfc
BSN: Add network to ext_gw_info sent to backend

Include the full network info in the external gateway info
sent to the backend controller. This alleviates a very expensive
query across all tenants on the backend controller.

Closes-Bug: #1393991
Change-Id: If3601ccbce21e683924a7056cdfe4e3c2d4d4a93
Delete FIP namespace when last VM is deleted

On a compute node when the last VM with a floating IP association
is deleted, the L3 agent did not delete the fip namespace. However
the api server has already deleted the fip agent external gateway
port from the database.

This problem is happening on DVRs because the deletion of a VM port,
in addition to a floating IP disassociation, may also result in the
removal of the external gateway port binding AND the removal of the
fip agent external gateway port.

When the L3 agent is handling a routers_updated notification, it is
not processing floating ip address updates when the router has both
a floating ip disassociated and a external gateway port deleted.
This patch corrects this problem.

Closes-bug: #1377156
Change-Id: I86bdef7c9d988cb9d87c88adde55548d459f29a5
run_tests.sh OS X script fixes

On OS X, '*' is not a valid grep modified for '[^[:space:]:]', nor is it
necessary when the lines being checked against must be prefixed with
neutron.tests.
Also, dirname was being called with an empty var, without quoting, resulting
in usage errors.

Closes-Bug: 1391858

Change-Id: I34ab0625a00809f68b7a44cb3a175a57ba0bd6d5
Change description of default security group

The description for default security group in neutron
is “default”.
This confuses the end users, so updated the description
from “default” to “Default security group”.
Closes-Bug: #1291570

Change-Id: I9e024de935e8d17afd3d459cfa17e9feb0cd79fa
Fix hostname validation for nameservers

Fixes the hostname validation to align with the RFC's demands[1].
This was done by replacing the full regex with a function that
broke the FQDN into individual components that were easier to
reason about with regular expressions.

Also added several test cases for domains so if someone wants
to convert it back to pure regex there will be better test vectors.

1. RFC 1123 says an all-digit hostname is allowed in section 2.1. It
   says that this more liberal syntax MUST be supported.

Closes-Bug: #1396932
Change-Id: I003cf14d95070707e43e40d55da62e11a28dfa4e
hacking: Check if correct log markers are used

Makes the check tighter and would detect mistakes
like LOG.info(_LE("foo")).

This would reduce reviewer loads for relevant changes.

Partial-Bug: #1320867
Change-Id: I66c7ab1fd9b40beb857dc6c4b143ca47a5ebce4b
Alter execute_alembic_command() to not assume all commands

Alembic 0.7.1 is adding new diff directives add_fk and remove_fk.
The logic in execute_alembic_command() appears to assume all potential
commands are present in METHODS.   This patch adjusts it so that
it checks METHODS first, allowing the tests in neutron.tests.unit.db.test_migration
to pass.  However, if the design here requires that all potential
Alembic commands are handled, then this would not be the fix,
though I recommend that the potential list of Alembic directives
not be hardcoded.

Change-Id: Ib08685be252e1fdb0f10853f8fc9a7e19ac54a94
Closes-Bug: #1397796
Update i18n translation for VMware NSX plugin 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 vmware
directory under neutron/plugins.

Change-Id: Iba83af988cb2de919b05108f145efb19e9192ae4
Partial-Bug: #1320867
Simplify L3 HA unit test structure

Previously we had two fake test plugins: With and without agents.
I removed the one without agents and merged two test cases.
This allows test writers to add additional tests more easily
without mocking things that should not be mocked.

Change-Id: I6f899f86034145ac88b5c2e0f3036f7477f9702f
Drop RpcProxy usage from L3AgentNotifyAPI

Remove RpcProxy usage from the L3AgentNotifyAPI.  The equivalent
oslo.messaging APIs are now used instead.

Part of blueprint drop-rpc-compat.

Change-Id: Ice8e2592d7b254134bbee215b93ca77075ab4fe8
Update i18n translation for Mellanox plugin and 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 mlnx
directory under neutron/plugins.

Change-Id: Idfdb38360888002b066c8ac2d177a92b2ac173f4
Partial-Bug: #1320867
Merge "hacking: Check if correct log markers are used"
Drop RpcProxy usage from ml2 AgentNotifierApi

Remove usage of the RpcProxy compatibility class from the ml2
AgentNotifierApi.  The equivalent oslo.messaging APIs are now used
instead.  A couple of other mixin APIs had to be converted at the same
time.

Note that there is one very minor functional change here.  The base
rpc version is set to '1.0' now instead of '1.1'.  The right pattern
to use is to always set the base to be N.0.  Any method that needs a
newer version should specify it.

Part of blueprint drop-rpc-compat.

Change-Id: I640568e2d73c9eb7a9505db640dc1427a1ae2abe
Merge "Update i18n translation for VMware NSX plugin log msg's"
Merge "Update i18n translation for Mellanox plugin and agent log msg's"
Drop old code from SecurityGroupAgentRpcApiMixin

The SecurityGroupAgentRpcApiMixin class temporarily had support for
both RpcProxy and new oslo.messaging style rpc client interfaces.  Now
that all users of this mixin have been converted to direct usage of
oslo.messaging APIs, the old compatibility code can be removed.

Part of blueprint drop-rpc-compat.

Change-Id: I18dc65e7f14a8ae42e3c2bc81d1d73f61c12c1fc
Merge "NSX: Fix foreign key constraint delete provider network"