def METHOD_NAME():
    module = AnsibleModule({}, supports_check_mode=True)
    if not HAVE_XENAPI:
        module.fail_json(changed=False, msg="python xen api required for this module")
    obj = XenServerFacts()
    try:
        session = get_xenapi_session()
    except XenAPI.Failure as e:
        module.fail_json(msg='%s' % e)
    data = {
        'xenserver_version': obj.version,
        'xenserver_codename': obj.codename
    }
    xs_networks = get_networks(session)
    xs_pifs = get_pifs(session)
    xs_vlans = get_vlans(session)
    xs_vms = get_vms(session)
    xs_srs = get_srs(session)
    if xs_vlans:
        data['xs_vlans'] = xs_vlans
    if xs_pifs:
        data['xs_pifs'] = xs_pifs
    if xs_networks:
        data['xs_networks'] = xs_networks
    if xs_vms:
        data['xs_vms'] = xs_vms
    if xs_srs:
        data['xs_srs'] = xs_srs
    module.exit_json(ansible_facts=data)