- .def("get_pstate_count", &Host::get_pstate_count, "Retrieve the count of defined pstate levels")
- .def("get_pstate_speed", &Host::get_pstate_speed, "Retrieve the maximal speed at the given pstate")
- .def("get_netpoint", &Host::get_netpoint, "Retrieve the netpoint associated to this host")
+ .def("get_pstate_count",
+ [](py::object self) // XBT_ATTRIB_DEPRECATED_v334
+ {
+ PyErr_WarnEx(
+ PyExc_DeprecationWarning,
+ "get_pstate_count() is deprecated and will be dropped after v3.33, use pstate_count instead.", 1);
+ return self.attr("pstate_count");
+ })
+ .def_property_readonly("pstate_count", &Host::get_pstate_count, "Retrieve the count of defined pstate levels")
+ .def("get_pstate_speed",
+ [](py::object self, int state) // XBT_ATTRIB_DEPRECATED_v334
+ {
+ PyErr_WarnEx(
+ PyExc_DeprecationWarning,
+ "get_pstate_speed() is deprecated and will be dropped after v3.33, use pstate_speed instead.", 1);
+ return self.attr("pstate_speed")(state);
+ })
+ .def("pstate_speed", &Host::get_pstate_speed, py::call_guard<py::gil_scoped_release>(),
+ "Retrieve the maximal speed at the given pstate")
+ .def("get_netpoint",
+ [](py::object self) // XBT_ATTRIB_DEPRECATED_v334
+ {
+ PyErr_WarnEx(PyExc_DeprecationWarning,
+ "get_netpoint() is deprecated and will be dropped after v3.33, use netpoint instead.", 1);
+ return self.attr("netpoint");
+ })
+ .def_property_readonly("netpoint", &Host::get_netpoint, "Retrieve the netpoint associated to this zone")