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
Remove old driver mappings from Havana

These were deprecated in Havana and don't need to be in Juno.

Change-Id: I5ff537cc08f38f16f3d36a8a3714c025266f67fb
Fallback to None on missing Glance image attrs

It's possible for glance images to be missing attributes like name and
checksum. We'll just set those to None by default to avoid missing key
exceptions being raised.

Closes-Bug: #1308058
Change-Id: I85c42f8351763da201021a22f5ff0ebd62c6b2db
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
Fix bad indentation in tests

Remove a number of bad indentation errors flagged
by pylint.

Change-Id: I0a048d96aba09b2f14360ceffb1fe167fb613674
Keep volume available if retype fails due to quota

If we're over quota for a volume type that we're retyping a volume to,
keep the volume available.

Closes-Bug: #1308819
Change-Id: I7e66e95bf12b7e5a6df04eeb5a501badb5f2941f
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 "Fix bad indentation in tests"
Merge "Fallback to None on missing Glance image attrs"
Merge "Remove old driver mappings from Havana"
Merge "Keep volume available if retype fails due to quota"
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."