Change default policy for volume_extension:volume_tenant_attribute

The volume_tenant_attribute extension should be accessible by
the owning tenant and the admin. Change default policy from
'rule:admin_api' to 'rule:admin_or_owner'.

Change-Id: I886cd717741c86b5083aeaf16e3e7ea5b4e525b4
Closes-bug: #1269312
Nexenta iSCSI driver: fixed volume_migration

Fixed volume_migration updating volume provider_location.
Fixed temporal snapshot deleting after volume migrated.

Change-Id: Id23749cb3724e1510865425232b38b9fc32690f8
Closes-Bug: #1263258
Add encrypted flag to volumes

Currently, the only way to determine whether a volume is encrypted
is by retrieving the encryption metadata about the volume (through
cinder.api.contrib.volume_encryption_metadata) and checking the
encryption_key_id value.  This patch adds an "encrypted" flag to
the basic volume api to enable other services (like Horizon: see
patch https://review.openstack.org/#/c/71125) to easily tell
whether a volume is encrypted using a basic get call,instead of
requiring an additional call.

Implements blueprint encrypt-cinder-volumes
https://blueprints.launchpad.net/nova/+spec/encrypt-cinder-volumes

Change-Id: Id8e422135f17795de06589930afd0309fde28fd1
Sync oslo imageutils, strutils to cinder

Changes in imageutils:
===============================
bec3a5e Implements SI/IEC unit system conversion to bytes
8b2b0b7 Use hacking import_exceptions for gettextutils._
aad179d Fixing misspelled encryption key in QemuImgInfo
12bcdb7 Remove vim header
2bd46eb Refactors byte size extraction logic

Changes in strutils:
====================
bec3a5e Implements SI/IEC unit system conversion to bytes
e53fe85 strutils bool_from_string, allow specified default
8b2b0b7 Use hacking import_exceptions for gettextutils._
84d461e Fix a bug in safe_encode where it returns a bytes object in py3
12bcdb7 Remove vim header
3970d46 Fix typos in oslo
1a2df89 Enable H302 hacking check
67bd769 python3: Fix traceback while running python3.
b0c51ec Refactors to_bytes

Change-Id: I765bcd40f959162874bfda412b69e673c6e5f732
Related-bug: #1189635
Related-bug: #1193765
Related-Bug: #1257829
Add x-openstack-request-id to cinder responses

x-openstack-request-id is the common header name for request ID going forward.
Currently, only glance and neutron return this header. Using the request_id
middleware is a convenient way to ensure this header is in the response. We will
also be using the middleware to generate the request ID.

The ID will be generated by the middleware and is inserted into the request
environment. The current code generates the request ID in the constructor of
RequestConext; with this change, the ID is generated beforehand and passed in to
the RequestContext constructor. Not much different here: a request ID is
generated and is available for use in the handling of the request.

On the response end, the middleware is again used, this time to attach the
x-openstack-request-id header, using the value of the generated request ID. The
current code attaches the x-compute-request-id header.

This change is a necessary step toward logging the mapping of request IDs across
OpenStack services.

UpgradeImpact: api-paste.ini is modified

Change-Id: I30c4e5efa77f9ebffb485d2ea6a6c3f78eb1573f
Implements: blueprint add-standard-req-id-header
3PAR: Backend assisted volume migrate

This patch implements volume migrate using native 3PAR APIs.

Prerequisites:
1. Same 3PAR backend
2. Volume cannot be attached
3. Source and Dest CPGS are in the same domain

Steps:
1. Create a temporary volume in the destination with a copy of the source
2. Wait for the copy to complete
3. Delete the source
4. Rename the temporary to the same name as the original

Change-Id: Ia42503d41bf8afd908cd3ffb0288f0d353f313f1
Implements: blueprint native-3par-migrate-volume
Add support for FC zone lifecycle management

Allows automated zone lifecycle management in the attach/detach
entry points of the volume manager for FC volumes (when fabric
zoning is enabled). Zones are configured automatically as part
of the active zone set in the FC SAN to provide a more flexible
and secure way of controlling access. FC zone manager enables
SAN vendors to add support for pluggable implementations.

Change-Id: I86e02e11afec71ffa25dfbcbd0dc3ddcc35741ea
Implements: blueprint cinder-fc-zone-manager
Fix FC connection handling in the storwize driver

Creating FC connections was not working due to several issues:

1. The lsfabric command in the Storwize/SVC omitted the delimeter and so
the output was not correctly parsed by the driver.
2. In some cases comparisons of WWPNs were not case insensitive - ensure
we compare lower-case WWPNs.
3. If the host supplied extra information in the connector (e.g. iSCSI
initiator name in case of an FC setup, or FC WWNNs/WWPNs in an iSCSI
setup), the driver would try to make those host mappings on the storage
too.  This could lead into unwanted behaviour and confusing error
messages (for example, in an FC setup reaching the maximum number of
iSCSI mappings).

In addition, unit tests weren't properly testing FC - instead they were
always testing iSCSI due to an error in parsing extra_specs. This patch
fixes that error and the unit tests as well.

These changes must all be made together for unit tests to pass.

Closes-bug: 1279758
Change-Id: I64e21609ba089cf5bfd52ce2644f6f229bcc69dc
Fix webob.exc.HTTPForbidden parameter miss

HTTPForbidden should use the parameter 'explanation'
instead of 'detail'.
This patch fixes this bug.

Change-Id: I688145f7ea942277c7d3ed3221d6ff2bc7a852ad
Closes-Bug: #1283872
Merge "Fix webob.exc.HTTPForbidden parameter miss"
Merge "Fix FC connection handling in the storwize driver"
Merge "Change default policy for volume_extension:volume_tenant_attribute"
Merge "Nexenta iSCSI driver: fixed volume_migration"
Driver for IBM SONAS and Storwize V7000 Unified

The IBM NAS Driver currently implemented to work over NFS protocol,
and implements required set of features for OpenStack Icehouse release,
using the features of these storage products. It allows IBM® SONAS®
and Storwize® V7000 Unified filers to host storage for OpenStack
environment by integrating with Openstack Cinder service.

DocImpact

Change-Id: I0d630bf7e69454b88e9d1e93b4099631f6138204
Implements: blueprint ibm-nas-volume-driver
Related-Bug: #1281152
Merge "Driver for IBM SONAS and Storwize V7000 Unified"
Merge "Add x-openstack-request-id to cinder responses"
Merge "Add support for FC zone lifecycle management"
Merge "Sync oslo imageutils, strutils to cinder"
Merge "Add encrypted flag to volumes"
Merge "3PAR: Backend assisted volume migrate"