'Return details about the LUN
:return: Details about the lun
:rtype: dict'

def get_lun(self):

    luns = []
    tag = None
    while True:
        lun_info = netapp_utils.zapi.NaElement('lun-get-iter')
        if tag:
            lun_info.add_new_child('tag', tag, True)
        query_details = netapp_utils.zapi.NaElement('lun-info')
        query_details.add_new_child('vserver', self.vserver)
        query_details.add_new_child('volume', self.flexvol_name)
        query = netapp_utils.zapi.NaElement('query')
        query.add_child_elem(query_details)
        lun_info.add_child_elem(query)
        result = self.server.invoke_successfully(lun_info, True)
        if (result.get_child_by_name('num-records') and (int(result.get_child_content('num-records')) >= 1)):
            attr_list = result.get_child_by_name('attributes-list')
            luns.extend(attr_list.get_children())
        tag = result.get_child_content('next-tag')
        if (tag is None):
            break
    return_value = None
    for lun in luns:
        path = lun.get_child_content('path')
        (_rest, _splitter, found_name) = path.rpartition('/')
        if (found_name == self.name):
            size = lun.get_child_content('size')
            attached_to = None
            lun_id = None
            if (lun.get_child_content('mapped') == 'true'):
                lun_map_list = netapp_utils.zapi.NaElement.create_node_with_children('lun-map-list-info', **{'path': path})
                result = self.server.invoke_successfully(lun_map_list, enable_tunneling=True)
                igroups = result.get_child_by_name('initiator-groups')
                if igroups:
                    for igroup_info in igroups.get_children():
                        igroup = igroup_info.get_child_content('initiator-group-name')
                        attached_to = igroup
                        lun_id = igroup_info.get_child_content('lun-id')
            return_value = {'name': found_name, 'size': size, 'attached_to': attached_to, 'lun_id': lun_id}
        else:
            continue
    return return_value
