]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common: move ConfigProxy::parse_config_files() into .cc
authorKefu Chai <kchai@redhat.com>
Thu, 6 Aug 2020 08:08:40 +0000 (16:08 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 10 Aug 2020 14:51:17 +0000 (22:51 +0800)
prepare for a proper async version, which will be a little bit more
complicated than the existing one, so better off moving it into .cc file.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/common/config_proxy.cc
src/crimson/common/config_proxy.h

index 18c891f6875003b118c7ce725f8fe69d9c9bdcf6..39d6842d78bc8c372b821a857741eda07bc52d1f 100644 (file)
@@ -46,5 +46,18 @@ void ConfigProxy::show_config(ceph::Formatter* f) const {
   get_config().show_config(*values, f);
 }
 
+seastar::future<> ConfigProxy::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);
+  });
+}
+
 ConfigProxy::ShardedConfig ConfigProxy::sharded_conf;
 }
index 29f5984b552295a1359ffe9457461cb0d3ae2155..f50a634318824afa49e0dfac3ec4163cb86a1a5a 100644 (file)
@@ -179,17 +179,7 @@ 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);
-      });
-  }
+  seastar::future<> parse_config_files(const std::string& conf_files);
 
   using ShardedConfig = seastar::sharded<ConfigProxy>;