CernVM-FS  2.11.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
manifest::Manifest Class Reference

#include <manifest.h>

Collaboration diagram for manifest::Manifest:

Public Member Functions

 Manifest (const shash::Any &catalog_hash, const uint64_t catalog_size, const std::string &root_path)
 
 Manifest (const shash::Any &catalog_hash, const uint64_t catalog_size, const shash::Md5 &root_path, const uint32_t ttl, const uint64_t revision, const shash::Any &micro_catalog_hash, const std::string &repository_name, const shash::Any certificate, const shash::Any history, const uint64_t publish_timestamp, const bool garbage_collectable, const bool has_alt_catalog_path, const shash::Any &meta_info, const shash::Any &reflog_hash)
 
std::string ExportString () const
 
bool Export (const std::string &path) const
 
bool ExportBreadcrumb (const std::string &directory, const int mode) const
 
shash::Algorithms GetHashAlgorithm () const
 
void set_ttl (const uint32_t ttl)
 
void set_revision (const uint64_t revision)
 
void set_certificate (const shash::Any &certificate)
 
void set_history (const shash::Any &history_db)
 
void set_repository_name (const std::string &repository_name)
 
void set_publish_timestamp (const uint32_t publish_timestamp)
 
void set_catalog_size (const uint64_t catalog_size)
 
void set_catalog_hash (const shash::Any &catalog_hash)
 
void set_garbage_collectability (const bool garbage_collectable)
 
void set_has_alt_catalog_path (const bool &has_alt_path)
 
void set_meta_info (const shash::Any &meta_info)
 
void set_root_path (const std::string &root_path)
 
void set_reflog_hash (const shash::Any &checksum)
 
uint64_t revision () const
 
std::string repository_name () const
 
shash::Md5 root_path () const
 
shash::Any catalog_hash () const
 
uint64_t catalog_size () const
 
shash::Any certificate () const
 
shash::Any history () const
 
uint64_t publish_timestamp () const
 
bool garbage_collectable () const
 
bool has_alt_catalog_path () const
 
shash::Any meta_info () const
 
shash::Any reflog_hash () const
 
std::string MakeCatalogPath () const
 
std::string MakeCertificatePath () const
 

Static Public Member Functions

static ManifestLoadFile (const std::string &path)
 
static ManifestLoadMem (const unsigned char *buffer, const unsigned length)
 
static Breadcrumb ReadBreadcrumb (const std::string &repo_name, const std::string &directory)
 

Static Private Member Functions

static ManifestLoad (const std::map< char, std::string > &content)
 

Private Attributes

shash::Any catalog_hash_
 
uint64_t catalog_size_
 
shash::Md5 root_path_
 
uint32_t ttl_
 
uint64_t revision_
 
shash::Any micro_catalog_hash_
 
std::string repository_name_
 
shash::Any certificate_
 
shash::Any history_
 
uint64_t publish_timestamp_
 
bool garbage_collectable_
 
bool has_alt_catalog_path_
 
shash::Any meta_info_
 
shash::Any reflog_hash_
 

Detailed Description

The Manifest is the bootstrap snippet for a repository. It is stored in .cvmfspublished.

Definition at line 41 of file manifest.h.

Constructor & Destructor Documentation

manifest::Manifest::Manifest ( const shash::Any catalog_hash,
const uint64_t  catalog_size,
const std::string &  root_path 
)
manifest::Manifest::Manifest ( const shash::Any catalog_hash,
const uint64_t  catalog_size,
const shash::Md5 root_path,
const uint32_t  ttl,
const uint64_t  revision,
const shash::Any micro_catalog_hash,
const std::string &  repository_name,
const shash::Any  certificate,
const shash::Any  history,
const uint64_t  publish_timestamp,
const bool  garbage_collectable,
const bool  has_alt_catalog_path,
const shash::Any meta_info,
const shash::Any reflog_hash 
)
inline

Definition at line 48 of file manifest.h.

Member Function Documentation

uint64_t manifest::Manifest::catalog_size ( ) const
inline

Definition at line 125 of file manifest.h.

Referenced by publish::CreateRootObjects(), and set_catalog_size().

Here is the caller graph for this function:

shash::Any manifest::Manifest::certificate ( ) const
inline
bool manifest::Manifest::Export ( const std::string &  path) const

Writes the .cvmfspublished file (unsigned).

Definition at line 209 of file manifest.cc.

Referenced by receiver::CatalogMergeTool< RwCatalogMgr, RoCatalogMgr >::CreateNewManifest(), and swissknife::CommandMigrate::DoMigrationAndCommit().

Here is the call graph for this function:

Here is the caller graph for this function:

bool manifest::Manifest::ExportBreadcrumb ( const std::string &  directory,
const int  mode 
) const

Writes the cvmfschecksum.$repository file. Atomic store.

Definition at line 232 of file manifest.cc.

Referenced by swissknife::CommandPull::Main(), and PosixCacheManager::StoreBreadcrumb().

Here is the call graph for this function:

Here is the caller graph for this function:

string manifest::Manifest::ExportString ( ) const

Creates the manifest string

Definition at line 174 of file manifest.cc.

Referenced by Export(), and publish::PushManifest().

Here is the call graph for this function:

Here is the caller graph for this function:

bool manifest::Manifest::garbage_collectable ( ) const
inline

Definition at line 129 of file manifest.h.

Referenced by swissknife::CommandPull::Main(), and set_garbage_collectability().

Here is the caller graph for this function:

shash::Algorithms manifest::Manifest::GetHashAlgorithm ( ) const
inline

Definition at line 83 of file manifest.h.

Referenced by catalog::WritableCatalogManager::CreateRepository(), and swissknife::CommandPull::Main().

Here is the caller graph for this function:

bool manifest::Manifest::has_alt_catalog_path ( ) const
inline

Definition at line 130 of file manifest.h.

Referenced by swissknife::CommandPull::Main(), and publish::PushManifest().

Here is the caller graph for this function:

Manifest * manifest::Manifest::Load ( const std::map< char, std::string > &  content)
staticprivate

Definition at line 87 of file manifest.cc.

Here is the call graph for this function:

Manifest * manifest::Manifest::LoadFile ( const std::string &  path)
static

Definition at line 78 of file manifest.cc.

Referenced by LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::FetchManifest(), swissknife::CommandInfo::Main(), ServerTool::OpenLocalManifest(), and SigningTool::Run().

Here is the call graph for this function:

Here is the caller graph for this function:

Manifest * manifest::Manifest::LoadMem ( const unsigned char *  buffer,
const unsigned  length 
)
static
std::string manifest::Manifest::MakeCatalogPath ( ) const
inline

Definition at line 134 of file manifest.h.

Here is the call graph for this function:

std::string manifest::Manifest::MakeCertificatePath ( ) const
inline

Definition at line 139 of file manifest.h.

Referenced by manifest::DoVerify().

Here is the call graph for this function:

Here is the caller graph for this function:

uint64_t manifest::Manifest::publish_timestamp ( ) const
inline

Definition at line 128 of file manifest.h.

Referenced by publish::CreateRootObjects(), manifest::DoVerify(), set_publish_timestamp(), and ExternalCacheManager::StoreBreadcrumb().

Here is the caller graph for this function:

Breadcrumb manifest::Manifest::ReadBreadcrumb ( const std::string &  repo_name,
const std::string &  directory 
)
static

Read the hash and the last-modified time stamp from the cvmfschecksum.$repository file in the given directory.

Definition at line 242 of file manifest.cc.

Referenced by PosixCacheManager::LoadBreadcrumb().

Here is the caller graph for this function:

shash::Any manifest::Manifest::reflog_hash ( ) const
inline

Definition at line 132 of file manifest.h.

Referenced by swissknife::CommandListReflog::Main().

Here is the caller graph for this function:

std::string manifest::Manifest::repository_name ( ) const
inline
uint64_t manifest::Manifest::revision ( ) const
inline
shash::Md5 manifest::Manifest::root_path ( ) const
inline

Definition at line 123 of file manifest.h.

Referenced by manifest::DoVerify().

Here is the caller graph for this function:

void manifest::Manifest::set_catalog_hash ( const shash::Any catalog_hash)
inline

Definition at line 102 of file manifest.h.

Referenced by catalog::WritableCatalogManager::Commit(), and swissknife::CommandMigrate::DoMigrationAndCommit().

Here is the call graph for this function:

Here is the caller graph for this function:

void manifest::Manifest::set_catalog_size ( const uint64_t  catalog_size)
inline

Definition at line 99 of file manifest.h.

Referenced by catalog::WritableCatalogManager::Commit(), and swissknife::CommandMigrate::DoMigrationAndCommit().

Here is the call graph for this function:

Here is the caller graph for this function:

void manifest::Manifest::set_certificate ( const shash::Any certificate)
inline

Definition at line 87 of file manifest.h.

Referenced by publish::OnProcessCertificate().

Here is the call graph for this function:

Here is the caller graph for this function:

void manifest::Manifest::set_garbage_collectability ( const bool  garbage_collectable)
inline

Definition at line 105 of file manifest.h.

Referenced by publish::CreateRootObjects().

Here is the call graph for this function:

Here is the caller graph for this function:

void manifest::Manifest::set_has_alt_catalog_path ( const bool &  has_alt_path)
inline

Definition at line 108 of file manifest.h.

Referenced by catalog::WritableCatalogManager::CreateRepository(), and publish::CreateRootObjects().

Here is the caller graph for this function:

void manifest::Manifest::set_history ( const shash::Any history_db)
inline

Definition at line 90 of file manifest.h.

Referenced by swissknife::CommandMigrate::DoMigrationAndCommit(), and publish::OnProcessHistory().

Here is the caller graph for this function:

void manifest::Manifest::set_meta_info ( const shash::Any meta_info)
inline

Definition at line 111 of file manifest.h.

Referenced by publish::OnProcessMetainfo().

Here is the call graph for this function:

Here is the caller graph for this function:

void manifest::Manifest::set_publish_timestamp ( const uint32_t  publish_timestamp)
inline

Definition at line 96 of file manifest.h.

Here is the call graph for this function:

void manifest::Manifest::set_reflog_hash ( const shash::Any checksum)
inline

Definition at line 117 of file manifest.h.

Referenced by publish::PushReflog().

Here is the caller graph for this function:

void manifest::Manifest::set_repository_name ( const std::string &  repository_name)
inline

Definition at line 93 of file manifest.h.

Referenced by publish::CreateRootObjects().

Here is the call graph for this function:

Here is the caller graph for this function:

void manifest::Manifest::set_revision ( const uint64_t  revision)
inline

Definition at line 86 of file manifest.h.

Referenced by catalog::WritableCatalogManager::Commit(), and swissknife::CommandMigrate::DoMigrationAndCommit().

Here is the call graph for this function:

Here is the caller graph for this function:

void manifest::Manifest::set_root_path ( const std::string &  root_path)
inline

Definition at line 114 of file manifest.h.

Referenced by catalog::WritableCatalogManager::Commit(), and swissknife::CommandMigrate::DoMigrationAndCommit().

Here is the caller graph for this function:

void manifest::Manifest::set_ttl ( const uint32_t  ttl)
inline

Definition at line 85 of file manifest.h.

Referenced by catalog::WritableCatalogManager::Commit(), publish::CreateRootObjects(), and swissknife::CommandMigrate::DoMigrationAndCommit().

Here is the caller graph for this function:

Member Data Documentation

shash::Any manifest::Manifest::catalog_hash_
private
uint64_t manifest::Manifest::catalog_size_
private

Definition at line 147 of file manifest.h.

Referenced by catalog_size(), ExportString(), and set_catalog_size().

shash::Any manifest::Manifest::certificate_
private

Definition at line 153 of file manifest.h.

Referenced by certificate(), ExportString(), MakeCertificatePath(), and set_certificate().

bool manifest::Manifest::garbage_collectable_
private

Definition at line 156 of file manifest.h.

Referenced by ExportString(), garbage_collectable(), and set_garbage_collectability().

bool manifest::Manifest::has_alt_catalog_path_
private

The root catalog and the certificate might be available as .cvmfscatalog and .cvmfscertificate. That is helpful if the data subdirectory is protected on the web server.

Definition at line 163 of file manifest.h.

Referenced by ExportString(), has_alt_catalog_path(), MakeCatalogPath(), MakeCertificatePath(), and set_has_alt_catalog_path().

shash::Any manifest::Manifest::history_
private

Definition at line 154 of file manifest.h.

Referenced by ExportString(), history(), and set_history().

shash::Any manifest::Manifest::meta_info_
private

Hash of a JSON object that describes the repository (owner, purpose, list of recommended stratum 1s, ...)

Definition at line 169 of file manifest.h.

Referenced by ExportString(), meta_info(), and set_meta_info().

shash::Any manifest::Manifest::micro_catalog_hash_
private

Definition at line 151 of file manifest.h.

Referenced by ExportString().

uint64_t manifest::Manifest::publish_timestamp_
private
shash::Any manifest::Manifest::reflog_hash_
private

Hash of the reflog file

Definition at line 174 of file manifest.h.

Referenced by ExportString(), reflog_hash(), and set_reflog_hash().

std::string manifest::Manifest::repository_name_
private

Definition at line 152 of file manifest.h.

Referenced by ExportBreadcrumb(), ExportString(), repository_name(), and set_repository_name().

uint64_t manifest::Manifest::revision_
private

Definition at line 150 of file manifest.h.

Referenced by ExportString(), revision(), and set_revision().

shash::Md5 manifest::Manifest::root_path_
private

Definition at line 148 of file manifest.h.

Referenced by ExportString(), root_path(), and set_root_path().

uint32_t manifest::Manifest::ttl_
private

Definition at line 149 of file manifest.h.

Referenced by ExportString(), and set_ttl().


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