Small typos

Change-Id: I599b5e73de2e7e900e317348fdaad6f6350bc111
Cleanly override config in tests

CONF.set_override() is often called in tests but CONF.clear_override()
is never. Create a override_config() method in the base TestCase class
that restores previous conf value after test, as it is done in other
OpenStack projects.

Change-Id: Id57b4502a2a37ea12047985cf2ea6c38c6f965fd
LIO: Fix UnboundLocalError in ensure_export

If db.volume_get() fails here, volume_info (and chap_auth)
are unbound, and the below usages will fail.

volume_get() failing is the only way to land in the NotFound
handler, so just remove this debug line.  It won't ever have
info to print.

Move code not related to db lookup out of this try block, and
return when NotFound occurs.

Closes-Bug: #1387866

Change-Id: I13a88bec1a66d8a0794b08514cc9844d60f6c809
Activate pep8 check that _ is imported

Removed the specification in tox.ini that _ is a builtin so that
it will no longer assume that _ does not need to be imported.

The correct import is:

    from cinder.i18n import _

Activating this check did not flag any violations in cinder.

Change-Id: Ifc789514d2462c059eb9f003fac288e751331ded
Merge "Cleanly override config in tests"
Disable python-barbicanclient 3.0.0 version

python-barbicanclient 3.0.0 has introduced cliff module, but pins it
to 1.6.1, while global-requirements set it to >=1.7.0, now the whole
OpenStack projects depends on higher version of cliff, but
python-barbicanclient is needed by cinder, then grenade test will
fail because: pkg_resources.DistributionNotFound: cliff==1.6.1

As long as python-barbicanclient maintainers don't provide a patch
for 3.0.0 (which seems not happen FMPOV), we need to disbable this
version.

Change-Id: I02f055ae89989cef2bd0264c60279a1f1a141e01
Related-Bug: #1388414
Implementing the use of _L’x’/i18n markers

Placing the _Lx markers back into the code.  No other cleaner solution has
has been implemented. Patches will be submitted in a series of sub
directories and in a fashion that is manageable.

Partial-Bug: #1384312

Change-Id: I62c708036a9cd5da431b7a95e9cd41167fb5273b
Merge "LIO: Fix UnboundLocalError in ensure_export"
Merge "Implementing the use of _L’x’/i18n markers"
Merge "Small typos"
Remove test_barbican from keymgr tests

Unfortunately it seems we have some very poorly
written keymgr unit tests, specifically
keymgr/test_barbican.py does this:
from barbicanclient.common import auth

First problem is that from a unit test perspective
that pretty much sucks, second problem is that
barbicanclient as of version 3.0.0.0 no longer
has an "auth" module, as a result Cinderunit tests
now fail.

The test_barbican.py unit tests need to be rewritten
to mock out the client components and actually test
Cinder components where needed without relying on
the barbicanclient.

For now in order to free up the gate, remove test_barbican.py

Change-Id: Id770c87c0d622ae4c1e0d71141ffa9aed29be2ec
Partial-Bug: #1389419
Retry remove iscsi target

There is a race in the gate when removing an iscsi
target in the remove export flow where the target
is still active. It's about a 75% failure rate so
simply adding a configurable retry on the delete
call should clean that up.

Change-Id: I8531652e8b80f1c65c9942e109dea01fda5674e0
Closes-Bug: #1363258
Fix wrapper to work with barbicanclient 3.0.1

Due to the updates to the python-barbicanclient in version 3.0.1, the cinder
barbican wrapper no longer functions.  This patch updates the cinder barbican
wrapper and test cases to work with barbicanclient 3.0.1.

Change-Id: Ibef4abd5fd9b12962420eaa5d7ebf62700171861
Closes-Bug: #1388461
Fix the LV NotFound situation for thin-type LVM

If the logical volume is not found, LVM displays on the error output
that the volumes could not be found. So here, we filter on this very
specific situation, and let all the other cases go through the stack.

Added a test for this new code path, which raises an exception of the
proper type to be caught by the new code.

Change-Id: I703af8ccd87c6332d9f88eff63fcf26ebed234f4
Closes-Bug: #1390081
Updated from global requirements

Change-Id: Ib06608cdb8ce099ddc5f5f92aa33e6ba3c68e079
Merge "Retry remove iscsi target"
Merge "Activate pep8 check that _ is imported"
Imported Translations from Transifex

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

Change-Id: I3c97602b295590fb90cba334e6d390e1e52f9be5
Implementing the use of _L’x’/i18n markers

Placing the _Lx markers back into the code.  No other cleaner solution has
has been implemented. Patches will be submitted in a series of sub
directories and in a fashion that is manageable.
This is the third commit of this kind

Change-Id: I33b0bb05b1c1ea91dc5a1e93eaadceea1f23fcc9
Partial-Bug: #1384312
Merge "Updated from global requirements"