Public Member Functions | Public Attributes | Private Member Functions | Private Attributes

cfg_PMCfg Class Reference
[Parser for config files; validation]

cfg_PMCfg is derived from val_Base to handle configuration of the IVD Partition Manager. More...

#include <cfg_pm.h>

Inheritance diagram for cfg_PMCfg:
Inheritance graph
[legend]
Collaboration diagram for cfg_PMCfg:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 cfg_PMCfg ()
 cfg_PMCfg (const pf_File &a_parsedFile)
virtual ~cfg_PMCfg ()
void Refresh (const pf_File &a_parsedFile)
virtual void ConvertGroup (const string &a_grpName, const pf_Group &a_group)

Public Attributes

string name
vector< cfg_PMClientclients
 Vector of groups of type client.
cfg_PMTree globalTreeOptions
vector< cfg_PMTreetrees
 vector of groups of type tree
UInt32_t minFileAge
Int32_t maxMigJobSize
Int32_t hashSize
UInt32_t fileHeaderSize
UInt32_t minWaitTime
Int32_t minNumMigFiles
UInt64_t minMigSize
UInt32_t maxWaitTime
Int32_t maxNumMigFiles
UInt64_t maxMigSize
UInt32_t highWaterMark
UInt32_t lowWaterMark
UInt32_t criticalWaterMark
UInt32_t releaseInterval
UInt32_t migRetentionTime
UInt32_t recallRetentionTime
UInt64_t minFileSize
vector< val_Element< string > > releaseExcludeFile
UInt32_t recallTimeOut
UInt32_t maxNumDrives
UInt32_t maxNumDrivesRecall
UInt32_t maxNumDrivesMigration
UInt32_t maxNumDrivesReorg
UInt32_t maxNumDrivesRecovery
UInt32_t maxNumDrivesMaint
UInt32_t reserveNumDrives
UInt32_t reserveNumDrivesRecall
UInt32_t reserveNumDrivesMigration
UInt32_t reserveNumDrivesReorg
UInt32_t reserveNumDrivesRecovery
UInt32_t reserveNumDrivesMaint
UInt32_t partitionPriority
UInt32_t recallPriority
UInt32_t migrationPriority
UInt32_t reorgPriority
UInt32_t recoveryPriority
UInt32_t maintPriority
UInt32_t fscMode
string alternateDataPath
vector< cfg_PMFileExpirationdeleteFile

Private Member Functions

void ValidateFileExpiration (const cfg_PMFileExpiration &a_group)
void ValidatePartitionOptions (const cfg_PMClient a_group)

Private Attributes

 log_CLASSID_m

Detailed Description

cfg_PMCfg is derived from val_Base to handle configuration of the IVD Partition Manager.

See also:
parser
cfg_Base
val_Value
pf_File

Definition at line 139 of file cfg_pm.h.


Constructor & Destructor Documentation

cfg_PMCfg::cfg_PMCfg (  )  [inline]

Definition at line 142 of file cfg_pm.h.

{};

cfg_PMCfg::cfg_PMCfg ( const pf_File a_parsedFile  ) 

Definition at line 61 of file cfg_pm.cpp.

References log_FUNC_m, and Refresh().

                                                {
    log_FUNC_m(cfg_PMCfg);
    Refresh(a_parsedFile);
}

Here is the call graph for this function:

virtual cfg_PMCfg::~cfg_PMCfg (  )  [inline, virtual]

Definition at line 144 of file cfg_pm.h.

{};


Member Function Documentation

void cfg_PMCfg::ConvertGroup ( const string &  a_grpName,
const pf_Group a_group 
) [virtual]

(map?) Solution: if group already exists refresh element pmtree.refresh()

Reimplemented from cfg_Base.

Definition at line 554 of file cfg_pm.cpp.

