Adds storwize_svc_npiv_compatibility_mode flag to Storwize/SVC driver

This configuration option allows the driver to function in an
environment where an attach operation occurs before the virtual FC
ports are logged into the fabric.

Today's behaviour (which is maintained as default behaviour) is to
only build the initiator_target_map for initiator ports that are
logged into the fabric, and error if there are no such ports.

If this new flag is set to True, then if no initiator ports are
found on the fabric, ALL initiator ports are placed into the
initiator_target_map, rather than none, which is the case today.

Closes-Bug: 1346622
Change-Id: Ie722612bc5a9af2816348392c0c39da003b99028
Add hacking test

There is no test for cinder/hacking/check.py, the patch add test
for it.  Also update the location in check.py to reference the
right path to add test cases.

Change-Id: I094e712339e53380ce4ed58b60beda1c4f53d5c1
VMware:Support for create disk and disk descriptor

This change adds utility methods for creating a virtual disk and virtual
disk descriptor. Currently volume creation from preallocated image doesn't
honour the disk type in the volume extra spec and adapter type in the image
meta-data. The workflow to address these issues require support for the
above mentioned methods.

Change-Id: If8ec1fd6c60d26552e5fb58b8bb16a8cc87d9d28
Partial-Bug: #1284284
Partial-Bug: #1287185
Merge "Add hacking test"
Make manage/unmanage admin only

Manage/Unmanage functionality should be admin
only commands. Make this the default in the policy file.

Change-Id: Ieb71891cdedd36f862f3eaae50174e294417b122
Add hacking check for explicit import of _

Unit tests are not guaranteed to discover whether
the _() function has been explicitly imported to a file.

To ensure that people do not add messages with _() translations
without importing the function, I am adding this hacking check
to enforce the import of _ when it is needed.

The commit includes fixes for offenders found by the new
check.

Change-Id: I616dce6a9da461b3ad2cfaf5e114a2aaa8ced9fa
Closes-Bug: #1348129
Add storageHost content to volume messages.

Implements: Volume notification Storage Host entry in the payload

Closes-Bug: 1333273
Change-Id: I370eaeaafd8fd4a8888f8250b49dffcbffb3a876
Fix no handlers could be found issue

This patch fixes the error message during
unit tests for 2 issues.

1) test_migrations tries to LOG and exception before
setUp is called because of the method decorator.

2) the hp_lefthand_rest_proxy tries to LOG an exception
for a missing import.

Change-Id: I11d2c9320c0a216b5795207488b906795d27b1e0
Closes-Bug: #1341752
Merge "Make manage/unmanage admin only"
Remove Hyper-V dependency in the Windows Cinder Volume Driver

Currently, the Windows Cinder Volume driver depends on the Hyper-V
feature in order to be able to access the WMI namespaces that
are used for some of the volume related operations.

Those WMI calls must be urgently replaced with Win32 calls in order
to provide CI tests performed on Windows Storage Server edition.

Change-Id: Ib4b8bccee3c7ee86e6cc44e1b16d20d455e61612
Closes-Bug: #1346496
Add index for reservations on (deleted, expire)

the query for expire_reservations currently does a full table scan.
This adds an index so frequent invocations of expire does not bog
down the database.

Change-Id: Ic6f6e4262746753d869ad37b8aaaa5ffc1c4efef
Resolves-bug: 1348720
HP 3PAR retype implementation

Add retype support to the HP 3PAR driver. The driver will modify the
volume's current userCPG, snapCPG provisioningType, and QOS settings, as
needed, to make the volume behave appropriately for the new type. The
existing retype framework handles what to do if the driver cannot retype
(when it returns False or raises an exception).

The combination of optional type-specified VV set, old-style scoped
extra-specs and QOS-specs will be resolved using existing code. So no
new interpretation of a mixed-up type specifications will be introduced
(no need to re-document these driver caveats).

Other than the usual validity checking, the 3PAR retype will have one
limitation. Retype will not be allowed if the volume has snapshots and
the retype would require modifying/tuning the snapCPG or userCPG.

Change-Id: I6c7816233635e369dd7ff349c2a437b22a849a84
Implements: blueprint retype-hp-3par
Set python hash seed to 0 in tox.ini

New tox (>=1.7.0) sets a random python hash seed by default. This is
generally good for testing because it will help keep projects working
regardless of the hash seed, but cinder unittests don't currently pass
with a random hash seed so set it to the python default seed.

This change will allow us to use new tox again and remove the
restriction on tox<=1.6.1 to run unittests.

Redundant setenvs for specific test envs are removed to prevent them
from overriding the PYTHONHASHSEED value.

Note this change will need to be backported to the stable branches to
keep unittests there working with new tox as well.

Change-Id: Ia55031528d082a1b11da6890447c5584e9e27551
Remove reattach function in cinder-manage

The reattach function in cinder-manage depends on
db.instance_get, which is not available in cinder db.
db.instance_get is only available in nova db. Hence, the
reattach function should be removed from cinder-manage.

Change-Id: If33bf2f281735bd530641c1e6d15e9645f38b4b4
Closes-Bug: #1167931
Remove cinder-rpc-zmq-receiver

cinder-rpc-zmq-receiver should be removed as part of the switch to
oslo.messaging. It is now replaced with oslo-messaging-zmq-receiver.

Change-Id: I1fd7d7571bb5660bf77e7664f35052db29ebea57
Closes-Bug: #1348856
Remove cinder-clear-rabbit-queues

cinder-clear-rabbit-queues should be removed because it does not
appear to be widely used and there is no user documentation for
it. Also, RabbitMQ now includes a management plugin and CLI,
rabbitmqadmin, that allows you to delete queues and exchanges.
This script was also removed in nova as part of
https://review.openstack.org/#/c/40355/.

DocImpact: The RabbitMQ management plugin ships with rabbitmqadmin.
It supports RabbitMQ version 2.8.x and above.
Closes-Bug: #1348859

Change-Id: I77bb54065280771e5cc64835af9c584626ecf8b8
Modify the index migration slightly for backport

If we choose to backport this fix, the migration should be catching
an operational error. Also add a log statement as requested by the
nova review.

Change-Id: Ib33b8711900db9dc2826a099ff3cc6adffc8babb
Partial-bug: 1348720
Merge "Remove cinder-clear-rabbit-queues"
Merge "Fix no handlers could be found issue"
Merge "Set python hash seed to 0 in tox.ini"