CernVM-FS
2.12.0
|
#include <options.h>
Public Member Functions | |
BashOptionsManager (OptionsTemplateManager *opt_templ_mgr_param=NULL) | |
void | ParsePath (const std::string &config_file, const bool external) |
Public Member Functions inherited from OptionsManager | |
OptionsManager (OptionsTemplateManager *opt_templ_mgr_param) | |
OptionsManager (const OptionsManager &opt_mgr) | |
virtual | ~OptionsManager () |
void | SwitchTemplateManager (OptionsTemplateManager *opt_templ_mgr_param) |
void | ParseDefault (const std::string &fqrn) |
void | ClearConfig () |
bool | IsDefined (const std::string &key) |
bool | GetValue (const std::string &key, std::string *value) const |
std::string | GetValueOrDie (const std::string &key) |
bool | GetSource (const std::string &key, std::string *value) |
bool | IsOn (const std::string ¶m_value) const |
bool | IsOff (const std::string ¶m_value) const |
std::vector< std::string > | GetAllKeys () |
std::vector< std::string > | GetEnvironmentSubset (const std::string &key_prefix, bool strip_prefix) |
std::string | Dump () |
bool | HasConfigRepository (const std::string &fqrn, std::string *config_path) |
void | ProtectParameter (const std::string ¶m) |
void | SetValue (const std::string &key, const std::string &value) |
void | UnsetValue (const std::string &key) |
void | set_taint_environment (bool value) |
Additional Inherited Members | |
Protected Member Functions inherited from OptionsManager | |
std::string | TrimParameter (const std::string ¶meter) |
std::string | SanitizeParameterAssignment (std::string *line, std::vector< std::string > *tokens) |
void | PopulateParameter (const std::string ¶m, const ConfigValue val) |
void | ParseValue (const std::string param, ConfigValue *val) |
void | UpdateEnvironment (const std::string ¶m, ConfigValue val) |
Protected Attributes inherited from OptionsManager | |
std::map< std::string, ConfigValue > | config_ |
std::map< std::string, std::string > | protected_parameters_ |
std::map< std::string, std::string > | templatable_values_ |
OptionsTemplateManager * | opt_templ_mgr_ |
bool | taint_environment_ |
Derived class from OptionsManager. This class provides the complete parsing of the configuration files. In order to parse the configuration files it retrieves the "KEY=VALUE" pairs and uses bash for the rest, so that you can execute slightly complex scripts
|
inlineexplicit |
|
virtual |
Opens the config_file and extracts all contained variables and their corresponding values. The new variables are set (and overwritten in case they were previously defined) as environment variables
config_file | absolute path to the configuration file |
external | if true it indicates the configuration file is in the repository. If false the configuration file is in /etc |
Implements OptionsManager.
Definition at line 146 of file options.cc.
Referenced by publish::SettingsBuilder::CreateSettingsPublisherFromSession(), publish::SettingsBuilder::GetSessionEnvironment(), upload::S3Uploader::ParseSpoolerDefinition(), and publish::CmdEnter::WriteCvmfsConfig().