References cfg_FindGroupByName(), clients, dbg_DETAIL, deleteFile, pf_Group::grpType, log_DBG_m, log_FUNC_A_m, log_WRN_m, cfg_PMFileExpiration::m_pathList, strcasecmp, trees, ValidateFileExpiration(), and ValidatePartitionOptions().

                                                                             {
    log_FUNC_A_m(ConvertGroup, "a_grpName " << a_grpName);
    log_DBG_m(dbg_DETAIL,"Converting Group Type: " << a_group.grpType );
    log_DBG_m(dbg_DETAIL,"Converting Group Name: " << a_grpName );

    static const string c_tree ("Tree"); //grpType Tree
    static const string c_client ("Client");
    static const string c_fileExpiration ("FileExpiration");

    if ( strcasecmp(a_group.grpType.c_str(), c_tree.c_str()) == 0 ) {

        Int32_t i = cfg_FindGroupByName(this->trees, a_grpName);
        cfg_PMTree tree(a_grpName, a_group);
        if (i == -1) {
            this->trees.push_back(tree);        //add new group of type Tree
        } else {
            this->trees[i] = tree;              //update group
        };
    }
    else if ( strcasecmp(a_group.grpType.c_str(), c_client.c_str()) == 0 ) {
        cfg_PMClient client(a_grpName, a_group);
        Int32_t i = cfg_FindGroupByName(this->clients, a_grpName);

        if (i == -1) {
            ValidatePartitionOptions(client);
            this->clients.push_back(client);    //add new group of type Client
        } else {
            this->clients[i] = client;          //update group
        };
    }
    else if ( strcasecmp(a_group.grpType.c_str(), c_fileExpiration.c_str()) == 0 ) {
        cfg_PMFileExpiration fileAge(a_grpName, a_group);
        Int32_t i = cfg_FindGroupByName(this->deleteFile, a_grpName);
        if (i == -1) {
            ValidateFileExpiration(fileAge);
            this->deleteFile.push_back(fileAge);  //add new group of type FileExpiration
        } else {
            for (UInt32_t j = 0; j < fileAge.m_pathList.size(); j++) {
                bool pathExists = false;
                for (UInt32_t k = 0; k < deleteFile[i].m_pathList.size(); k++) {
                    if (fileAge.m_pathList[j].Val() == deleteFile[i].m_pathList[k].Val()) {
                        pathExists = true;
                        break;
                    }
                }
                if (pathExists != true) {
                    this->deleteFile[i].m_pathList.push_back(fileAge.m_pathList[j].Val()); //append to group
                }
            }
        };
    }
    else {
        log_WRN_m("Unknown group type: " << a_grpName);
    }
}

Here is the call graph for this function:

void cfg_PMCfg::Refresh ( const pf_File a_parsedFile  ) 

Definition at line 66 of file cfg_pm.cpp.

