def ganeti_host_to_netbox(ganeti_dict, additional_fields):
    """Takes a single entry from the Ganeti host list and returns just the fields pertinent to Netbox
    along with any additional fields that need to be added"""
    shortname = ganeti_dict["name"].split(".")[0]
    output = {
        "name": shortname,
        "vcpus": ganeti_dict["beparams"]["vcpus"],
        "memory": ganeti_dict["beparams"]["memory"],
        "disk": round(sum(ganeti_dict["disk.sizes"]) / 1024, 0),  # ganeti gives megabytes, netbox expects gigabytes
    }
    # admin_state is the desired state of the machine, which maps nicely to the status field.
    if ganeti_dict["admin_state"] == "up":
        output["status"] = "active"
    else:
        output["status"] = "offline"
    output.update(additional_fields)
    return output