]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common: add parse_config_files() to ConfigProxy
authorKefu Chai <kchai@redhat.com>
Fri, 31 Aug 2018 14:02:57 +0000 (22:02 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 9 Oct 2018 09:39:40 +0000 (17:39 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/common/config_proxy.h

index a8d7eeacd2a9310c11abbb088d2f9edb442ec8e0..6a63f30f53bdc6eb75c3660be266e72f35fb203a 100644 (file)
@@ -132,6 +132,18 @@ public:
     });
   }
 
+  seastar::future<> parse_config_files(const std::string& conf_files) {
+    return do_change([this, conf_files](ConfigValues& values) {
+      const char* conf_file_paths =
+       conf_files.empty() ? nullptr : conf_files.c_str();
+      get_config().parse_config_files(values,
+                                     obs_mgr,
+                                     conf_file_paths,
+                                     &std::cerr,
+                                     CODE_ENVIRONMENT_DAEMON);
+      });
+  }
+
   using ShardedConfig = seastar::sharded<ConfigProxy>;
 
 private: