]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/common/config.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / common / config.h
index 7bbf8bb74764c5d174a2d95264c5ec8a8c8a3c6b..bb3410e617d15192ae43e23bffe3d70dd4faee35 100644 (file)
@@ -121,7 +121,10 @@ public:
   int parse_config_files(ConfigValues& values, const ConfigTracker& tracker,
                         const char *conf_files,
                         std::ostream *warnings, int flags);
-
+  int parse_buffer(ConfigValues& values, const ConfigTracker& tracker,
+                  const char* buf, size_t len,
+                  std::ostream *warnings);
+  void update_legacy_vals(ConfigValues& values);
   // Absorb config settings from the environment
   void parse_env(unsigned entity_type,
                 ConfigValues& values, const ConfigTracker& tracker,
@@ -205,8 +208,7 @@ public:
   void get_all_keys(std::vector<std::string> *keys) const;
 
   // Return a list of all the sections that the current entity is a member of.
-  void get_my_sections(const ConfigValues& values,
-                      std::vector <std::string> &sections) const;
+  std::vector<std::string> get_my_sections(const ConfigValues& values) const;
 
   // Return a list of all sections
   int get_all_sections(std::vector <std::string> &sections) const;
@@ -265,9 +267,6 @@ private:
   void _show_config(const ConfigValues& values,
                    std::ostream *out, ceph::Formatter *f) const;
 
-  void _get_my_sections(const ConfigValues& values,
-                       std::vector<std::string> &sections) const;
-
   int _get_val_from_conf_file(const std::vector<std::string> &sections,
                              const std::string_view key, std::string &out) const;
 
@@ -296,7 +295,6 @@ private:
   void assign_member(member_ptr_t ptr, const Option::value_t &val);
 
 
-  void update_legacy_vals(ConfigValues& values);
   void update_legacy_val(ConfigValues& values,
                         const Option &opt,
                         member_ptr_t member);
@@ -316,11 +314,13 @@ public:  // for global_init
   // for those want to reexpand special meta, e.g, $pid
   bool finalize_reexpand_meta(ConfigValues& values,
                              const ConfigTracker& tracker);
-private:
-
-  /// expand all metavariables in config structure.
-  void expand_all_meta();
 
+  std::list<std::string> get_conffile_paths(const ConfigValues& values,
+                                           const char *conf_files,
+                                           std::ostream *warnings,
+                                           int flags) const;
+private:
+  static std::string get_cluster_name(const char* conffile_path);
   // The configuration file we read, or NULL if we haven't read one.
   ConfFile cf;
 public: