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

#include <settings.h>

Inheritance diagram for publish::SettingsBuilder:
Collaboration diagram for publish::SettingsBuilder:

Public Member Functions

 SettingsBuilder ()
 
 ~SettingsBuilder ()
 
 SettingsBuilder (const std::string c)
 
SettingsRepository CreateSettingsRepository (const std::string &ident)
 
SettingsPublisherCreateSettingsPublisher (const std::string &ident, bool needs_managed=false)
 
OptionsManageroptions_mgr () const
 
bool IsManagedRepository () const
 

Private Member Functions

std::string GetSingleAlias ()
 
std::map< std::string,
std::string > 
GetSessionEnvironment ()
 
SettingsPublisherCreateSettingsPublisherFromSession ()
 
- Private Member Functions inherited from SingleCopy
 SingleCopy ()
 

Private Attributes

std::string config_path_
 
OptionsManageroptions_mgr_
 

Detailed Description

Create Settings objects from the system configuration in /etc/cvmfs/repositories.d

Definition at line 464 of file settings.h.

Constructor & Destructor Documentation

publish::SettingsBuilder::SettingsBuilder ( )
inline

Definition at line 466 of file settings.h.

publish::SettingsBuilder::~SettingsBuilder ( )

Definition at line 354 of file settings.cc.

publish::SettingsBuilder::SettingsBuilder ( const std::string  c)
inlineexplicit

Used in unit tests.

Definition at line 474 of file settings.h.

Member Function Documentation

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 succeds 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 500 of file settings.cc.

Referenced by publish::CmdAbort::Main(), publish::CmdTransaction::Main(), and publish::CmdDiff::Main().

Here is the call graph for this function:

Here is the caller graph for this function:

SettingsPublisher * publish::SettingsBuilder::CreateSettingsPublisherFromSession ( )
private

Create settings from an ephermal writable shell

Definition at line 465 of file settings.cc.

Referenced by CreateSettingsPublisher().

Here is the call graph for this function:

Here is the caller graph for this function:

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 succeds iff there is a single repository under /etc/cvmfs/repositories.d

Definition at line 408 of file settings.cc.

Referenced by CreateSettingsPublisher(), publish::CmdInfo::Main(), and publish::CmdDiff::Main().

Here is the call graph for this function:

Here is the caller graph for this function:

std::map< std::string, std::string > publish::SettingsBuilder::GetSessionEnvironment ( )
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 359 of file settings.cc.

Referenced by CreateSettingsPublisher(), CreateSettingsPublisherFromSession(), and GetSingleAlias().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string publish::SettingsBuilder::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 385 of file settings.cc.

Referenced by CreateSettingsPublisher(), and CreateSettingsRepository().

Here is the call graph for this function:

Here is the caller graph for this function:

bool publish::SettingsBuilder::IsManagedRepository ( ) const
inline

Definition at line 500 of file settings.h.

Referenced by CreateSettingsPublisher(), and publish::CmdInfo::Main().

Here is the caller graph for this function:

OptionsManager* publish::SettingsBuilder::options_mgr ( ) const
inline

Definition at line 499 of file settings.h.

Referenced by publish::CmdInfo::Main().

Here is the caller graph for this function:

Member Data Documentation

std::string publish::SettingsBuilder::config_path_
private

Definition at line 503 of file settings.h.

Referenced by CreateSettingsPublisher(), CreateSettingsRepository(), and GetSingleAlias().

OptionsManager* publish::SettingsBuilder::options_mgr_
private

For locally managed repositories, the options manager is non NULL and contains the configuration after a call to CreateSettingsRepository()

Definition at line 508 of file settings.h.

Referenced by CreateSettingsPublisher(), CreateSettingsRepository(), IsManagedRepository(), options_mgr(), and ~SettingsBuilder().


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