'Execute get_lun_info API.'

@_connection_checker
def get_lun_info(self, **kwargs):

    for (key, value) in kwargs.items():
        LOG.debug('%(key)s    =    %(val)s', {'key': key, 'val': value})
    res_details = self._get_res_details('/cgi-bin/disk/iscsi_portal_setting.cgi?', func='extra_get', lunList='1', sid=self.sid)
    root = ET.fromstring(res_details['data'])
    if (root.find('authPassed').text == '0'):
        raise exception.VolumeBackendAPIException(data=_('Session    id    expired'))
    if (('LUNIndex' in kwargs) or ('LUNName' in kwargs) or ('LUNNAA' in kwargs)):
        lun_list = root.find('iSCSILUNList')
        lun_info_tree = lun_list.findall('LUNInfo')
        for lun in lun_info_tree:
            if ('LUNIndex' in kwargs):
                if (kwargs['LUNIndex'] == lun.find('LUNIndex').text):
                    LOG.debug('LUNIndex:%s', lun.find('LUNIndex').text)
                    return lun
            elif ('LUNName' in kwargs):
                if (kwargs['LUNName'] == lun.find('LUNName').text):
                    LOG.debug('LUNName:%s', lun.find('LUNName').text)
                    return lun
            elif ('LUNNAA' in kwargs):
                if (kwargs['LUNNAA'] == lun.find('LUNNAA').text):
                    LOG.debug('LUNNAA:%s', lun.find('LUNNAA').text)
                    return lun
    return None
