]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mgr/PyModule.h
import quincy beta 17.1.0
[ceph.git] / ceph / src / mgr / PyModule.h
index 6df3ee5860f4c380abb5f8dddc07735bcf3bd5cf..8d88ff94c6271cd0c65a3ee04752f10b499daff8 100644 (file)
@@ -26,7 +26,9 @@
 
 class MonClient;
 
-std::string handle_pyerror();
+std::string handle_pyerror(bool generate_crash_dump = false,
+                          std::string module = {},
+                          std::string caller = {});
 
 std::string peek_pyerror();
 
@@ -85,6 +87,9 @@ private:
   int load_options();
   std::map<std::string, MgrMap::ModuleOption> options;
 
+  int load_notify_types();
+  std::set<std::string> notify_types;
+
 public:
   static std::string mgr_store_prefix;
 
@@ -152,6 +157,10 @@ public:
   bool is_loaded() const { std::lock_guard l(lock) ; return loaded; }
   bool is_always_on() const { std::lock_guard l(lock) ; return always_on; }
 
+  bool should_notify(const std::string& notify_type) const {
+    return notify_types.count(notify_type);
+  }
+
   const std::string &get_name() const {
     std::lock_guard l(lock) ; return module_name;
   }
@@ -176,9 +185,9 @@ public:
   
   ~PyModuleConfig();
 
-  void set_config(
+  std::pair<int, std::string> set_config(
     MonClient *monc,
     const std::string &module_name,
-    const std::string &key, const boost::optional<std::string>& val);
+    const std::string &key, const std::optional<std::string>& val);
 
 };