X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fmgr%2FPyModules.h;h=431abec76f0e3cf4b814ed51239dc5d7feb99a46;hb=c07f9fc5a4f48397831383549fb0482b93480643;hp=467555b51a1feca1111631340c1fb08de296e606;hpb=9439ae556f035e65c9c107ae13ddd09457dbbecd;p=ceph.git diff --git a/ceph/src/mgr/PyModules.h b/ceph/src/mgr/PyModules.h index 467555b51..431abec76 100644 --- a/ceph/src/mgr/PyModules.h +++ b/ceph/src/mgr/PyModules.h @@ -24,11 +24,13 @@ #include "client/Client.h" #include "common/LogClient.h" #include "mon/MgrMap.h" +#include "mon/MonCommand.h" #include "DaemonState.h" #include "ClusterState.h" class ServeThread; +class health_check_map_t; class PyModules { @@ -42,7 +44,7 @@ class PyModules Client &client; Finisher &finisher; - mutable Mutex lock{"PyModules"}; + mutable Mutex lock{"PyModules::lock"}; std::string get_site_packages(); @@ -76,11 +78,19 @@ public: const std::string &svc_name, const std::string &svc_id, const std::string &path); + PyObject *get_perf_schema_python( + const std::string &handle, + const std::string svc_type, + const std::string &svc_id); PyObject *get_context(); std::map config_cache; - std::vector get_commands(); + // Python command definitions, including callback + std::vector get_py_commands() const; + + // Monitor command definitions, suitable for CLI + std::vector get_commands() const; void insert_config(const std::map &new_config); @@ -106,6 +116,10 @@ public: void set_config(const std::string &handle, const std::string &key, const std::string &val); + void set_health_checks(const std::string& handle, + health_check_map_t&& checks); + void get_health_checks(health_check_map_t *checks); + void log(const std::string &handle, int level, const std::string &record);