'Map lun to sepecific target.'

@_connection_checker
def map_lun(self, lun_index, target_index):

    LOG.debug('LUNIndex:    %(lun)s,    targetIndex:    %(tgt)s', {'lun': lun_index, 'tgt': target_index})
    res_details = self._get_res_details('/cgi-bin/disk/iscsi_target_setting.cgi?', func='add_lun', LUNIndex=lun_index, targetIndex=target_index, sid=self.sid)
    root = ET.fromstring(res_details['data'])
    if (root.find('authPassed').text == '0'):
        raise exception.VolumeBackendAPIException(data=_('Session    id    expired'))
    if (root.find('result').text < '0'):
        raise exception.VolumeBackendAPIException(data=(_('Map    lun    %(lun_index)s    to    target    %(target_index)s    failed') % {'lun_index': six.text_type(lun_index), 'target_index': six.text_type(target_index)}))
