"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cinder/tests/unit/volume/drivers/dell_emc/test_xtremio.py" between
cinder-15.5.0.tar.gz and cinder-15.6.0.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 "Train" series (maintained release).

test_xtremio.py  (cinder-15.5.0):test_xtremio.py  (cinder-15.6.0)
skipping to change at line 65 skipping to change at line 65
'target-groups': {'Default': {"index": 1, "name": "Default"}, 'target-groups': {'Default': {"index": 1, "name": "Default"},
}, },
'iscsi-portals': {'10.205.68.5/16': 'iscsi-portals': {'10.205.68.5/16':
{"port-address": {"port-address":
"iqn.2008-05.com.xtremio:001e67939c34", "iqn.2008-05.com.xtremio:001e67939c34",
"ip-port": 3260, "ip-port": 3260,
"ip-addr": "10.205.68.5/16", "ip-addr": "10.205.68.5/16",
"name": "10.205.68.5/16", "name": "10.205.68.5/16",
"index": 1, "index": 1,
}, },
'10.205.68.6/16':
{"port-address":
"iqn.2008-05.com.xtremio:002e67939c34",
"ip-port": 3260,
"ip-addr": "10.205.68.6/16",
"name": "10.205.68.6/16",
"index": 1,
},
}, },
'targets': {'X1-SC2-target1': {'index': 1, "name": "X1-SC2-fc1", 'targets': {'X1-SC2-target1': {'index': 1, "name": "X1-SC2-fc1",
"port-address": "port-address":
"21:00:00:24:ff:57:b2:36", "21:00:00:24:ff:57:b2:36",
'port-type': 'fc', 'port-type': 'fc',
'port-state': 'up', 'port-state': 'up',
}, },
'X1-SC2-target2': {'index': 2, "name": "X1-SC2-fc2", 'X1-SC2-target2': {'index': 2, "name": "X1-SC2-fc2",
"port-address": "port-address":
"21:00:00:24:ff:57:b2:55", "21:00:00:24:ff:57:b2:55",
skipping to change at line 339 skipping to change at line 347
san_password='', san_password='',
san_ip='', san_ip='',
xtremio_cluster_name='brick1', xtremio_cluster_name='brick1',
xtremio_provisioning_factor=20.0, xtremio_provisioning_factor=20.0,
max_over_subscription_ratio=20.0, max_over_subscription_ratio=20.0,
xtremio_volumes_per_glance_cache=100, xtremio_volumes_per_glance_cache=100,
driver_ssl_cert_verify=True, driver_ssl_cert_verify=True,
driver_ssl_cert_path='/test/path/root_ca.crt', driver_ssl_cert_path='/test/path/root_ca.crt',
xtremio_array_busy_retry_count=5, xtremio_array_busy_retry_count=5,
xtremio_array_busy_retry_interval=5, xtremio_array_busy_retry_interval=5,
xtremio_clean_unused_ig=False) xtremio_clean_unused_ig=False,
xtremio_ports=[])
def safe_get(key): def safe_get(key):
return getattr(self.config, key) return getattr(self.config, key)
self.config.safe_get = safe_get self.config.safe_get = safe_get
def setUp(self): def setUp(self):
super(BaseXtremIODriverTestCase, self).setUp() super(BaseXtremIODriverTestCase, self).setUp()
clean_xms_data() clean_xms_data()
self.driver = xtremio.XtremIOISCSIDriver(configuration=self.config) self.driver = xtremio.XtremIOISCSIDriver(configuration=self.config)
skipping to change at line 641 skipping to change at line 650
clone, clone,
self.data.test_volume) self.data.test_volume)
self.assertTrue(delete.called) self.assertTrue(delete.called)
# ##### Connection ##### # ##### Connection #####
def test_no_portals_configured(self, req): def test_no_portals_configured(self, req):
req.side_effect = xms_request req.side_effect = xms_request
portals = xms_data['iscsi-portals'].copy() portals = xms_data['iscsi-portals'].copy()
xms_data['iscsi-portals'].clear() xms_data['iscsi-portals'].clear()
lunmap = {'lun': 4} lunmap = {'lun': 4}
self.assertRaises(exception.VolumeDriverException, self.assertRaises(exception.VolumeBackendAPIException,
self.driver._get_iscsi_properties, lunmap) self.driver._get_iscsi_properties, lunmap)
xms_data['iscsi-portals'] = portals xms_data['iscsi-portals'] = portals
def test_no_allowed_portals(self, req):
req.side_effect = xms_request
lunmap = {'lun': 4}
self.driver.allowed_ports = ['1.2.3.4']
self.assertRaises(exception.VolumeBackendAPIException,
self.driver._get_iscsi_properties, lunmap)
def test_filtered_portals(self, req):
req.side_effect = xms_request
lunmap = {'lun': 4}
self.driver.allowed_ports = ['10.205.68.6']
connection_properties = self.driver._get_iscsi_properties(lunmap)
self.assertEqual(1, len(connection_properties['target_portals']))
self.assertIn('10.205.68.6:3260',
connection_properties['target_portals'])
def test_initialize_connection(self, req): def test_initialize_connection(self, req):
req.side_effect = xms_request req.side_effect = xms_request
self.driver.create_volume(self.data.test_volume) self.driver.create_volume(self.data.test_volume)
self.driver.create_volume(self.data.test_volume2) self.driver.create_volume(self.data.test_volume2)
map_data = self.driver.initialize_connection(self.data.test_volume, map_data = self.driver.initialize_connection(self.data.test_volume,
self.data.connector) self.data.connector)
self.assertEqual(1, map_data['data']['target_lun']) self.assertEqual(1, map_data['data']['target_lun'])
def test_initialize_connection_existing_ig(self, req): def test_initialize_connection_existing_ig(self, req):
req.side_effect = xms_request req.side_effect = xms_request
skipping to change at line 1354 skipping to change at line 1379
self.driver.client.req('volumes') self.driver.client.req('volumes')
@mock.patch('cinder.volume.drivers.dell_emc.xtremio.XtremIOClient.req') @mock.patch('cinder.volume.drivers.dell_emc.xtremio.XtremIOClient.req')
class XtremIODriverFCTestCase(BaseXtremIODriverTestCase): class XtremIODriverFCTestCase(BaseXtremIODriverTestCase):
def setUp(self): def setUp(self):
super(XtremIODriverFCTestCase, self).setUp() super(XtremIODriverFCTestCase, self).setUp()
self.driver = xtremio.XtremIOFCDriver( self.driver = xtremio.XtremIOFCDriver(
configuration=self.config) configuration=self.config)
# ##### Connection FC##### # ##### Connection FC#####
def test_no_targets_configured(self, req):
req.side_effect = xms_request
targets = xms_data['targets'].copy()
xms_data['targets'].clear()
self.assertRaises(exception.VolumeBackendAPIException,
self.driver.get_targets)
xms_data['targets'] = targets
def test_no_allowed_targets(self, req):
req.side_effect = xms_request
self.driver.allowed_ports = ['58:cc:f0:98:49:22:07:02']
self.assertRaises(exception.VolumeBackendAPIException,
self.driver.get_targets)
def test_filtered_targets(self, req):
req.side_effect = xms_request
self.driver.allowed_ports = ['21:00:00:24:ff:57:b2:36']
targets = self.driver.get_targets()
self.assertEqual(1, len(targets))
self.assertIn('21000024ff57b236', targets)
def test_initialize_connection(self, req): def test_initialize_connection(self, req):
req.side_effect = xms_request req.side_effect = xms_request
self.driver.create_volume(self.data.test_volume) self.driver.create_volume(self.data.test_volume)
map_data = self.driver.initialize_connection(self.data.test_volume, map_data = self.driver.initialize_connection(self.data.test_volume,
self.data.connector) self.data.connector)
self.assertEqual(1, map_data['data']['target_lun']) self.assertEqual(1, map_data['data']['target_lun'])
def test_terminate_connection(self, req): def test_terminate_connection(self, req):
req.side_effect = xms_request req.side_effect = xms_request
 End of changes. 5 change blocks. 
2 lines changed or deleted 48 lines changed or added

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