+ /* Class Netzone */
+ py::class_<simgrid::s4u::NetZone, std::unique_ptr<simgrid::s4u::NetZone, py::nodelete>> netzone(m, "NetZone",
+ "Networking Zones");
+ netzone.def_static("create_full_zone", &simgrid::s4u::create_full_zone, "Creates a zone of type FullZone")
+ .def_static("create_torus_zone", &simgrid::s4u::create_torus_zone, "Creates a cluster of type Torus")
+ .def_static("create_fatTree_zone", &simgrid::s4u::create_fatTree_zone, "Creates a cluster of type Fat-Tree")
+ .def_static("create_dragonfly_zone", &simgrid::s4u::create_dragonfly_zone, "Creates a cluster of type Dragonfly")
+ .def_static("create_star_zone", &simgrid::s4u::create_star_zone, "Creates a zone of type Star")
+ .def_static("create_floyd_zone", &simgrid::s4u::create_floyd_zone, "Creates a zone of type Floyd")
+ .def_static("create_dijkstra_zone", &simgrid::s4u::create_floyd_zone, "Creates a zone of type Dijkstra")
+ .def_static("create_vivaldi_zone", &simgrid::s4u::create_vivaldi_zone, "Creates a zone of type Vivaldi")
+ .def_static("create_empty_zone", &simgrid::s4u::create_empty_zone, "Creates a zone of type Empty")
+ .def_static("create_wifi_zone", &simgrid::s4u::create_wifi_zone, "Creates a zone of type Wi-Fi")
+ .def("add_route",
+ py::overload_cast<simgrid::kernel::routing::NetPoint*, simgrid::kernel::routing::NetPoint*,
+ simgrid::kernel::routing::NetPoint*, simgrid::kernel::routing::NetPoint*,
+ const std::vector<simgrid::s4u::LinkInRoute>&, bool>(&simgrid::s4u::NetZone::add_route),
+ "Add a route between 2 netpoints")
+ .def("create_host", py::overload_cast<const std::string&, double>(&simgrid::s4u::NetZone::create_host),
+ "Creates a host")
+ .def("create_host",
+ py::overload_cast<const std::string&, const std::string&>(&simgrid::s4u::NetZone::create_host),
+ "Creates a host")
+ .def("create_host",
+ py::overload_cast<const std::string&, const std::vector<double>&>(&simgrid::s4u::NetZone::create_host),
+ "Creates a host")
+ .def("create_host",
+ py::overload_cast<const std::string&, const std::vector<std::string>&>(&simgrid::s4u::NetZone::create_host),
+ "Creates a host")
+ .def("create_link", py::overload_cast<const std::string&, double>(&simgrid::s4u::NetZone::create_link),
+ "Creates a network link")
+ .def("create_link",
+ py::overload_cast<const std::string&, const std::string&>(&simgrid::s4u::NetZone::create_link),
+ "Creates a network link")
+ .def("create_link",
+ py::overload_cast<const std::string&, const std::vector<double>&>(&simgrid::s4u::NetZone::create_link),
+ "Creates a network link")
+ .def("create_link",
+ py::overload_cast<const std::string&, const std::vector<std::string>&>(&simgrid::s4u::NetZone::create_link),
+ "Creates a network link")
+ .def("create_split_duplex_link",
+ py::overload_cast<const std::string&, double>(&simgrid::s4u::NetZone::create_split_duplex_link),
+ "Creates a split-duplex link")
+ .def("create_split_duplex_link",
+ py::overload_cast<const std::string&, const std::string&>(&simgrid::s4u::NetZone::create_split_duplex_link),
+ "Creates a split-duplex link")
+ .def("create_router", &simgrid::s4u::NetZone::create_router, "Create a router")
+ .def("set_parent", &simgrid::s4u::NetZone::set_parent, "Set the parent of this zone")
+ .def("set_property", &simgrid::s4u::NetZone::set_property, "Add a property to this zone")
+ .def("get_netpoint", &simgrid::s4u::NetZone::get_netpoint, "Retrieve the netpoint associated to this zone")
+ .def("seal", &simgrid::s4u::NetZone::seal, "Seal this NetZone")
+ .def_property_readonly(
+ "name", [](const simgrid::s4u::NetZone* self) { return self->get_name(); }, "The name of this network zone");
+
+ /* Class ClusterCallbacks */
+ py::class_<simgrid::s4u::ClusterCallbacks>(m, "ClusterCallbacks", "Callbacks used to create cluster zones")
+ .def(py::init<const std::function<simgrid::s4u::ClusterCallbacks::ClusterNetPointCb>&,
+ const std::function<simgrid::s4u::ClusterCallbacks::ClusterLinkCb>&,
+ const std::function<simgrid::s4u::ClusterCallbacks::ClusterLinkCb>&>());
+
+ /* Class FatTreeParams */
+ py::class_<simgrid::s4u::FatTreeParams>(m, "FatTreeParams", "Parameters to create a Fat-Tree zone")
+ .def(py::init<unsigned int, const std::vector<unsigned int>&, const std::vector<unsigned int>&,
+ const std::vector<unsigned int>&>());
+
+ /* Class DragonflyParams */
+ py::class_<simgrid::s4u::DragonflyParams>(m, "DragonflyParams", "Parameters to create a Dragonfly zone")
+ .def(py::init<const std::pair<unsigned int, unsigned int>&, const std::pair<unsigned int, unsigned int>&,
+ const std::pair<unsigned int, unsigned int>&, unsigned int>());
+