References val_RuleVec::Add(), alternateDataPath, cfg_PMTree::c_pools, cfg_DEF_ADPATH, cfg_DEF_CRITICALWATERMARK, cfg_DEF_FSCMODE, cfg_DEF_HIGHWATERMARK, cfg_DEF_LOWWATERMARK, cfg_DEF_MAXMIGJOBSIZE, cfg_DEF_MAXMIGSIZE, cfg_DEF_MAXNUMDRIVES_P, cfg_DEF_MAXNUMDRIVESMAINT_P, cfg_DEF_MAXNUMDRIVESMIG_P, cfg_DEF_MAXNUMDRIVESRECALL_P, cfg_DEF_MAXNUMDRIVESRECOVERY_P, cfg_DEF_MAXNUMDRIVESREORG_P, cfg_DEF_MAXNUMMIGFILES, cfg_DEF_MAXWAITTIME, cfg_DEF_MIGRETENTIONTIME, cfg_DEF_MINFILEAGE, cfg_DEF_MINFILESIZE, cfg_DEF_MINMIGSIZE, cfg_DEF_MINNUMMIGFILES, cfg_DEF_MINWAITTIME, cfg_DEF_PARTMAINTPRIORITY, cfg_DEF_PARTMIGPRIORITY, cfg_DEF_PARTRECALLPRIORITY, cfg_DEF_PARTRECOVERYPRIORITY, cfg_DEF_PARTREORGPRIORITY, cfg_DEF_RECALL_TIMEOUT, cfg_DEF_RECALLRETENTIONTIME, cfg_DEF_RELEASE_INTERVAL, cfg_MAX_ADPATH, cfg_MAX_CRITICALWATERMARK, cfg_MAX_FILENAME, cfg_MAX_FSCMODE, cfg_MAX_HIGHWATERMARK, cfg_MAX_LOWWATERMARK, cfg_MAX_MAXMIGJOBSIZE, cfg_MAX_MAXMIGSIZE, cfg_MAX_MAXNUMDRIVES_P, cfg_MAX_MAXNUMDRIVESMAINT_P, cfg_MAX_MAXNUMDRIVESMIG_P, cfg_MAX_MAXNUMDRIVESRECALL_P, cfg_MAX_MAXNUMDRIVESRECOVERY_P, cfg_MAX_MAXNUMDRIVESREORG_P, cfg_MAX_MAXNUMMIGFILES, cfg_MAX_MAXWAITTIME, cfg_MAX_MIGRETENTIONTIME, cfg_MAX_MINFILEAGE, cfg_MAX_MINFILESIZE, cfg_MAX_MINMIGSIZE, cfg_MAX_MINNUMMIGFILES, cfg_MAX_MINWAITTIME, cfg_MAX_PARTITION_NAME, cfg_MAX_PARTMAINTPRIORITY, cfg_MAX_PARTMIGPRIORITY, cfg_MAX_PARTPRIORITY, cfg_MAX_PARTRECALLPRIORITY, cfg_MAX_PARTRECOVERYPRIORITY, cfg_MAX_PARTREORGPRIORITY, cfg_MAX_POOL_NAME, cfg_MAX_RECALL_TIMEOUT, cfg_MAX_RECALLRETENTIONTIME, cfg_MAX_RELEASE_INTERVAL, cfg_MIN_ADPATH, cfg_MIN_CRITICALWATERMARK, cfg_MIN_FSCMODE, cfg_MIN_HIGHWATERMARK, cfg_MIN_LOWWATERMARK, cfg_MIN_MAXMIGJOBSIZE, cfg_MIN_MAXMIGSIZE, cfg_MIN_MAXNUMDRIVES_P, cfg_MIN_MAXNUMDRIVESMAINT_P, cfg_MIN_MAXNUMDRIVESMIG_P, cfg_MIN_MAXNUMDRIVESRECALL_P, cfg_MIN_MAXNUMDRIVESRECOVERY_P, cfg_MIN_MAXNUMDRIVESREORG_P, cfg_MIN_MAXNUMMIGFILES, cfg_MIN_MAXWAITTIME, cfg_MIN_MIGRETENTIONTIME, cfg_MIN_MINFILEAGE, cfg_MIN_MINFILESIZE, cfg_MIN_MINMIGSIZE, cfg_MIN_MINNUMMIGFILES, cfg_MIN_MINWAITTIME, cfg_MIN_PARTITION_NAME, cfg_MIN_PARTMAINTPRIORITY, cfg_MIN_PARTMIGPRIORITY, cfg_MIN_PARTPRIORITY, cfg_MIN_PARTRECALLPRIORITY, cfg_MIN_PARTRECOVERYPRIORITY, cfg_MIN_PARTREORGPRIORITY, cfg_MIN_POOL_NAME, cfg_MIN_RECALL_TIMEOUT, cfg_MIN_RECALLRETENTIONTIME, cfg_MIN_RELEASE_INTERVAL, cfg_Base::CheckMandatory(), cfg_Base::Convert(), cfg_Base::ConvertFileHeader(), criticalWaterMark, deleteFile, fscMode, globalTreeOptions, highWaterMark, log_FUNC_m, lowWaterMark, pf_File::m_common, pf_File::m_sections, pf_SectionList::m_vec, maintPriority, maxMigJobSize, maxMigSize, maxNumDrives, maxNumDrivesMaint, maxNumDrivesMigration, maxNumDrivesRecall, maxNumDrivesRecovery, maxNumDrivesReorg, maxNumMigFiles, maxWaitTime, migrationPriority, migRetentionTime, minFileAge, minFileSize, minMigSize, minNumMigFiles, minWaitTime, name, partitionPriority, cfg_PMTree::pools, recallPriority, recallRetentionTime, recallTimeOut, recoveryPriority, releaseExcludeFile, releaseInterval, reorgPriority, and pf_SectionList::size().

