NetApp NFS efficient clone_image impl

This change implements clone_image funcionality
for NFS drivers. It implements an internal image cache
in nfs shares which will be used to clone images in case
the image_location supplied does not represent an nfs share
which could be used to directly clone image. It also implements
an internal cache cleaning mechanism at regular interval.

blueprint netapp-cinder-nfs-image-cloning

Change-Id: I20eaddf9febc78df33e31bd41b4698b772da3ae7
NetApp check for 7 mode controller version

Queries the filer api version and raises error
if the version is unsupported.

Closes-Bug:#1223474

Change-Id: I430a41d63a2541891fdbdb20dacab9f69fa44291
NetApp fix create vol different size than snapshot

This fixes the issue of creating vol of different
size than snapshot and creating cloned vol of
different size than original.

This change adds a lot of additional LUN geometry
and sub-LUN cloning code which is neccesary to
support extreme resizes, since normal resize
operations are limitted to be within a certain factor
of the original LUN size.

Closes-Bug:#1098581

Change-Id: I8652bfaa67c12c790fa80650a051497f70279b9c
Fix check for mount.nfs helper installation

This fixes the issue for checking the
existence of mount.nfs helper program
in installation directories during
driver set up.

Closes-Bug:#1212286

Change-Id: If2fa925614bd42295eae0f62ba948e14a89e1343
Fix NetApp iscsi drivers for cinder backup

It fixes the iscsi drivers to query backend
if a lun entry is not found in the cache. Due
to the c-bak feature spawning volume drivers
separately than c-vol it caused NetApp drivers
to error out if volume was created after starting
c-bak. This patch fixes it.

Change-Id: I3570e58560408d3f7117bb1068cf530ae05521b3
Closes-Bug:#1229620
Fix chown fail for nfs file without necessary permission

chown failed in case of volumes on nfs export when the
permission is not granted on the storage system. Upload
volume only requires read access on the nfs file and hence
chown is not neccessary when current user has read permission.
Chown only executed when read is not granted to the user.

Change-Id: Ifa8eff7e79c6e4f15a1feb7cabec8cae8a0b0a83
Closes-Bug:#1221205
NetApp fix clone image compatibility issue with ssc

It makes clone image functionality compatible
with the ssc feature. Hence it makes clone
image sensitive to volume type and provision
on the right share matching volume type
extra specs.

Change-Id: If980239fedf784a1cca7abd6ee3d00f8625b9b11
Closes-Bug:#1226752
Pass db into driver as constructor's parameter

This will be required when code specific for target admin moves to
brick.

Change-Id: Ia48ea927f2efb2c551c359f7e7f98bf586919ab3
Increase test coverage for cinder.image.image_utils

Add new tests for:
	convert_image()
	qemu_img_info()
	fetch_to_raw()
	fetch_verify_image()
	upload_volume()

Change-Id: Ie69af94433b4c61a493d6c38b4c9439a367f7af8
Don't need to init testr explicitly

In run_tests.sh, function init_testr will initialize testr if the
directory .testrepository is not existed. Actually, testr will do
the check before run the test:

In Python package testrepository, setuptools_command.py:Testr.run

68 def run(self):
69     """Set up testr repo, then run testr"""
70     if not os.path.isdir(".testrepository"):
71         self._run_testr("init")

So, init_testr can be removed safely.

Fixes Bug #1216820
Change-Id: Id9815033c0cb0e1aa6693a4c14bf9a5d490c8883
Remove _create_volume function from several tests

Remove _create_volume function from
- db/test_transfers.py
- api/contrib/test_backups.py
- test_gpfs.py
- test_volume_transfer.py
- test_volume.py
And use create_volume from tests/utils.py instead

Change-Id: I446220d0cfaa2850a5262a968ed35b7827b90a03
Utilizes assertIn and assertNotIn

Using assertTrue and the 'in' operator to test if an element is in a sequence
is too python2.4. Our unit testing framework 'testtools' support assertIn and
assertNotIn, included from python 2.7, which were created for these types of
tests. Let's use assertIn or assertNotIn for these tests.

Change-Id: I8b43f7ff5f306e1ce57296d89679333ce24e4b64
Fix pep8 violation in backup

Change-Id: I0bbc7923c3bea9b918c243d2c7b59510fd26deb5
copy_image_to_volume for Nexenta volume driver

This patch implements copy_image_to_volume in Nexenta volume
driver, because volume must be exported before copying image
to it.

Change-Id: I9dc725095944d166fee415f3f605268c7fcbbd3a
Sync rpc fix from oslo-incubator

Sync the following fix from oslo-incubator:

76972e2 Support a new qpid topology

This includes one other commit, so that the above fix could be brought
over cleanly:

5ff534d Add config for amqp durable/auto_delete queues

Change-Id: I1fd5aaf87ec87836df3e44e83247bf82301475f5
Closes-bug: #1178375
Fixes bug to allow for encrypted volume deletion

delete_key in cinder/volume/api.py was called with incorrect parameters.
The error prevented encrypted volumes from being deleted, but the fix
has been applied and unittests written to prove the functionality.

Change-Id: I3b93da84f97efe2a3afa057907bbfa10336eb9de
Implements: blueprint encrypt-cinder-volumes
Clone volume with right size with SolidFire

It is possible to clone a volume with a size greater than
the source volume. When using the SolidFire driver, the volume size
was not passed in the call made to the SolidFire API when
cloning a volume.

It resulted in a cloned volume having the same size as the source
volume but the correct size in the Cinder database.

This changes makes sure the cloned volume has the correct size
by explicitly passing the requested size when calling
the SolidFire API and cloning the volume.

Fixes: bug #1219105
Change-Id: I5628c7fa922780d6b0601e2daa79310a61085edc
Add venv wrapper for check_uptodate.sh

tools/conf/check_uptodate.sh is added in run_tests.sh

For simple, run "run_tests.sh -p" will call it, and get following error:

Failed to collect options from module
cinder.volume.drivers.san.hp.hp_3par_common: No module named hp3parclient

Actually, the hp3parclient is listed in test-requirements.txt, and it is
installed in venv.

the check_uptodate.sh should run in venv to get correct result.

update the error message to update the cindier.conf.sample correctly.

-----------
Test method
-----------
$ pwd
/opt/stack/cinder

$ source .venv/bin/activate; tools/conf/generate_sample.sh

(.venv)$ deactivate

$ ./run_tests.sh  -p
Running flake8 ...
// no error emitted here

Fixes Bug #1219197

Change-Id: I9b3eaf3c1a5eb395eefed28bb907685cdef147aa
Merge "Add venv wrapper for check_uptodate.sh"
Add support for Havana missing features in Windows driver

The following features were added:

-copy_volume_to_image (Havana)
-copy_image_to_volume (Havana)
-get_volume_stats (Havana)
-extend_volume (Icehouse)

The test mocking based on binary pickled files were replaced by mox.

Change-Id: I92c681280d6f7b85bcba7a5e3513f2bdb6c13f1d
Implements: blueprint windows-storage-driver-extended