}
"""
- iscsi_properties = self._get_iscsi_properties(volume)
+ iscsi_properties = self._get_iscsi_properties(volume,
+ connector.get(
+ 'multipath'))
return {
'driver_volume_type': self.iscsi_protocol,
'data': iscsi_properties
self.configuration.iscsi_ip_address = \
self.configuration.iser_ip_address
self.configuration.iscsi_port = self.configuration.iser_port
-
- def initialize_connection(self, volume, connector):
- """Initializes the connection and returns connection info.
- The iser driver returns a driver_volume_type of 'iser'.
- The format of the driver data is defined in _get_iscsi_properties.
- Example return value::
- {
- 'driver_volume_type': 'iser'
- 'data': {
- 'target_discovered': True,
- 'target_iqn':
- 'iqn.2010-10.org.openstack:volume-00000001',
- 'target_portal': '127.0.0.0.1:3260',
- 'volume_id': 1,
- }
- }
- """
- iser_properties = self._get_iscsi_properties(volume)
- return {
- 'driver_volume_type': 'iser',
- 'data': iser_properties
- }
# We make changes persistent
self._persist_configuration(volume['id'])
- iscsi_properties = self._get_iscsi_properties(volume,
- connector.get(
- 'multipath'))
-
- return {
- 'driver_volume_type': self.iscsi_protocol,
- 'data': iscsi_properties
- }
+ return super(LioAdm, self).initialize_connection(volume, connector)
def terminate_connection(self, volume, connector, **kwargs):
volume_iqn = volume['provider_location'].split(' ')[1]
if tid is None:
raise exception.ISCSITargetHelperCommandFailed(
error_message="Target not found")
-
- def initialize_connection(self, volume, connector):
- iscsi_properties = self._get_iscsi_properties(volume)
- return {
- 'driver_volume_type': 'iscsi',
- 'data': iscsi_properties
- }
return tid
- def initialize_connection(self, volume, connector):
- iscsi_properties = self._get_iscsi_properties(volume,
- connector.get(
- 'multipath'))
- return {
- 'driver_volume_type': self.iscsi_protocol,
- 'data': iscsi_properties
- }
-
def remove_iscsi_target(self, tid, lun, vol_id, vol_name, **kwargs):
LOG.info(_LI('Removing iscsi_target for Volume ID: %s'), vol_id)
vol_uuid_file = vol_name