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
Strip square brackets from IPv6 addresses

When releasing old DHCP leases, square brackets around IPv6 addresses
should be stripped while reading dnsmasq hosts file.

Change-Id: Ia1e6d3a3cba30c94a1faa157d1d83da7beb523c4
Closes-bug: #1398380
Auto allocate gateway_ip even for SLAAC subnets

For a SLAAC subnet that is created without specifying the gateway_ip,
Neutron currently allocates (If0c48a7287a828eef4a0f0b0859d4f898d2937bd)
the gateway_ip at a later stage (i.e., neutron router_interface_add).
In order to keep the API consistent between IPv4 and IPv6, it is
recommended to allocate the gateway_ip during subnet_create stage itself.

Closes-Bug: #1394112
Change-Id: I965232930502c21b605fe360bb138bb6ea73d2b0
Update rpc_api docs with example version update

Update the rpc api devref docs to include an example of what a change
that includes a minor version increment looks like.  I hope this will
help clarify for people what all is included in an API change that
requires a version bump.

Part of blueprint rpc-docs-and-namespaces.

Change-Id: I9c53d3518b200412701b19958d7cbf1ed03d643e
ofa_test_base: Fix NoSuchOptError in UT

Ensure setting up cfg.CONF.
Otherwise, depending on the execution order of tests,
some tests in test_ofa_neutron_agent can fail with
the following exception:

    NoSuchOptError: no such option: config_dir

The problem has been exposed by the recently merged change
for policy module, commit d83731a96d3b47fab1295de1fb53cfe30576619c .

Closes-Bug: #1392569
Change-Id: I0d38df0510b95160c67ea7b76ed413138fa3d770
Switch to using subunit-trace from tempest-lib

This commit removes the local copy of subunit-trace and instead uses
the version packaged with tempest-lib.

Change-Id: Ia7b57c6fc092514d9fbe4e71f580a4b189dc68b0
Remove broad exception catch from periodic_sync_routers_task

Although this change removes a broad exception from
periodic_sync_routers_task (neutron.agent.l3_agent), the
implementation still ensures if an exception --caught or uncaught --
prevents a call to the method to disable the fullsync, then the next
call to the method will perform a fullsync again.

Author:         Cedric Brandily <zzelle@gmail.com>
Co-Authored-By: Carl Baldwin <carl.baldwin@hp.com>

Change-Id: I6281886f3334100a18952578250c8154a0ed15a9
Have L3 agent catch the correct exception

L3 agent imports the processutils module to catch exceptions that
wouldn't ever be thrown because the underlying execute() being
called is the one from neutron.agent.linux.utils which raises a
RuntimeError on failure.

Also, processutils is now part of oslo.concurrency. So when we
actually start using it, we'll use it from there.

Closes-Bug: 1401626
Change-Id: I43874e1b63a0ba7b01415cafe0538f4343057066
Migrate to oslo.context

That's just a matter of adding requirements.txt entry, fixing imports,
and dropping the corresponding oslo-incubator module from the tree.

While at it, made all imports to import the module into 'oslo_context' and
not just 'context', so that we don't override the module locally in
multiple methods that receive their context arguments with the same
name, making the library inaccessible from inside those methods.

Change-Id: Ie62af970b3b7f225de453e56c01abc4b12af8f5e
Closes-Bug: #1401054
Don't restore stopped mock that is initialized in setUp()

Since this mock will be reinitialized for consequent test cases when
calling setUp(), it's not needed to restart it in the case.

Change-Id: Ib120bf09d24dccc0b09fae906dae05c69efe734a
Replace non-ovs_lib calls of run_vsctl with libary functions

There is already an OVSBridge.set_controller() function, so replace
calls to run_vsctl(['set-controller', ...]) with calls to
OVSBridge.set_controller().

This is also the only non-ovs_lib call to run_vsctl. This change
will also make it easier to abstract out the ovsdb-related code in
the future.

Change-Id: Ia5a3e2c759d2479a2e7088a2ab7db1d4e17d1ae2
Imported Translations from Transifex

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: Ifda70a2656a38ddf506e8f4d98e52b40e225e529
Merge "Imported Translations from Transifex"
Merge "Don't restore stopped mock that is initialized in setUp()"
Merge "run_tests.sh OS X script fixes"
Merge "Switch to using subunit-trace from tempest-lib"
Merge "Strip square brackets from IPv6 addresses"
Merge "Remove broad exception catch from periodic_sync_routers_task"
Merge "Migrate to oslo.context"
Fixed test test_update_port_security_off_address_pairs

This test checks that port-update fails with 409 return code when
port-security is turned off on a port which contains address-pairs.
The test had a typo ('security-groups' -> 'security-group') which would
have cause it to produce false-positive.
This change rewrites the test and eliminates the possibility of this
false-positive to occurs.

Change-Id: Ib54ad089872f28eb28a3d4d050ba0ee8fdc2bfe2
Closes-Bug: #1400725
Signed-off-by: Roey Chen <roeyc@vmware.com>