]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mgr/PyModules.h
update sources to v12.1.2
[ceph.git] / ceph / src / mgr / PyModules.h
index 467555b51a1feca1111631340c1fb08de296e606..431abec76f0e3cf4b814ed51239dc5d7feb99a46 100644 (file)
 #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<std::string, std::string> config_cache;
 
-  std::vector<ModuleCommand> get_commands();
+  // Python command definitions, including callback
+  std::vector<ModuleCommand> get_py_commands() const;
+
+  // Monitor command definitions, suitable for CLI
+  std::vector<MonCommand> get_commands() const;
 
   void insert_config(const std::map<std::string, std::string> &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);