fix atom link in XML Version API

This patch fixes tag names where the tag name has ':'
for links templates.
Some examples are
'{http://www.w3.org/2005/Atom}link'
should be
['{http://www.w3.org/2005/Atom}link']

and

'test1:test2'
should be
['test1', 'test2']

Closes-Bug: #1311243
Change-Id: I6e7c068e41eb6b069c24ef9d6c46b726ea722074
VMware: Update default task_poll_interval value

The task_poll_interval option is used as the polling interval of vCenter/ESX
task status. This patch updates the default value to 0.5s in order to reduce
the wait time for task completion. Similar change has been done in nova and
this change is needed to keep the driver config values consistent.

DocImpact
   Updated default value of task_poll_interval to 0.5 seconds.

Change-Id: I66b80c629e255d61047592455ca42632f93051b2
Closes-bug: #1278028
Prevent tenant viewing volumes owed by another

Bug introduced by 0505bb268942534ad5d6ecd5e34a4d9b0e7f5c04 allows any
tenant to get the details of a volume belonging to any other tenant
if the UUID is known.

This commit allows only the tenant or an admin to get a volume.

Change-Id: I0268d374f7529d89068dcbf3c1cb9ab3d60d4115
Closes-Bug: #1356368
Catch DBDuplicateEntry instead of IntegrityError

'iscsi_target_create_safe' method didn't catch DB exceptions
correct.

Need to catch both db_exc.DBError and db_exc.DBDuplicateEntry
due to current oslo.db limitations: it doesn't handle correct
DBDuplicateEntry with different SQLite versions

Related-Bug: #1187367

Change-Id: Ie412ecabd3cbcac301340c82b4275adb7a7206c3
Fix exception handling in PureISCSIDriver

PureISCSIDriver had some error logging messages that make use of empty
replacement fields "{}" in strings on which the .format() method is
called, as allowed in Python 2.7+. Python 2.6 requires explicitly
naming or enumerating fields, i.e., "{}" must be replaced with "{0}".
This change fixes this so PureISCSIDriver is Python 2.6 compatible.

PureISCSIDriver.terminate_connection() also changed to catch
errors raised by _get_host_name(). Exception handling generally changed
to be more correct.

This change also adds testing of these code path to the unit tests,
to make sure it's actually correct.

Change-Id: I84179a8bc59dcf5593664ab11c90b07c451fd360
Closes-Bug: 1357004
Put result in quotes

When a result is the empty string is is hard/confusing
to look at the logs and determine what the task result
was, to avoid this put the result in quotes so that it
is clear in the log message what is the result and what
is not.

Change-Id: I6f9c30e30999dcd8d7f0df26f8066d9f392fe1b9
Rewrite ionice command filter using ChainingRegExpFilter

Currently, the ionice command prepended to a dd command is allowed by three
rootwrap RegExpFilter's that cover 3 arguments patterns. However, this
doesn't support if either 'iflag=direct' or 'oflag=direct' is omitted.
Because of this problem, deletion of volumes may fail if volume_clear_ionice
is set, as 'iflag=direct' is omitted.

This commit fixes this problem by replacing the filters with
ChainingRegExpFilter's, which allow to execute ionice to be combined with the
other allowed commands, including 'dd'.

Originally '-c[0-3]( -n[0-7])?' was allowed as an ionice option, but it is
invalid to specify -n[0-7] in a single option (for example, when '-c2 -n7'
is specified, ionice causes an error "invalid class argument: '2 -n7'").
In this patch, 2 filters are provided to cover the case only with -c option
and the case with both -c and -n options.

Change-Id: Ia074bf3244b7f010bd9e3b5e46c3152c1848f3d3
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
Closes-Bug: 1334422
Add iSCSI Target objects as independent objects

This patch is a step in decoupling the target
methods and the Volume Driver's Control methods.

This adds the targets directory and the new target objects
that we use with the exception of IET (follow up for that later).
TgtAdm and LIO drivers have been tested with the new LVM object.

All existing drivers are still able to be specified and use the
same objects and code-path they were using previously.  New
connector objects are only used when specifying the new driver.

Next step will be mapping current ref LVM driver to the new
LVM object and target model and working on the unit-tests.

After that mark the "old" methods and objects as deprecated
and we can then begin working on some other improvements.

Partial-Bug: #1329139

Change-Id: Iaa55e31e3dadc7dcb58112302c3807a8f92bcada
HP 3PAR manage_existing with volume-type support

Make manage_existing() modify and tune the volume based
on the volume-type.  Leverages retype() code.

Partially Implements: blueprint add-export-import-volumes

Change-Id: I2923596a6f2299788a7182fb86a5dfc897436302
Change the froce delete volume flage to True

The ProphetStor storage volume unable to remove if this has
assignee on other service or application. We make sure the volume
created by the cinder, and the cinder has the privileges to delete
volume.

Change-Id: I06fa7097f4c2320c346e286b0e0fc73ada1c7f8e
Closes-Bug: 1357629
Fix LOG string formatting in image_utils

My recent change to report stats on image fetch and
conversion used an incorrectly formatted log message.
The result is Trace messages with Key errors in the c-vol
log files.

This change fixes those messages and gets rid of the key error
exception messages in the Logs.

Change-Id: Id8377dd7761d93fd854f5f7871c997418c6e4554
Closes-Bug: 1357726
Catch vol not found in SolidFire transfer

The accept_transfer call in SolidFire wasn't catching
the volume_not found exception like it should be (and
like other methods do).

This patch just adds a check for volume is None on the
get_volume call during accept_transfer and raises an
appropriate exception if we run into that case.

While we're at it, add some more detail to the "NotFound"
error messages to include the driver operation as per
request of reviewers.

Change-Id: Ie6b56953028865eb06ebdaae3416339b8a371351
Closes-Bug: #1357261
Merge "Put result in quotes"
Merge "Catch DBDuplicateEntry instead of IntegrityError"
Merge "Catch vol not found in SolidFire transfer"
Imported Translations from Transifex

Change-Id: Ife372e61181d68ef2073d77e6af5d9db8563bf26
Merge "fix atom link in XML Version API"
Merge "Add iSCSI Target objects as independent objects"
Merge "VMware: Update default task_poll_interval value"
Adds barbican keymgr wrapper

Adds a barbican keymgr wrapper to the key manager interface in
cinder.  This allows barbican to be configured as the key manager
for encryption keys in cinder.  The wrapper translates calls from
the existing key manager interface to python-barbicanclient.

There are two new configuration variables: encryption_auth_url
(the authentication URL for the encryption service) and
encryption_api_url (the api URL for the encryption service).

Change-Id: Ifd0d9b073d7f1c3c92d318c20a080b253008b50c
Implements: blueprint encryption-with-barbican
DocImpact