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
Send notifications when extending volume

- Send resize.start when volume extension begins.
- Send resize.end with new size when volume extension ends.

Fixes: bug #1219106
Change-Id: I729da1604668080ec1a5d096df211aa55913dc48
fix inconsistent i18n log message

An inconsistent example:
    imessage = _("Invalid metadata") + ": %(reason)s"
This is not consistent i18n usage. In most of cases, we use _() for
whole string instead of leaving something out.

More than inconsistent, some text in leaving strings may be not
translated, for example, ':' in English is different '：' in Chinese.

Change-Id: I00e690021c44f1debbe034cc0837a07b292ffd1b
Closes-Bug: #1220813
Fix tuple usage error

The exc_info is just a tuple (captured in taskflow)
and isn't itself a callable object so we should not
need to use it like one to extract the exception type
and value.

Fixes bug #1220867

Change-Id: Ie27d004bad4053baa2ac8eb84bb8b7cdc05a954d
Validate VV Set exists in 3PAR drivers

The 3PAR drivers must first create a volume and then add that
volume to a virtual volume set on the backend for QoS support.
If that predefined virutal volume set does not exists the
volume would not be associated with the correct QoS settings.
This patch will now look to see if the virtaul volume set
exists and if not will delete the volume and notify the user
that the VV Set does not exists.

Change-Id: I460f6dd7001362b850c49454c78673aecd4cfef0
Fixes: bug 1218554
fix log string in conversion type

By using 'grep -rn "%([a-zA-Z_]*) "', we could find all cases of
'%(variable)'. And we need add an 's' like '%(variable)s'.

Closes-Bug: #1220557
Change-Id: Ib28b7ddc5e5aabe2b82a499d9c242c1982e7f953
Added copy-on-write support for all RBD cloning

Up till now we only had copy-on-write for cloning from snapshot. This
change optionally allows clone from volume to use copy-on-write
instead of a doing a full copy each time. This should increase speed
and reduce nearterm storage consumtion but could introduce some new
risks e.g. excessively long clone chains and flatten storms. To avoid
this, a new config option has been providedons are provided -
rbd_max_clone_depth - which allows the user to limit the depth of a
chain of clones i.e.

    a->b->c->d as opposed to a->b
                              ->c
                              ->d

This will avoid flatten storms by breaking chains as they are formed
and at an early, predefined stage.

A second option - rbd_clone_from_volume_force_copy - allows the user
to use a full copy as before i.e. disable COW for volume clones.

Implements: blueprint use-copy-on-write-for-all-volume-cloning
Fixes: bug #1209199

Change-Id: Ia4a8a10c797cda2cf1ef3a2e9bd49f8c084ec977
Merge "Fix tuple usage error"
Synchronize extend_volume methods in 3PAR drivers

The extend_volume methods in the HP3PAR FC and
iSCSI drivers should have been synchronized with
the synchronize annotation, but were not.

Change-Id: Ic7f18b7314e10dfb499b16f43b72367fe3ed1176
Closes-Bug: #1220947
Remove quota fetch race condition

When displaying quotas, we shouldn't pull the latest resources
just to convert the results to the dict.

Closes-Bug: #1220436

Change-Id: Id01a310481353b272e103643d053957b65cd4ce3
Fix brick remotefs dependency on cinder

This patch moves an exception from cinder.exception
into brick.exception to fix an import in remotefs.

Fixes Bug #1221309

Change-Id: I9b060c1e1129b3fe30145227712d0234e0f42504
Merge "Added copy-on-write support for all RBD cloning"
Remove deprecated assert_() usage

The method assert_() is an alias of assertTrue() and
is deprecated since python 2.7

http://docs.python.org/2/library/unittest.html#deprecated-aliases

This removes all assert_() uses.

Change-Id: I9f55c442cc2416a7aa2dac569d1750f723d95184
Utilize assertIsInstance

Using assertTrue and the 'isinstance' function to test
if an object is in an instance of some class is too python2.4.
Our unit testing framework supports assertIsInstance which was created
for these types of tests. Let's use assertIsInstance for these tests.

Change-Id: I2c931a52ae20f072f53210bf3dedb47127b413c0
Merge "Fix brick remotefs dependency on cinder"