def get_target_admin(self): root_helper = utils.get_root_helper() if CONF.iser_helper == 'fake': return iscsi.FakeIscsiHelper() else: return iscsi.ISERTgtAdm(root_helper, CONF.volumes_dir)
def get_target_admin(self): root_helper = utils.get_root_helper() if CONF.iscsi_helper == 'iseradm': return iscsi.ISERTgtAdm(root_helper, CONF.volumes_dir, CONF.iscsi_target_prefix) elif CONF.iscsi_helper == 'tgtadm': return iscsi.TgtAdm(root_helper, CONF.volumes_dir, CONF.iscsi_target_prefix) elif CONF.iscsi_helper == 'fake': return iscsi.FakeIscsiHelper() elif CONF.iscsi_helper == 'lioadm': return iscsi.LioAdm(root_helper, CONF.lio_initiator_iqns, CONF.iscsi_target_prefix) else: return iscsi.IetAdm(root_helper, CONF.iet_conf, CONF.iscsi_iotype)