本文整理汇总了C++中Oam::getSystemDbrootConfig方法的典型用法代码示例。如果您正苦于以下问题:C++ Oam::getSystemDbrootConfig方法的具体用法?C++ Oam::getSystemDbrootConfig怎么用?C++ Oam::getSystemDbrootConfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Oam
的用法示例。
在下文中一共展示了Oam::getSystemDbrootConfig方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
ModuleTypeConfig moduletypeconfig;
oam.getSystemConfig("um", moduletypeconfig);
for ( int id = 1; id < moduletypeconfig.ModuleCount+1 ; id++)
{
string volumeNameID = "UMVolumeName" + oam.itoa(id);
string volumeName = oam::UnassignedName;
string deviceNameID = "UMVolumeDeviceName" + oam.itoa(id);
string deviceName = oam::UnassignedName;
try {
volumeName = sysConfigOld->getConfig(InstallSection, volumeNameID);
deviceName = sysConfigOld->getConfig(InstallSection, deviceNameID);
}
catch(...)
{}
try {
sysConfigNew->setConfig(InstallSection, volumeNameID, volumeName);
sysConfigNew->setConfig(InstallSection, deviceNameID, deviceName);
}
catch(...)
{}
}
}
catch (exception& e)
{
cout << endl << "**** getStorageConfig Failed : " << e.what() << endl;
}
}
//setup dbroot storage
try
{
DBRootConfigList dbrootConfigList;
oam.getSystemDbrootConfig(dbrootConfigList);
DBRootConfigList::iterator pt = dbrootConfigList.begin();
for( ; pt != dbrootConfigList.end() ; pt++)
{
int id = *pt;
string DBrootID = "DBRoot" + oam.itoa(id);;
string pathID = "/usr/local/Calpont/data" + oam.itoa(id);
try {
sysConfigNew->setConfig(SystemSection, DBrootID, pathID);
}
catch(...)
{
cout << "ERROR: Problem setting DBRoot in the Calpont System Configuration file" << endl;
exit(-1);
}
if ( cloud == "amazon" && DBRootStorageType == "external") {
string volumeNameID = "PMVolumeName" + oam.itoa(id);
string volumeName = oam::UnassignedName;
string deviceNameID = "PMVolumeDeviceName" + oam.itoa(id);
string deviceName = oam::UnassignedName;
try {
volumeName = sysConfigOld->getConfig(InstallSection, volumeNameID);
deviceName = sysConfigOld->getConfig(InstallSection, deviceNameID);
}
catch(...)
{}
try {
sysConfigNew->setConfig(InstallSection, volumeNameID, volumeName);