if self.configuration:
self.configuration.append_config_values(volume_opts)
-
+ self.configuration.append_config_values(iser_opts)
self.set_execute(execute)
self._stats = {}
except (IndexError, ValueError):
if (self.configuration.volume_driver in
['cinder.volume.drivers.lvm.LVMISCSIDriver',
+ 'cinder.volume.drivers.lvm.LVMISERDriver',
'cinder.volume.drivers.lvm.ThinLVMVolumeDriver'] and
- self.configuration.iscsi_helper == 'tgtadm'):
+ self.configuration.iscsi_helper in ('tgtadm', 'iseradm')):
properties['target_lun'] = 1
else:
properties['target_lun'] = 0
class ISERTgtAdm(_ExportMixin, iscsi.ISERTgtAdm):
- pass
+ def _get_target_and_lun(self, context, volume, max_targets):
+ lun = 1 # For tgtadm the controller is lun 0, dev starts at lun 1
+ iscsi_target = 0 # NOTE(jdg): Not used by tgtadm
+ return iscsi_target, lun
+
+ def _get_iscsi_target(self, context, vol_id):
+ return 0
+
+ def _get_target_for_ensure_export(self, context, volume_id):
+ return 1