"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cinder/tests/unit/volume/drivers/ibm/test_ds8k_proxy.py" between
cinder-17.0.0.tar.gz and cinder-17.0.1.tar.gz

About: OpenStack Cinder (Core Service: Block Storage) provides persistent block storage to running instances. Its pluggable driver architecture facilitates the creation and management of block storage devices.
The "Victoria" series (latest release).

test_ds8k_proxy.py  (cinder-17.0.0):test_ds8k_proxy.py  (cinder-17.0.1)
skipping to change at line 538 skipping to change at line 538
}, },
"data": "data":
{ {
"systems": "systems":
[ [
{ {
"id": TEST_SOURCE_SYSTEM_UNIT, "id": TEST_SOURCE_SYSTEM_UNIT,
"name": "", "name": "",
"state": "online", "state": "online",
"release": "7.5.1", "release": "7.5.1",
"bundle": "87.51.9.0", "bundle": "87.51.63.0",
"MTM": "2421-961", "MTM": "2421-961",
"sn": "1300741", "sn": "1300741",
"wwnn": TEST_SOURCE_WWNN, "wwnn": TEST_SOURCE_WWNN,
"cap": "28019290210304", "cap": "28019290210304",
"capalloc": "6933150957568", "capalloc": "6933150957568",
"capavail": "21086139252736", "capavail": "21086139252736",
"capraw": "40265318400000" "capraw": "40265318400000"
} }
] ]
} }
skipping to change at line 566 skipping to change at line 566
}, },
"data": "data":
{ {
"systems": "systems":
[ [
{ {
"id": TEST_TARGET_SYSTEM_UNIT, "id": TEST_TARGET_SYSTEM_UNIT,
"name": "", "name": "",
"state": "online", "state": "online",
"release": "7.5.1", "release": "7.5.1",
"bundle": "87.51.9.0", "bundle": "87.51.63.0",
"MTM": "2421-962", "MTM": "2421-962",
"sn": "1300742", "sn": "1300742",
"wwnn": TEST_TARGET_WWNN, "wwnn": TEST_TARGET_WWNN,
"cap": "20019290210304", "cap": "20019290210304",
"capalloc": "4833150957560", "capalloc": "4833150957560",
"capavail": "31086139252736", "capavail": "31086139252736",
"capraw": "20265318400000" "capraw": "20265318400000"
} }
] ]
} }
skipping to change at line 989 skipping to change at line 989
value = getattr(self.conf, key, None) value = getattr(self.conf, key, None)
if not value and key not in self.OPTIONAL_PARAMS: if not value and key not in self.OPTIONAL_PARAMS:
value = self.conf.get(key) value = self.conf.get(key)
return value return value
def _create_client(self): def _create_client(self):
self._client = FakeRESTScheduler(self._get_value('san_ip'), self._client = FakeRESTScheduler(self._get_value('san_ip'),
self._get_value('san_login'), self._get_value('san_login'),
self._get_value('san_password'), self._get_value('san_password'),
None, True) None, True)
self.backend['rest_version'] = self._get_version()['bundle_version'] self.backend['rest_version'] = self._get_version()['bundle']
class FakeDS8KECKDHelper(FakeDS8KCommonHelper, helper.DS8KECKDHelper): class FakeDS8KECKDHelper(FakeDS8KCommonHelper, helper.DS8KECKDHelper):
"""Fake IBM DS8K ECKD Helper.""" """Fake IBM DS8K ECKD Helper."""
pass pass
class FakeDS8KReplSourceHelper(FakeDS8KCommonHelper, class FakeDS8KReplSourceHelper(FakeDS8KCommonHelper,
helper.DS8KReplicationSourceHelper): helper.DS8KReplicationSourceHelper):
"""Fake IBM DS8K Replication Target Helper.""" """Fake IBM DS8K Replication Target Helper."""
skipping to change at line 1160 skipping to change at line 1160
"release": "8.0.1", "release": "8.0.1",
"wwnn": TEST_SOURCE_WWNN, "wwnn": TEST_SOURCE_WWNN,
} }
self.assertRaises(exception.VolumeDriverException, self.assertRaises(exception.VolumeDriverException,
FakeDS8KCommonHelper, self.configuration, None) FakeDS8KCommonHelper, self.configuration, None)
@mock.patch.object(helper.DS8KCommonHelper, '_get_version') @mock.patch.object(helper.DS8KCommonHelper, '_get_version')
def test_verify_rest_version_for_5_7_fb(self, mock_get_version): def test_verify_rest_version_for_5_7_fb(self, mock_get_version):
"""test the min version of REST for fb volume in 7.x.""" """test the min version of REST for fb volume in 7.x."""
mock_get_version.return_value = { mock_get_version.return_value = {
"bundle_version": "5.7.50.0" "bundle": "87.50.38.0"
} }
self.assertRaises(exception.VolumeDriverException, self.assertRaises(exception.VolumeDriverException,
FakeDS8KCommonHelper, self.configuration, None) FakeDS8KCommonHelper, self.configuration, None)
@mock.patch.object(helper.DS8KCommonHelper, '_get_version') @mock.patch.object(helper.DS8KCommonHelper, '_get_version')
def test_verify_rest_version_for_5_8_fb(self, mock_get_version): def test_verify_rest_version_for_5_8_fb(self, mock_get_version):
"""test the min version of REST for fb volume in 8.1.""" """test the min version of REST for fb volume in 8.1."""
mock_get_version.return_value = { mock_get_version.return_value = {
"bundle_version": "5.8.10.0" "bundle": "88.10.112.0"
} }
FakeDS8KCommonHelper(self.configuration, None) FakeDS8KCommonHelper(self.configuration, None)
@mock.patch.object(helper.DS8KECKDHelper, '_get_version') @mock.patch.object(helper.DS8KECKDHelper, '_get_version')
def test_verify_rest_version_for_5_7_eckd(self, mock_get_version): def test_verify_rest_version_for_5_7_eckd(self, mock_get_version):
"""test the min version of REST for eckd volume in 7.x.""" """test the min version of REST for eckd volume in 7.x."""
self.configuration.connection_type = ( self.configuration.connection_type = (
storage.XIV_CONNECTION_TYPE_FC_ECKD) storage.XIV_CONNECTION_TYPE_FC_ECKD)
self.configuration.ds8k_devadd_unitadd_mapping = 'C4-10' self.configuration.ds8k_devadd_unitadd_mapping = 'C4-10'
self.configuration.ds8k_ssid_prefix = 'FF' self.configuration.ds8k_ssid_prefix = 'FF'
self.configuration.san_clustername = TEST_ECKD_POOL_ID self.configuration.san_clustername = TEST_ECKD_POOL_ID
mock_get_version.return_value = { mock_get_version.return_value = {
"bundle_version": "5.7.50.0" "bundle": "87.50.22.0"
} }
self.assertRaises(exception.VolumeDriverException, self.assertRaises(exception.VolumeDriverException,
FakeDS8KECKDHelper, self.configuration, None) FakeDS8KECKDHelper, self.configuration, None)
@mock.patch.object(helper.DS8KECKDHelper, '_get_version') @mock.patch.object(helper.DS8KECKDHelper, '_get_version')
def test_verify_rest_version_for_5_8_eckd_1(self, mock_get_version): def test_verify_rest_version_for_5_8_eckd_1(self, mock_get_version):
"""test the min version of REST for eckd volume in 8.1.""" """test the min version of REST for eckd volume in 8.1."""
self.configuration.connection_type = ( self.configuration.connection_type = (
storage.XIV_CONNECTION_TYPE_FC_ECKD) storage.XIV_CONNECTION_TYPE_FC_ECKD)
self.configuration.ds8k_devadd_unitadd_mapping = 'C4-10' self.configuration.ds8k_devadd_unitadd_mapping = 'C4-10'
self.configuration.ds8k_ssid_prefix = 'FF' self.configuration.ds8k_ssid_prefix = 'FF'
self.configuration.san_clustername = TEST_ECKD_POOL_ID self.configuration.san_clustername = TEST_ECKD_POOL_ID
mock_get_version.return_value = { mock_get_version.return_value = {
"bundle_version": "5.8.10.0" "bundle": "88.10.112.0"
} }
self.assertRaises(exception.VolumeDriverException, self.assertRaises(exception.VolumeDriverException,
FakeDS8KECKDHelper, self.configuration, None) FakeDS8KECKDHelper, self.configuration, None)
@mock.patch.object(helper.DS8KECKDHelper, '_get_version') @mock.patch.object(helper.DS8KECKDHelper, '_get_version')
def test_verify_rest_version_for_5_8_eckd_2(self, mock_get_version): def test_verify_rest_version_for_5_8_eckd_2(self, mock_get_version):
"""test the min version of REST for eckd volume in 8.2.""" """test the min version of REST for eckd volume in 8.2."""
self.configuration.connection_type = ( self.configuration.connection_type = (
storage.XIV_CONNECTION_TYPE_FC_ECKD) storage.XIV_CONNECTION_TYPE_FC_ECKD)
self.configuration.ds8k_devadd_unitadd_mapping = 'C4-10' self.configuration.ds8k_devadd_unitadd_mapping = 'C4-10'
self.configuration.ds8k_ssid_prefix = 'FF' self.configuration.ds8k_ssid_prefix = 'FF'
self.configuration.san_clustername = TEST_ECKD_POOL_ID self.configuration.san_clustername = TEST_ECKD_POOL_ID
mock_get_version.return_value = { mock_get_version.return_value = {
"bundle_version": "5.8.20.0" "bundle": "88.20.40.0"
} }
self.assertRaises(exception.VolumeDriverException, self.assertRaises(exception.VolumeDriverException,
FakeDS8KECKDHelper, self.configuration, None) FakeDS8KECKDHelper, self.configuration, None)
def test_verify_pools_with_wrong_type(self): def test_verify_pools_with_wrong_type(self):
"""pool should be set according to the connection type.""" """pool should be set according to the connection type."""
self.configuration.san_clustername = TEST_POOLS_STR self.configuration.san_clustername = TEST_POOLS_STR
self.configuration.connection_type = ( self.configuration.connection_type = (
storage.XIV_CONNECTION_TYPE_FC_ECKD) storage.XIV_CONNECTION_TYPE_FC_ECKD)
self.assertRaises(exception.InvalidParameterValue, self.assertRaises(exception.InvalidParameterValue,
skipping to change at line 3207 skipping to change at line 3207
'group', 'group',
{'consistent_group_replication_enabled': '<is> True'} {'consistent_group_replication_enabled': '<is> True'}
) )
group = self._create_group(host=TEST_GROUP_HOST, group = self._create_group(host=TEST_GROUP_HOST,
group_type_id=group_type.id, group_type_id=group_type.id,
volume_type_ids=[vol_type.id]) volume_type_ids=[vol_type.id])
self.assertRaises(exception.VolumeDriverException, self.assertRaises(exception.VolumeDriverException,
self.driver.create_group, self.driver.create_group,
self.ctxt, group) self.ctxt, group)
@ddt.data({'bundle_version': "5.7.51.1067"}, @ddt.data({'bundle': "87.51.60.0"},
{'bundle_version': "5.8.20.1058"}) {'bundle': "88.20.47.0"})
@mock.patch.object(helper.DS8KCommonHelper, '_get_version') @mock.patch.object(helper.DS8KCommonHelper, '_get_version')
def test_create_replication_consisgroup_should_verify_rest_version( def test_create_replication_consisgroup_should_verify_rest_version(
self, rest_version, mock_get_version): self, rest_version, mock_get_version):
"""Driver should verify whether does REST support pprc cg or not.""" """Driver should verify whether does REST support pprc cg or not."""
self.configuration.lss_range_for_cg = '20-23' self.configuration.lss_range_for_cg = '20-23'
mock_get_version.return_value = rest_version mock_get_version.return_value = rest_version
self.driver = FakeDS8KProxy(self.storage_info, self.logger, self.driver = FakeDS8KProxy(self.storage_info, self.logger,
self.exception, self) self.exception, self)
self.driver.setup(self.ctxt) self.driver.setup(self.ctxt)
 End of changes. 9 change blocks. 
10 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)