VMAX driver - retype fix where workload is None

The issue occurs when workload is 'None', because the code expects
uppercase 'NONE'. This fix rectifies this.

Change-Id: Idec99b206f6e27b853175432dcba174f3fa400d0
Partial-Bug: #1742917
This commit is contained in:
Helen Walsh 2018-01-12 12:14:33 +00:00
parent 567564cae8
commit 1034f54c33
2 changed files with 16 additions and 1 deletions

View File

@ -77,6 +77,7 @@ class VMAXCommonData(object):
failed_resource = 'OS-failed-resource'
fake_host = 'HostX@Backend#Diamond+DSS+SRP_1+000197800123'
new_host = 'HostX@Backend#Silver+OLTP+SRP_1+000197800123'
none_host = 'HostX@Backend#Diamond+None+SRP_1+000197800123'
version = '3.1.0'
volume_wwn = '600000345'
remote_array = '000197800124'
@ -4650,6 +4651,17 @@ class VMAXCommonTest(test.TestCase):
self.data.srp, volume_name, False)
self.assertEqual(ref_return, return_val)
def test_is_valid_for_storage_assisted_migration_none(self):
device_id = self.data.device_id
host = {'host': self.data.none_host}
volume_name = self.data.test_volume.name
# Testing for 'NONE' Workload
ref_return = (True, 'Diamond', 'NONE')
return_val = self.common._is_valid_for_storage_assisted_migration(
device_id, host, self.data.array,
self.data.srp, volume_name, False)
self.assertEqual(ref_return, return_val)
def test_find_volume_group(self):
group = self.data.test_group_1
array = self.data.array

View File

@ -2366,7 +2366,10 @@ class VMAXCommon(object):
pool_details = info_detail[1].split('+')
if len(pool_details) == 4:
target_slo = pool_details[0]
target_workload = pool_details[1]
if pool_details[1].lower() == 'none':
target_workload = 'NONE'
else:
target_workload = pool_details[1]
target_srp = pool_details[2]
target_array_serial = pool_details[3]
elif len(pool_details) == 3: