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

#include <swissknife_scrub.h>

Inheritance diagram for swissknife::CommandScrub:
Collaboration diagram for swissknife::CommandScrub:

Classes

struct  Alerts
 

Public Member Functions

 CommandScrub ()
 
 ~CommandScrub ()
 
virtual std::string GetName () const
 
virtual std::string GetDescription () const
 
virtual ParameterList GetParams () const
 
int Main (const ArgumentList &args)
 
- Public Member Functions inherited from swissknife::Command
 Command ()
 
virtual ~Command ()
 
- Public Member Functions inherited from ServerTool
 ServerTool ()
 
virtual ~ServerTool ()
 
bool InitDownloadManager (const bool follow_redirects, const std::string &proxy="", const unsigned max_pool_handles=1)
 
bool InitVerifyingSignatureManager (const std::string &pubkey_path, const std::string &trusted_certs="")
 
bool InitSigningSignatureManager (const std::string &certificate_path, const std::string &private_key_path, const std::string &private_key_password)
 
manifest::ManifestOpenLocalManifest (const std::string path) const
 
manifest::Failures FetchRemoteManifestEnsemble (const std::string &repository_url, const std::string &repository_name, manifest::ManifestEnsemble *ensemble) const
 
manifest::ManifestFetchRemoteManifest (const std::string &repository_url, const std::string &repository_name, const shash::Any &base_hash=shash::Any()) const
 
template<class ObjectFetcherT >
manifest::ReflogFetchReflog (ObjectFetcherT *object_fetcher, const std::string &repo_name, const shash::Any &reflog_hash)
 
manifest::ReflogCreateEmptyReflog (const std::string &temp_directory, const std::string &repo_name)
 
download::DownloadManagerdownload_manager () const
 
signature::SignatureManagersignature_manager () const
 
perf::Statisticsstatistics ()
 
const perf::Statisticsstatistics () const
 

Protected Member Functions

void FileCallback (const std::string &relative_path, const std::string &file_name)
 
void DirCallback (const std::string &relative_path, const std::string &dir_name)
 
void SymlinkCallback (const std::string &relative_path, const std::string &symlink_name)
 
void OnFileHashed (const ScrubbingResult &scrubbing_result)
 
void PrintAlert (const Alerts::Type type, const std::string &path, const std::string &affected_hash="") const
 
void ShowAlertsHelpMessage () const
 

Private Member Functions

std::string CheckPathAndExtractHash (const std::string &relative_path, const std::string &file_name, const std::string &full_path) const
 
bool CheckHashString (const std::string &hash_string, const std::string &full_path) const
 
std::string MakeFullPath (const std::string &relative_path, const std::string &file_name) const
 
std::string MakeRelativePath (const std::string &full_path)
 

Private Attributes

ScrubbingPipeline pipeline_scrubbing_
 
std::string repo_path_
 
bool machine_readable_output_
 
unsigned int alerts_
 
pthread_mutex_t alerts_mutex_
 

Additional Inherited Members

- Static Public Attributes inherited from swissknife::Command
static const char kGenericParam = '+'
 
static const char kGenericParamSeparator = ','
 
- Protected Attributes inherited from ServerTool
UniquePtr
< download::DownloadManager
download_manager_
 
UniquePtr
< signature::SignatureManager
signature_manager_
 
perf::Statistics statistics_
 

Detailed Description

Definition at line 18 of file swissknife_scrub.h.

Constructor & Destructor Documentation

swissknife::CommandScrub::CommandScrub ( )

Definition at line 23 of file swissknife_scrub.cc.

Here is the call graph for this function:

swissknife::CommandScrub::~CommandScrub ( )

Definition at line 32 of file swissknife_scrub.cc.

Member Function Documentation

bool swissknife::CommandScrub::CheckHashString ( const std::string &  hash_string,
const std::string &  full_path 
) const
private
std::string swissknife::CommandScrub::CheckPathAndExtractHash ( const std::string &  relative_path,
const std::string &  file_name,
const std::string &  full_path 
) const
private

Definition at line 153 of file swissknife_scrub.cc.

Referenced by FileCallback(), and OnFileHashed().

Here is the call graph for this function:

Here is the caller graph for this function:

void swissknife::CommandScrub::DirCallback ( const std::string &  relative_path,
const std::string &  dir_name 
)
protected

Definition at line 102 of file swissknife_scrub.cc.

Referenced by Main().

Here is the call graph for this function:

Here is the caller graph for this function:

void swissknife::CommandScrub::FileCallback ( const std::string &  relative_path,
const std::string &  file_name 
)
protected

Definition at line 65 of file swissknife_scrub.cc.

Referenced by Main().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual std::string swissknife::CommandScrub::GetDescription ( ) const
inlinevirtual

Implements swissknife::Command.

Definition at line 23 of file swissknife_scrub.h.

virtual std::string swissknife::CommandScrub::GetName ( ) const
inlinevirtual

Implements swissknife::Command.

Definition at line 22 of file swissknife_scrub.h.

swissknife::ParameterList swissknife::CommandScrub::GetParams ( ) const
virtual

Implements swissknife::Command.

Definition at line 37 of file swissknife_scrub.cc.

Here is the call graph for this function:

int swissknife::CommandScrub::Main ( const ArgumentList args)
virtual

Implements swissknife::Command.

Definition at line 182 of file swissknife_scrub.cc.

Here is the call graph for this function:

std::string swissknife::CommandScrub::MakeFullPath ( const std::string &  relative_path,
const std::string &  file_name 
) const
private

Definition at line 221 of file swissknife_scrub.cc.

Referenced by DirCallback(), FileCallback(), and SymlinkCallback().

Here is the caller graph for this function:

std::string swissknife::CommandScrub::MakeRelativePath ( const std::string &  full_path)
private

Definition at line 228 of file swissknife_scrub.cc.

Referenced by OnFileHashed().

Here is the call graph for this function:

Here is the caller graph for this function:

void swissknife::CommandScrub::OnFileHashed ( const ScrubbingResult scrubbing_result)
protected

Definition at line 132 of file swissknife_scrub.cc.

Referenced by Main().

Here is the call graph for this function:

Here is the caller graph for this function:

void swissknife::CommandScrub::PrintAlert ( const Alerts::Type  type,
const std::string &  path,
const std::string &  affected_hash = "" 
) const
protected

Definition at line 202 of file swissknife_scrub.cc.

Referenced by CheckPathAndExtractHash(), DirCallback(), FileCallback(), OnFileHashed(), and SymlinkCallback().

Here is the call graph for this function:

Here is the caller graph for this function:

void swissknife::CommandScrub::ShowAlertsHelpMessage ( ) const
protected

Definition at line 233 of file swissknife_scrub.cc.

void swissknife::CommandScrub::SymlinkCallback ( const std::string &  relative_path,
const std::string &  symlink_name 
)
protected

Definition at line 126 of file swissknife_scrub.cc.

Referenced by Main().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

unsigned int swissknife::CommandScrub::alerts_
mutableprivate

Definition at line 77 of file swissknife_scrub.h.

Referenced by Main(), and PrintAlert().

pthread_mutex_t swissknife::CommandScrub::alerts_mutex_
mutableprivate

Definition at line 78 of file swissknife_scrub.h.

Referenced by CommandScrub(), PrintAlert(), and ~CommandScrub().

bool swissknife::CommandScrub::machine_readable_output_
private

Definition at line 75 of file swissknife_scrub.h.

Referenced by Main(), and PrintAlert().

ScrubbingPipeline swissknife::CommandScrub::pipeline_scrubbing_
private

Definition at line 73 of file swissknife_scrub.h.

Referenced by FileCallback(), and Main().

std::string swissknife::CommandScrub::repo_path_
private

Definition at line 74 of file swissknife_scrub.h.

Referenced by FileCallback(), Main(), MakeFullPath(), and MakeRelativePath().


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