Referenced by cfg_PMCfg(), i_PartitionManager_i::ParseConfig(), and i_ResourceManager_i::ParsePMConfig().

                                                   {
    log_FUNC_m(Refresh);

    static const string c_name                  ("Name");

    //static const string c_fileChangeTrigger     ("FileChangeTrigger");
    static const string c_minFileAge            ("MinFileAge");
    static const string c_maxMigJobSize         ("MaxMigJobSize");

    static const string c_migrationWindow       ("MigrationWindow");
    static const string c_minWaitTime           ("MinWaitTime");
    static const string c_minNumMigFiles        ("MinNumMigFiles");
    static const string c_minMigSize            ("MinMigSize");
    static const string c_maxWaitTime           ("MaxWaitTime");
    static const string c_maxNumMigFiles        ("MaxNumMigFiles");
    static const string c_maxMigSize            ("MaxMigSize");

    //static const string c_forcedMigWaterMark    ("ForcedMigWaterMark");

    static const string c_migExcludeFile        ("MigExcludeFile");
    static const string c_migExcludePath        ("MigExcludePath");

    static const string c_highWaterMark         ("HighWaterMark");
    static const string c_lowWaterMark          ("LowWaterMark");
    static const string c_criticalWaterMark     ("CriticalWaterMark");
    static const string c_releaseInterval       ("ReleaseInterval");
    static const string c_startReleaseEarly     ("StartReleaseEarly");
    static const string c_startReleaseNumF      ("StartReleaseNumFiles");
    static const string c_startReleaseTime      ("StartReleaseTime");

    static const string c_migRetentionTime      ("MigRetentionTime");
    static const string c_recallRetentionTime   ("RecallRetentionTime");
    static const string c_minFileSize           ("MinFileSize");
    static const string c_releaseExcludeFile    ("ExcludeFromRelease");
    //static const string c_releaseExcludePath    ("ReleaseExcludePath");

    static const string c_recallTimeOut         ("RecallTimeOut");

    static const string c_maxNumDrives          ("MaxNumDrives");
    static const string c_maxNumDrivesRecall    ("MaxNumDrivesRecall");
    static const string c_maxNumDrivesMigration ("MaxNumDrivesMigration");
    static const string c_maxNumDrivesReorg     ("MaxNumDrivesReorg");
    static const string c_maxNumDrivesRecovery  ("MaxNumDrivesRecovery");
    static const string c_maxNumDrivesMaint     ("MaxNumDrivesMaint");

    static const string c_reserveNumDrives          ("ReserveNumDrives");
    static const string c_reserveNumDrivesRecall    ("ReserveNumDrivesRecall");
    static const string c_reserveNumDrivesMigration ("ReserveNumDrivesMigration");
    static const string c_reserveNumDrivesReorg     ("ReserveNumDrivesReorg");
    static const string c_reserveNumDrivesRecovery  ("ReserveNumDrivesRecovery");
    static const string c_reserveNumDrivesMaint  ("ReserveNumDrivesMaint");

    static const string c_partitionPriority     ("PartitionPriority");
    static const string c_recallPriority        ("RecallPriority");
    static const string c_migrationPriority     ("MigrationPriority");
    static const string c_reorgPriority         ("ReorgPriority");
    static const string c_recoveryPriority      ("RecoveryPriority");
    static const string c_maintPriority         ("MaintPriority");

    static const string c_fscMode               ("FscMode");

    static const string c_alternateDataPath     ("AlternateDataPath");


    ConvertFileHeader(a_parsedFile);
    val_RuleVec  rules;

// common section
    rules.Add(
        new val_ObjectName( c_name,
                        val_Limit(cfg_MIN_PARTITION_NAME, cfg_MAX_PARTITION_NAME),
                        1,
                        1 ),
        this->name
    );
//     rules.Add(
//         new val_Integer(    cfg_PMTree::c_copies,
//                             val_Limit(cfg_MIN_NUM_COPIES, cfg_MAX_NUM_COPIES)),
//         this->globalTreeOptions.noOfCopies
//     );
    rules.Add(
        new val_StrictStringList(cfg_PMTree::c_pools,
                           val_Limit(cfg_MIN_POOL_NAME, cfg_MAX_POOL_NAME),
                           1,
                           1),
        this->globalTreeOptions.pools
    );

    rules.Add(
        new val_Duration(c_minFileAge,
                         val_Limit(cfg_MIN_MINFILEAGE, cfg_MAX_MINFILEAGE),
                         0,
                         1,
                         cfg_DEF_MINFILEAGE ),
        this->minFileAge
    );
    rules.Add(
        new val_Size(c_maxMigJobSize,
                     val_Limit(cfg_MIN_MAXMIGJOBSIZE, cfg_MAX_MAXMIGJOBSIZE),
                     0,
                     1,
                     cfg_DEF_MAXMIGJOBSIZE ),
        this->maxMigJobSize
    );

//Regular Migration

    rules.Add(
        new val_Duration(c_minWaitTime,
                         val_Limit(cfg_MIN_MINWAITTIME, cfg_MAX_MINWAITTIME),
                         0,
                         1,
                         cfg_DEF_MINWAITTIME ),
        this->minWaitTime
    );
    rules.Add(
        new val_Integer(c_minNumMigFiles,
                        val_Limit(cfg_MIN_MINNUMMIGFILES, cfg_MAX_MINNUMMIGFILES),
                        0,
                        1,
                        cfg_DEF_MINNUMMIGFILES ),
        this->minNumMigFiles
    );
    rules.Add(
        new val_Size(c_minMigSize,
                     val_Limit(cfg_MIN_MINMIGSIZE, cfg_MAX_MINMIGSIZE),
                     0,
                     1,
                     cfg_DEF_MINMIGSIZE ),
        this->minMigSize
    );
    rules.Add(
        new val_Duration(c_maxWaitTime,
                         val_Limit(cfg_MIN_MAXWAITTIME, cfg_MAX_MAXWAITTIME),
                         0,
                         1,
                         cfg_DEF_MAXWAITTIME),
        this->maxWaitTime
    );
    rules.Add(
        new val_Integer(c_maxNumMigFiles,
                        val_Limit(cfg_MIN_MAXNUMMIGFILES, cfg_MAX_MAXNUMMIGFILES ),
                        0,
                        1,
                        cfg_DEF_MAXNUMMIGFILES),
        this->maxNumMigFiles
    );

    rules.Add(
        new val_Size(c_maxMigSize,
                     val_Limit(cfg_MIN_MAXMIGSIZE, cfg_MAX_MAXMIGSIZE ),
                     0,
                     1,
                     cfg_DEF_MAXMIGSIZE),
        this->maxMigSize
    );

// not used by anybody
// ForcedMigration
//     rules.Add(
//         new val_Percentage(c_forcedMigWaterMark, val_Limit(  cfg_MIN_FORCEDMIGWATERMARK, cfg_MAX_FORCEDMIGWATERMARK ) ),
//         this->forcedMigWaterMark
//     );

// MigrationFiles

//     rules.Add(
//         new val_StrictStringList(c_migExcludeFile,    val_Limit(1, cfg_MAX_FILENAME_d)),
//         this->migExcludeFile
//     );
//     rules.Add(
//         new val_StrictStringList(c_migExcludePath,    val_Limit(1, cfg_MAX_PATHNAME_d)),
//         this->migExcludePath
//     );

// Release
    rules.Add(
        new val_Percentage(c_highWaterMark,
                           val_Limit(  cfg_MIN_HIGHWATERMARK, cfg_MAX_HIGHWATERMARK ),
                           0,
                           1,
                           cfg_DEF_HIGHWATERMARK ),
        this->highWaterMark
    );
    rules.Add(
        new val_Percentage(c_lowWaterMark,
                           val_Limit(  cfg_MIN_LOWWATERMARK, cfg_MAX_LOWWATERMARK ),
                           0,
                           1,
                           cfg_DEF_LOWWATERMARK ),
        this->lowWaterMark
    );
    rules.Add(
        new val_Percentage(c_criticalWaterMark,
                           val_Limit(  cfg_MIN_CRITICALWATERMARK, cfg_MAX_CRITICALWATERMARK ),
                           0,
                           1,
                           cfg_DEF_CRITICALWATERMARK),
        this->criticalWaterMark
    );

    rules.Add(
        new val_Duration(c_releaseInterval,
                         val_Limit(  cfg_MIN_RELEASE_INTERVAL, cfg_MAX_RELEASE_INTERVAL ),
                         0,
                         1,
                         cfg_DEF_RELEASE_INTERVAL),
        this->releaseInterval
    );
//
//     rules.Add(
//         new val_Integer(    c_startReleaseEarly,
//                             val_Limit(cfg_DEF_START_RELEASE_EARLY, cfg_MAX_START_RELEASE_EARLY),
//                             0,
//                             1,
//                             cfg_DEF_START_RELEASE_EARLY),
//         this->startReleaseEarly
//     );
//
//     rules.Add(
//         new val_Integer(    c_startReleaseNumF,
//                             val_Limit(cfg_MIN_START_RELEASE_NUMF, cfg_MAX_START_RELEASE_NUMF),
//                             0,
//                             1,
//                             cfg_DEF_START_RELEASE_NUMF),
//         this->startReleaseNumFiles
//     );
//
//     rules.Add(
//         new val_Duration(   c_startReleaseTime,
//                             val_Limit(cfg_MIN_START_RELEASE_TIME, cfg_MAX_START_RELEASE_TIME),
//                             0,
//                             1,
//                             cfg_DEF_START_RELEASE_TIME),
//         this->startReleaseTime
//     );



// ReleaseFiles

    rules.Add(
        new val_Duration(c_migRetentionTime,
                         val_Limit(  cfg_MIN_MIGRETENTIONTIME, cfg_MAX_MIGRETENTIONTIME ),
                         0,
                         1,
                         cfg_DEF_MIGRETENTIONTIME ),
        this->migRetentionTime
    );

    rules.Add(
        new val_Duration(c_recallRetentionTime,
                         val_Limit(  cfg_MIN_RECALLRETENTIONTIME, cfg_MAX_RECALLRETENTIONTIME ),
                         0,
                         1,
                         cfg_DEF_RECALLRETENTIONTIME ),
        this->recallRetentionTime
    );

    rules.Add(
        new val_Size(c_minFileSize,
                     val_Limit(  cfg_MIN_MINFILESIZE, cfg_MAX_MINFILESIZE ) ,
                     0,
                     1,
                     cfg_DEF_MINFILESIZE),
        this->minFileSize
    );

    rules.Add(
        new val_FileNamePatternList(c_releaseExcludeFile,
                                    val_Limit(  1, cfg_MAX_FILENAME ),
                                    0),
        this->releaseExcludeFile
    );
//
//     rules.Add(
//         new val_StrictStringList(c_releaseExcludePath,  val_Limit(  1, cfg_MAX_PATHNAME_d ) ),
//         this->releaseExcludePath
//     );


    rules.Add(
        new val_Duration(c_recallTimeOut,
                         val_Limit(  cfg_MIN_RECALL_TIMEOUT, cfg_MAX_RECALL_TIMEOUT ),
                         0,
                         1,
                         cfg_DEF_RECALL_TIMEOUT ),
        this->recallTimeOut
    );

    //Allocation
    rules.Add(
        new val_Integer(c_maxNumDrives,
                        val_Limit(cfg_MIN_MAXNUMDRIVES_P, cfg_MAX_MAXNUMDRIVES_P ),
                        0,
                        1,
                        cfg_DEF_MAXNUMDRIVES_P),
        this->maxNumDrives
    );

    rules.Add(
        new val_Integer(c_maxNumDrivesRecall,
                        val_Limit(cfg_MIN_MAXNUMDRIVESRECALL_P, cfg_MAX_MAXNUMDRIVESRECALL_P ),
                        0,
                        1,
                        cfg_DEF_MAXNUMDRIVESRECALL_P),
        this->maxNumDrivesRecall
    );

    rules.Add(
        new val_Integer(c_maxNumDrivesMigration,
                        val_Limit(cfg_MIN_MAXNUMDRIVESMIG_P, cfg_MAX_MAXNUMDRIVESMIG_P ),
                        0,
                        1,
                        cfg_DEF_MAXNUMDRIVESMIG_P),
        this->maxNumDrivesMigration
    );

    rules.Add(
        new val_Integer(c_maxNumDrivesReorg,
                        val_Limit(cfg_MIN_MAXNUMDRIVESREORG_P, cfg_MAX_MAXNUMDRIVESREORG_P ),
                        0,
                        1,
                        cfg_DEF_MAXNUMDRIVESREORG_P),
        this->maxNumDrivesReorg
    );

    rules.Add(
        new val_Integer(c_maxNumDrivesRecovery,
                        val_Limit(cfg_MIN_MAXNUMDRIVESRECOVERY_P, cfg_MAX_MAXNUMDRIVESRECOVERY_P ),
                        0,
                        1,
                        cfg_DEF_MAXNUMDRIVESRECOVERY_P),
        this->maxNumDrivesRecovery
    );


    rules.Add(
        new val_Integer(c_maxNumDrivesMaint,
                        val_Limit(cfg_MIN_MAXNUMDRIVESMAINT_P, cfg_MAX_MAXNUMDRIVESMAINT_P ),
                        0,
                        1,
                        cfg_DEF_MAXNUMDRIVESMAINT_P),
        this->maxNumDrivesMaint
    );

//     rules.Add(
//         new val_Integer(    c_reserveNumDrives,
//                             val_Limit(cfg_MIN_RESNUMDRIVES, cfg_MAX_RESNUMDRIVES ),
//                             0,
//                             1,
//                             cfg_DEF_MAXNUMDRIVESREORG_P),
//         this->reserveNumDrives
//     );
//
//     rules.Add(
//         new val_Integer(    c_reserveNumDrivesRecall,
//                             val_Limit(cfg_MIN_RESNUMDRIVESRECALL, cfg_MAX_RESNUMDRIVESRECALL ),
//                             0,
//                             1,
//                             cfg_DEF_MAXNUMDRIVESREORG_P),
//         this->reserveNumDrivesRecall
//     );
//
//     rules.Add(
//         new val_Integer(    c_reserveNumDrivesMigration,
//                             val_Limit(cfg_MIN_RESNUMDRIVESMIG, cfg_MAX_RESNUMDRIVESMIG ),
//                             0,
//                             1,
//                             cfg_DEF_MAXNUMDRIVESREORG_P),
//         this->reserveNumDrivesMigration
//     );
//
//     rules.Add(
//         new val_Integer(    c_reserveNumDrivesReorg,
//                             val_Limit(cfg_MIN_RESNUMDRIVESREORG, cfg_MAX_RESNUMDRIVESREORG ),
//                             0,
//                             1,
//                             cfg_DEF_MAXNUMDRIVESREORG_P),
//         this->reserveNumDrivesReorg
//     );

    rules.Add(
        new val_Integer(c_partitionPriority,
                        val_Limit(cfg_MIN_PARTPRIORITY, cfg_MAX_PARTPRIORITY ),
                        0,
                        1,
                        cfg_DEF_MAXNUMDRIVESREORG_P),
        this->partitionPriority
    );

    rules.Add(
        new val_Integer(c_recallPriority,
                        val_Limit(cfg_MIN_PARTRECALLPRIORITY, cfg_MAX_PARTRECALLPRIORITY ),
                        0,
                        1,
                        cfg_DEF_PARTRECALLPRIORITY),
        this->recallPriority
    );

    rules.Add(
        new val_Integer(c_migrationPriority,
                        val_Limit(cfg_MIN_PARTMIGPRIORITY, cfg_MAX_PARTMIGPRIORITY ),
                        0,
                        1,
                        cfg_DEF_PARTMIGPRIORITY),
        this->migrationPriority
    );

    rules.Add(
        new val_Integer(c_reorgPriority,
                        val_Limit(cfg_MIN_PARTREORGPRIORITY, cfg_MAX_PARTREORGPRIORITY ),
                        0,
                        1,
                        cfg_DEF_PARTREORGPRIORITY),
        this->reorgPriority
    );

    rules.Add(
        new val_Integer(c_recoveryPriority,
                        val_Limit(cfg_MIN_PARTRECOVERYPRIORITY, cfg_MAX_PARTRECOVERYPRIORITY ),
                        0,
                        1,
                        cfg_DEF_PARTRECOVERYPRIORITY),
        this->recoveryPriority
    );

    rules.Add(
        new val_Integer(c_maintPriority,
                        val_Limit(cfg_MIN_PARTMAINTPRIORITY, cfg_MAX_PARTMAINTPRIORITY ),
                        0,
                        1,
                        cfg_DEF_PARTMAINTPRIORITY),
        this->maintPriority
    );

    rules.Add(
        new val_Path( c_alternateDataPath,
                        val_Limit(cfg_MIN_ADPATH, cfg_MAX_ADPATH),
                        0,
                        1,
                        cfg_DEF_ADPATH),
        this->alternateDataPath
    );

#if IVD_POSIX_OS
    #warning ""Is an enum conversion needed here?
#elif TGT_OS_windows
    #pragma message ("WARNING: Is an enum conversion needed here?")
#endif
    rules.Add(
        new val_Integer(c_fscMode,
                        val_Limit(cfg_MIN_FSCMODE, cfg_MAX_FSCMODE),
                        0,
                        1,
                        cfg_DEF_FSCMODE),
        this->fscMode
    );


    /* Add new rules here
    rules.Add(new val_????(c_?????, val_Limit(  cfg_MIN_????, cfg_MAX_???? ) ), this->????);
    */
    deleteFile.clear();

    //Validate and convert common section
    Convert(a_parsedFile.m_common, rules);

    //Validate and convert other sections

    for (unsigned int i = 0; i < a_parsedFile.m_sections.size(); i++) {
        // if section name is needed here it is: i->first

        Convert(a_parsedFile.m_sections.m_vec[i] , rules);

    };

    CheckMandatory(rules);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void cfg_PMCfg::ValidateFileExpiration ( const cfg_PMFileExpiration a_group  )  [private]

Definition at line 619 of file cfg_pm.cpp.

References deleteFile, ie_NOT_VALID, ivd_Error, and cfg_PMFileExpiration::m_pathList.

Referenced by ConvertGroup().

                                                                          {

    vector<cfg_PMFileExpiration>::iterator iter = deleteFile.begin();
    while (iter != deleteFile.end()){
        for (UInt32_t i = 0; i < (*iter).m_pathList.size(); i++) {
            for (UInt32_t j = 0; j < a_group.m_pathList.size(); j++) {
                if (a_group.m_pathList[j].Val() == (*iter).m_pathList[i].Val()) {
                    ostringstream oss;
                    oss << "Path \"" << a_group.m_pathList[j].Val()
                        << "\" has expiration age already set to " << (*iter).name;
                    throw ivd_Error(ie_NOT_VALID, oss.str());
                }
            }
        }
        iter++;
    }
}

Here is the caller graph for this function:

void cfg_PMCfg::ValidatePartitionOptions ( const cfg_PMClient  a_group  )  [private]

Definition at line 610 of file cfg_pm.cpp.

References cfg_PMClient::disableAutMig, ie_NOT_VALID, ivd_Error, log_FUNC_m, and cfg_PMClient::migrateWithCollocation.

Referenced by ConvertGroup().

                                                                   {
    log_FUNC_m(ValidatePartitionOptions);
    if ((a_group.migrateWithCollocation == 1) && (a_group.disableAutMig == 1)) {
        ostringstream msg;
        msg << "Both options could not be active. Disable one of 'MigrateWithCollocation' or 'DisableAutomaticMigrations' options.";
        throw ivd_Error(ie_NOT_VALID, msg.str());
    }
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 232 of file cfg_pm.h.

Referenced by i_PartitionManager_i::FillClientCfg(), and Refresh().

Definition at line 167 of file cfg_pm.h.

Referenced by i_PartitionManager_i::FillClientCfg().

Definition at line 229 of file cfg_pm.h.

Referenced by Refresh().

Definition at line 166 of file cfg_pm.h.

Referenced by i_PartitionManager_i::FillClientCfg().

Reimplemented from cfg_Base.

Definition at line 242 of file cfg_pm.h.

Definition at line 163 of file cfg_pm.h.

Referenced by Refresh().

Definition at line 195 of file cfg_pm.h.

Referenced by i_PartitionManager_i::FillClientCfg(), and Refresh().

Definition at line 162 of file cfg_pm.h.

Referenced by i_PartitionManager_i::FillClientCfg(), and Refresh().

Definition at line 197 of file cfg_pm.h.

Referenced by i_PartitionManager_i::FillClientCfg(), and Refresh().

Definition at line 196 of file cfg_pm.h.

Referenced by i_PartitionManager_i::FillClientCfg(), and Refresh().

Definition at line 202 of file cfg_pm.h.

Referenced by i_PartitionManager_i::FillClientCfg(), and Refresh().

Definition at line 198 of file cfg_pm.h.

Referenced by i_PartitionManager_i::FillClientCfg(), and Refresh().

Definition at line 189 of file cfg_pm.h.

Referenced by i_PartitionManager_i::FillClientCfg(), and Refresh().

Definition at line 223 of file cfg_pm.h.

Referenced by Refresh(), and i_ResourceManager_i::SetRMPartStatus().

Definition at line 217 of file cfg_pm.h.

Referenced by i_ResourceManager_i::SetRMPartStatus().

Definition at line 216 of file cfg_pm.h.

Referenced by i_ResourceManager_i::SetRMPartStatus().

vector of groups of type tree

Definition at line 160 of file cfg_pm.h.

Referenced by ConvertGroup().


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