]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mgr/PyModuleRegistry.h
import quincy beta 17.1.0
[ceph.git] / ceph / src / mgr / PyModuleRegistry.h
index a5f38e8f65a2729f82d49ce06d690c8c281b2434..4cd98e8827e487f7308146469020733d1e2d2640 100644 (file)
@@ -58,7 +58,7 @@ private:
   /**
    * Discover python modules from local disk
    */
-  std::set<std::string> probe_modules(const std::string &path) const;
+  std::vector<std::string> probe_modules(const std::string &path) const;
 
   PyModuleConfig module_config;
 
@@ -69,7 +69,7 @@ public:
   void update_kv_data(
     const std::string prefix,
     bool incremental,
-    const map<std::string, boost::optional<bufferlist>, std::less<>>& data) {
+    const map<std::string, std::optional<bufferlist>, std::less<>>& data) {
     ceph_assert(active_modules);
     active_modules->update_kv_data(prefix, incremental, data);
   }
@@ -98,6 +98,10 @@ public:
    */
   bool handle_mgr_map(const MgrMap &mgr_map_);
 
+  bool have_standby_modules() const {
+    return !!standby_modules;
+  }
+
   void init();
 
   void upgrade_config(
@@ -187,6 +191,11 @@ public:
     }
   }
 
+  bool should_notify(const std::string& name,
+                    const std::string& notify_type) {
+    return modules.at(name)->should_notify(notify_type);
+  }
+
   std::map<std::string, std::string> get_services() const
   {
     ceph_assert(active_modules);