:return: A dictionnary with the topology ready to dump to a .gns3

def project_to_topology(project):
    """
    :return: A dictionnary with the topology ready to dump to a .gns3
    """
    data = {
        "project_id": project.id,
        "name": project.name,
        "auto_start": project.auto_start,
        "auto_open": project.auto_open,
        "auto_close": project.auto_close,
        "scene_width": project.scene_width,
        "scene_height": project.scene_height,
        "zoom": project.zoom,
        "show_layers": project.show_layers,
        "snap_to_grid": project.snap_to_grid,
        "show_grid": project.show_grid,
        "show_interface_labels": project.show_interface_labels,
        "topology": {
            "nodes": [],
            "links": [],
            "computes": [],
            "drawings": []
        },
        "type": "topology",
        "revision": GNS3_FILE_FORMAT_REVISION,
        "version": __version__
    }

    computes = set()
    for node in project.nodes.values():
        computes.add(node.compute)
        data["topology"]["nodes"].append(node.__json__(topology_dump=True))
    for link in project.links.values():
        data["topology"]["links"].append(link.__json__(topology_dump=True))
    for drawing in project.drawings.values():
        data["topology"]["drawings"].append(drawing.__json__(topology_dump=True))
    for compute in computes:
        if hasattr(compute, "__json__"):
            compute = compute.__json__(topology_dump=True)
            if compute["compute_id"] not in ("vm", "local", ):
                data["topology"]["computes"].append(compute)
    _check_topology_schema(data)
    return data