Fix typo in cinder.tests.test_create_volume_flow

Mock is 3rd party so should be placed after 'time' package.
Changed sheduler -> scheduler

Change-Id: I9c8ef7980c0444a725232d03c29b39d4805586ff
Fixing UnicodeEncodeError against volume creating function

When creating a volume with non-English characters and there is
not enough space for it, then an UnicodeEncodeError occurs. So
we need convert any coded exception message to unicode string
for logging.

Fixes bug 1223128

Change-Id: If1d4faad2bcde696f20565deb01226de33caccad
Merge "Fix typo in cinder.tests.test_create_volume_flow"
Catch generic exceptions

When the driver copy_image_to_volume fails it can
at the current time raise more than just CinderException
as its root exception type. This causes rescheduling due
to the blacklisted exception list that is used to determine
if a exception is 'bad enough' to trigger rescheduling or
should the volume creation action just set the volume to
error state.

To avoid the situation where this would cause a rescheduling
we should make sure (for now) that any exception that is
emitted on copying an image to a volume is translated
into a image copy failure and reraised.

Fixes: bug 1224211

Change-Id: Ia4a0a81d9e0967b1e7de07577d77084462304c60
Turn db model object into a primitive object to avoid error

In volume API controller we need turn db model object into a primitive
object to avoid error when it adding visible administrator metadata to
volume's metadata dict.

Fixes bug: 1220232

Change-Id: I5f6c4fc8dd6ca3af02db577b37dcaeee92bb42e5
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Imported Translations from Transifex

Change-Id: I59fa38bd6d5ae872c05af5935e919351c83ffe41
Merge "Catch generic exceptions"
Add default_availability_zone configuration option to cinder

This option is used to specify the default AZ for the whole service. So when
creating a new volume this value is used to specify the AZ of a volume.

Previously we were overloading the use of the storage_availability_zone option
which is also used to specify what AZ a service belongs to. We still fail back
on the storage_availability_zone when creating a new volume if the
default_availability_zone is not set.

Fixes bug: 1221260

Change-Id: Iec381f50c9aeb4a0abbcaa1d7b0107de09a73544
Fix client connection leaks in HP3PAR drivers

In the presence of exceptions, hp3parclient connections
did not get closed. This fix adds try/finally blocks
around all client login/logout calls.

Change-Id: I105b06cea5e61f3e9cf0d6e19c7ce430fedad715
Closes-Bug: 1220948
Merge "Imported Translations from Transifex"
Remove unused exceptions

Removed the exception classes in the following because not referenced
anywhere.

InvalidSourceVolume
InvalidRequest
PersistentVolumeFileNotFound
InvalidSnapshotMetadata
InvalidSnapshotMetadataSize
DiskNotFound
MigrationNotFoundByStatus
ClassNotFound
NotAllowed
KeyPairExists
MigrationError
VolumeSizeExceedsQuota
Duplicate3PARHost
BackupVolumeInvalidType

Change-Id: I7165f970752587885430f9d5c813b82b3f06ad70
Fixes the use of exception.InvalidInput with the wrong arguments

A mapping key of 'message' in exception.InvalidInput is 'reason'.
cinder/volume/drivers/netapp/iscsi.py and
cinder/volume/drivers/netapp/utils.py had used 'data'.

Change-Id: Ie40fc2f954984350827414edee9226adc80c8033
Closes-Bug: #1224790
Merge "Turn db model object into a primitive object to avoid error"
Merge "Fixing UnicodeEncodeError against volume creating function"
Merge "Add default_availability_zone configuration option to cinder"
Improves the parsing way of ssh returns

Huawei driver failed to parse ssh result when firstly logging
in storage system on paramiko 1.8.0. The update of paramiko
make the order of ssh returns changed. This patch improves
the parsing way of ssh returns.

This patch also does some changes for log punctuations.

fixes bug 1224499
Change-Id: Ia8761081dff998884f45312355b62aa27ab5417c
Use $state_path/conversion for image_conversion_dir default

image_conversion_dir currently defaults to /tmp.  Using
$state_path/conversion seems to be a more appropriate default.

Closes-Bug: #1217552
Change-Id: Iaaa462449a257b1b48fc349399bf409d7301a1e6
Merge "Fixes the use of exception.InvalidInput with the wrong arguments"
nms.folder.create_with_opts not supported on Nexenta 3.1.4.2

nms.folder.create_with_opts method not supported on early NexentaStor
version (3.1.4.2). replace if with create_with_props.

Closes-Bug: #1225094
Change-Id: I0c861ae8d966d53c6484e7ded8cab71f395fa059
Merge "Fix client connection leaks in HP3PAR drivers"