Copy the RHEL6 eventlet workaround from Oslo

Tests in oslo-incubator now need the horrendous hack to workaround an
issue with eventlet on RHEL6. We've moved the patch_tox_venv tool
and redhat-eventlet.patch into oslo-incubator, so add them to
openstack-common.conf.

Change-Id: I1acfec282b64d7582144b155119bedb1741db2f7
Add db client packages to dev env setup doc.

Dev env setup doc hasn't been updated in a while and
needed the addition of the mysql and psql packages.

Tested this on a clean install and it looks like
the addition of these two pkgs should get us up to
date.

Change-Id: I66011478064bd8fb85bfaf56e8b14232226e0efc
Implement copy_image_to_volume and copy_volume_to_image on nfs backends

Fixes: bug #1177288
Change-Id: I1c034de4acf13c52e399ba4623a0c8f2110fd695
Merge "Add db client packages to dev env setup doc."
Merge "Copy the RHEL6 eventlet workaround from Oslo"
Remove outdated cinder test doc

cinder doesn't run pylint test. This was a left over from the
fork in nova-volume.

Change-Id: Id096ec97b37a2019baf7a0b55bfd5bce4e71908f
Add pylint-based lintstack test to tox environment

lintstack is a pylint-based static analysis tool to find bugs
in Python code.

To run the test via tox: $ tox -e pylint
To run the test directly: $ tools/lintstack.sh

Change-Id: If155f47ed84eb820ac505ee741bdd18edd41b1eb
Fix missing spaces in Huawei Logging

Add spaces between line concatenations in Log messages.

Change-Id: I4e94fc751658fbe1b6b9b74859d800445a1c2e5d
Merge "Fix missing spaces in Huawei Logging"
Merge "Add pylint-based lintstack test to tox environment"
Add missing spaces to iscsi_iotype help

Missing spaces cause the auto-generated sample conf to not look
right.

Change-Id: I8e1b588d7cf18147aa403f0e7391f9c6ae390a6b
Set default values for NFS/GlusterFS share_config files

By default, set:
 nfs_shares_config = /etc/cinder/nfs_shares
 glusterfs_shares_config = /etc/cinder/glusterfs_shares

This makes use of these drivers require one less manual
configuration step.

Also fix wording of help for glusterfs/nfs_mount_point_base
options.

Change-Id: I93bd3a8f08d4d5307f78e983d1080afae663dfe4
Merge "Add missing spaces to iscsi_iotype help"
Change the type of "free_capacity_gb" to be float

Change the type of "free_capacity_gb" from string to float
in function _get_free_capacity.

Fix bug: 1177678
Change-Id: If2654fc3ad6b3dbea6a8cc0be7ae041ad30bf876
Use pbr instead of openstack.common.setup.

Fixes bug 1179007

Change-Id: I71a556bcc36e56f0b51b1191f2622c66c3338474
Use flake8 and hacking.

Fixes bug 1172444

Change-Id: I46b733bd16fa49c58c642348988233064d2b673b
Merge "Set default values for NFS/GlusterFS share_config files"
Merge "Implement copy_image_to_volume and copy_volume_to_image on nfs backends"
Remove gettext.install() from cinder/__init__.py

The gettext.install() function installs a builtin _() function which
translates a string in the translation domain supplied to the install()
function. If gettext.install() is called multiple times, it's the last
call to the function which wins and the last supplied translation domain
which is used e.g.

 >>> import os
 >>> os.environ['LANG'] = 'ja.UTF-8'
 >>> import gettext
 >>> gettext.install('keystone', unicode=1, localedir='/opt/stack/keystone/keystone/locale')
 >>> print _('Invalid syslog facility')
  n無効な syslog ファシリティ
 >>> gettext.install('cinder', unicode=1, localedir='/opt/stack/nova/cinder/locale')
 >>> print _('Invalid syslog facility')
 Invalid syslog facility

Usually this function is called early on in a toplevel script and we
assume that no other code will call it and override the installed _().
However, in Cinder, we have taken a shortcut to avoid having to call it
explicitly from each script and instead call it from cinder/__init__.py.

This shortcut would be perfectly fine if we were absolutely sure that
nova modules would never be imported from another program. It's probably
quite incorrect for a program to use cinder code (indeed, if we wanted
to support this, Cinder code shouldn't use the default _() function) but
nevertheless there are some corner cases where it happens. For example,
the keystoneclient auth_token middleware tries to import cfg from
cinder.openstack and this in turn causes gettext.install('cinder') in
other projects like glance or quantum.

To avoid any doubt here, let's just rip out the shortcut and always
call gettext.install() from the top-level script.

However, there's a bit of an annoying detail here - by default,
nosetests starts in the current directly and tries to import all modules
it finds to look for tests. Without the _() builtin installed, importing
some modules like cinder.flags will fail.

Since it only ever makes sense to load tests from the cinder/tests dir,
we can ask nose to do that by using the --tests argument via setup.cfg.

Note, this means that if you previously did this:

  $> tox -- cinder.tests.foo cinder.tests.bar

then you must now do this:

  $> tox -- --tests cinder.tests.foo,cinder.tests.bar

Change-Id: If4125d6bcbde63df95de129ac5c83b4a6d6f130a
Add CINDER_LOCALEDIR env variable

Part of fixing bug #995287

Syncs these two commits from oslo-incubator:

  Support overriding oslo localedir too
  Add a gettextutils.install() helper function

to get a new gettextutils.install() function which allows the default
localedir to be overwritten via an environment variable.

Note that gettextutils.install() must be called before any other cinder
modules are imported since some modules attempt to translate strings
at import time (e.g. in cinder.flags). This is broken and inefficient,
but fixing it involves adding something like sphinx's l_() function and
would be very invaisve.

Change-Id: I86562b3a65d371673bb21f7179eecc7602bc0775