CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BashOptionsManager Class Reference

#include <options.h>

Inheritance diagram for BashOptionsManager:
Collaboration diagram for BashOptionsManager:

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)
 
std::string GetValueOrDie (const std::string &key)
 
bool GetSource (const std::string &key, std::string *value)
 
bool IsOn (const std::string &param_value)
 
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 &param)
 
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 &parameter)
 
std::string SanitizeParameterAssignment (std::string *line, std::vector< std::string > *tokens)
 
void PopulateParameter (const std::string &param, const ConfigValue val)
 
void ParseValue (const std::string param, ConfigValue *val)
 
void UpdateEnvironment (const std::string &param, 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_
 
OptionsTemplateManageropt_templ_mgr_
 
bool taint_environment_
 

Detailed Description

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 sightly complex scripts

Definition at line 258 of file options.h.

Constructor & Destructor Documentation

BashOptionsManager::BashOptionsManager ( OptionsTemplateManager opt_templ_mgr_param = NULL)
inlineexplicit

Definition at line 260 of file options.h.

Member Function Documentation

void BashOptionsManager::ParsePath ( const std::string &  config_file,
const bool  external 
)
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

Parameters
config_fileabsolute path to the configuration file
externalif 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().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: