'Execute delete lun API.'

@_connection_checker
def delete_lun(self, vol_id, *args, **kwargs):

    LOG.debug('Deleting    volume    id    %s', vol_id)
    res_details = self._get_res_details('/cgi-bin/disk/iscsi_lun_setting.cgi?', func='remove_lun', run_background='1', ha_sync='1', LUNIndex=vol_id, sid=self.sid)
    data_set_is_busy = '-205041'
    root = ET.fromstring(res_details['data'])
    if (root.find('authPassed').text == '0'):
        raise exception.VolumeBackendAPIException(data=_('Session    id    expired'))
    if (root.find('result').text == data_set_is_busy):
        return True
    if (root.find('result').text < '0'):
        msg = (_('Volume    %s    delete    failed') % vol_id)
        raise exception.VolumeBackendAPIException(data=msg)
    return False
