CernVM-FS
2.12.0
|
#include <settings.h>
Public Member Functions | |
SettingsBuilder () | |
~SettingsBuilder () | |
SettingsBuilder (const std::string &c) | |
SettingsRepository | CreateSettingsRepository (const std::string &ident) |
SettingsPublisher * | CreateSettingsPublisher (const std::string &ident, bool needs_managed=false) |
OptionsManager * | options_mgr () const |
bool | IsManagedRepository () const |
void | ApplyOptionsFromServerPath (const OptionsManager &options_mgr_, SettingsPublisher *settings_publisher) |
void | SetConfigPath (const std::string &config_path) |
Private Member Functions | |
std::string | GetSingleAlias () |
std::map< std::string, std::string > | GetSessionEnvironment () |
SettingsPublisher * | CreateSettingsPublisherFromSession () |
Private Member Functions inherited from SingleCopy | |
SingleCopy () | |
Private Attributes | |
std::string | config_path_ |
OptionsManager * | options_mgr_ |
Create Settings objects from the system configuration in /etc/cvmfs/repositories.d
Definition at line 491 of file settings.h.
|
inline |
Definition at line 493 of file settings.h.
publish::SettingsBuilder::~SettingsBuilder | ( | ) |
Definition at line 388 of file settings.cc.
|
inlineexplicit |
Used in unit tests.
Definition at line 501 of file settings.h.
void publish::SettingsBuilder::ApplyOptionsFromServerPath | ( | const OptionsManager & | options_mgr_, |
SettingsPublisher * | settings_publisher | ||
) |
Get the values from the server configuration and set them to the publisher settings.
Definition at line 540 of file settings.cc.
Referenced by CreateSettingsPublisher().
SettingsPublisher * publish::SettingsBuilder::CreateSettingsPublisher | ( | const std::string & | ident, |
bool | needs_managed = false |
||
) |
If ident is a url, creates a generic settings object inferring the fqrn from the url. Otherwise, looks in the config files in /etc/cvmfs/repositories.d/<alias>/ If alias is an empty string, the command still succeeds iff there is a single repository under /etc/cvmfs/repositories.d If needs_managed is true, remote repositories are rejected In an "enter environment" (see cmd_enter), the spool area of the enter environment is applied.
Definition at line 602 of file settings.cc.
Referenced by publish::CmdAbort::Main(), publish::CmdCommit::Main(), publish::CmdEnter::Main(), publish::CmdTransaction::Main(), and publish::CmdDiff::Main().
|
private |
Create settings from an ephermal writable shell
Definition at line 504 of file settings.cc.
Referenced by CreateSettingsPublisher().
SettingsRepository publish::SettingsBuilder::CreateSettingsRepository | ( | const std::string & | ident | ) |
If ident is a url, creates a generic settings object inferring the fqrn from the url. Otherwise, looks in the config files in /etc/cvmfs/repositories.d/<alias>/ If alias is an empty string, the command still succeeds iff there is a single repository under /etc/cvmfs/repositories.d
Definition at line 442 of file settings.cc.
Referenced by CreateSettingsPublisher(), publish::CmdInfo::Main(), and publish::CmdDiff::Main().
|
private |
If in a ephemeral writable shell, parse $session_dir/env.conf Otherwise return an empty map. A non-empty map has at least CVMFS_FQRN set.
Definition at line 393 of file settings.cc.
Referenced by CreateSettingsPublisher(), CreateSettingsPublisherFromSession(), and GetSingleAlias().
|
private |
Returns the name of the one and only repository under kConfigPath Throws an exception if there are none or multiple repositories. The alias is usually the fqrn except for a replica with an explicit alias set different from the fqrn (e.g. if Stratum 0 and 1 are hosted) on the same node.
Definition at line 419 of file settings.cc.
Referenced by CreateSettingsPublisher(), and CreateSettingsRepository().
|
inline |
Definition at line 527 of file settings.h.
Referenced by CreateSettingsPublisher(), and publish::CmdInfo::Main().
|
inline |
Definition at line 526 of file settings.h.
Referenced by publish::CmdInfo::Main().
|
inline |
Definition at line 535 of file settings.h.
Referenced by publish::CmdAbort::Main(), publish::CmdCommit::Main(), and publish::CmdEnter::Main().
|
private |
For non locally managed repositories, a configuration file should be provided in order to publish from the ephemeral shell through the gateway
Definition at line 544 of file settings.h.
Referenced by CreateSettingsPublisher(), CreateSettingsRepository(), GetSingleAlias(), and SetConfigPath().
|
private |
For locally managed repositories, the options manager is non NULL and contains the configuration after a call to CreateSettingsRepository()
Definition at line 550 of file settings.h.
Referenced by CreateSettingsPublisher(), CreateSettingsRepository(), IsManagedRepository(), options_mgr(), and ~SettingsBuilder().