vmware: Remove deprecation warning from VC driver

The vCenter vmdk driver prints a deprecation warning for ESX vmdk driver.
This change removes that deprecation warning.

Change-Id: I90c00c08ae7b8e5507308de8d0bec32f8683a1d0
Closes-Bug: #1293960
Replace tearDown with addCleanup - Part 4

Infra team has indicated that tearDown should not be used and should
be replaced with addCleanup in all places.

All addCleanup methods will be executed even if one of them fails, while
a failure in tearDown method can leave the rest of the tearDown un-executed,
which can leave stale state laying around.

Moreover, tearDown methods won't run if an exception raises in setUp method,
while addCleanup will run in such case.

This patch replaces tearDown with addCleanup or removes redundant tearDown
methods in cinder unit tests.

Implements blueprint replace-teardown-with-addcleanup

Change-Id: I6947eafa419ed7dda53582484090cd5210274f73
Replace tearDown with addCleanup - Part 5

Replace tearDown with addCleanup in:
- cinder/test.py
- cinder/tests/test_migrations.py

Remove empty tearDown methods from:
- cinder/tests/test_hp3par.py
- cinder/tests/test_hplefthand.py
- cinder/tests/test_ibmnas.py
since it does not add any functionality (and empty setUp methods as well).

Infra team has indicated that tearDown should not be used and should
be replaced with addCleanup in all places.

Implements blueprint replace-teardown-with-addcleanup

Change-Id: Id2fdd3e2e1ab8458083697b6ea6714ca019fd00a
Fix handling multiple WWPNs on preferred FC node

There was a bug in the code that checked to see if the
appropriate WWPN for a preferred node was available on the storage
host in intialize_connection.  It was assumed that there would only
ever be one preferred WWPN.  The code just checked to see if the list of
preferred WWPNs was in the list of available WWPNs.  This would only work
if all of the WWPNs were available on the storage host.  This resulted in
volumes not being able to be mounted when they should have been
available.

This fix changes the check of the preferred WWPNs to check each
item in the list until one is found.  The first one found is used
as the target WWPN.  If no match is found, the old default behavior
of selecting the first available WWPN is used.  I have added a
warning message for this case as it is quite possible that this
won't work in the user's environment as was the case that uncovered
this bug.

Note that this change is only relevant for systems that are not using
multipath as systems that use multipath don't choose one WWPN, they
just send the whole available list back.

Change-Id: I8d3239da24a8f9fbd8309ba5c90b05b29a068754
Close-bug: 1308298
Replace tearDown with addCleanup - Part 2

Replace tearDown with addCleanup in some cinder unit tests.

Infra team has indicated that tearDown should not be used and should
be replaced with addCleanup in all places.

Remove duplicated self.stubs and self._mox declaration in
cinder/tests/test_windows.py.

Implements blueprint replace-teardown-with-addcleanup

Change-Id: I5865cf0197e1d8229afc706b9b14b746f09b5acd
Merge "vmware: Remove deprecation warning from VC driver"
Cinder list does not filter admin metadata.

For example, if you want to filter by 'readonly' attribute,
you do not get results.
This patch adds the admin metadata for filtering.

Change-Id: Ia2a72776e649abd82160cb13ad63489cc760b190
Closes-Bug: #1311277
Remove unused volume instance_uuid methods

This patch removes a db api call that is only
used in unit tests.

Change-Id: Ic686eacdee21d13f8c7c7a16d7353211abc7579a
Related-Bug: #1255925
Merge "Fix handling multiple WWPNs on preferred FC node"
Improve consistency of help strings

Fixes include rework of text, missing or extra spaces, wrong
capitalization and no sentence style capitalization.

Co-Authored-By: Diane Fleming <diane.fleming@rackspace.com>
Change-Id: Iddab947ce9597f4a1de885f1f6c0fb0e5ba9dc46
Merge "Remove unused volume instance_uuid methods"
Merge "Cinder list does not filter admin metadata."
Merge "Replace tearDown with addCleanup - Part 4"
Add disabled kwarg to service_get_all_by_topic

service_get_all_by_topic disabled kwarg allows results to include
where disabled is True or False or both.

Updated code where service_get_all_by_topic is used to make use of
disabled kwarg instead of filtering afterwards.

Removed logging of disabled services in host_manager.

Closes-Bug: #1285673
Change-Id: I748461e64acd4e9563c4016781c5e1d4b116dac8
Storwize/SVC driver detach volume failed

If config two backends on the same storage, but the protocol is
different, one is FC and the other is iSCSI,  that will create two
hosts on the storage.

When detaching the volume which is attached to the iSCSI host, the
driver will get FC host by default, that causes volume status keeps
'detaching'.

Change-Id: Idbdb3861574197549625b4a6b6141197e42857ff
Closes-Bug: #1310559
Fixed 3PAR driver issue finding correct vlun

This patch fixes an issue that happens when
a volume is attached to the same host
more than once.  The driver wasn't looking
for the correct VLUN on the 3par after the
VLUN was created.  We now get the VLUN
information in the return of the creation call.

Change-Id: Id570094f29900c0adcffe6c9d4145c9ad5e3ce4e
Closes-Bug: #1313894
Fix double "the" in Cinder quota warning

Amend a Cinder warning printed with a double "the".

Change-Id: I1471514c9bae84de4b2bef9b11a163314a00802e
Merge "Replace tearDown with addCleanup - Part 5"
Merge "Improve consistency of help strings"
Merge "Fix double "the" in Cinder quota warning"