Commit 9d957a79 authored by Daniele Kruse's avatar Daniele Kruse
Browse files

Renamed drData (and its fields) to diskFileInfo to better reflect the use that...

Renamed drData (and its fields) to diskFileInfo to better reflect the use that we make of that structure
parent e08a24e2
......@@ -34,7 +34,7 @@
#include "common/dataStructures/Dedication.hpp"
#include "common/dataStructures/DedicationType.hpp"
#include "common/dataStructures/DeleteArchiveRequest.hpp"
#include "common/dataStructures/DRData.hpp"
#include "common/dataStructures/DiskFileInfo.hpp"
#include "common/dataStructures/DriveState.hpp"
#include "common/dataStructures/EntryLog.hpp"
#include "common/dataStructures/ListStorageClassRequest.hpp"
......
......@@ -1928,10 +1928,10 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, prepareToRetrieveFile) {
ASSERT_EQ(file1Written.storageClassName, archiveFile.storageClass);
ASSERT_EQ(file1Written.diskInstance, archiveFile.diskInstance);
ASSERT_EQ(file1Written.diskFilePath, archiveFile.drData.drPath);
ASSERT_EQ(file1Written.diskFileUser, archiveFile.drData.drOwner);
ASSERT_EQ(file1Written.diskFileGroup, archiveFile.drData.drGroup);
ASSERT_EQ(file1Written.diskFileRecoveryBlob, archiveFile.drData.drBlob);
ASSERT_EQ(file1Written.diskFilePath, archiveFile.diskFileInfo.path);
ASSERT_EQ(file1Written.diskFileUser, archiveFile.diskFileInfo.owner);
ASSERT_EQ(file1Written.diskFileGroup, archiveFile.diskFileInfo.group);
ASSERT_EQ(file1Written.diskFileRecoveryBlob, archiveFile.diskFileInfo.recoveryBlob);
ASSERT_EQ(1, archiveFile.tapeFiles.size());
auto copyNbToTapeFile1Itor = archiveFile.tapeFiles.find(1);
......@@ -1970,10 +1970,10 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, prepareToRetrieveFile) {
ASSERT_EQ(file2Written.storageClassName, archiveFile.storageClass);
ASSERT_EQ(file2Written.diskInstance, archiveFile.diskInstance);
ASSERT_EQ(file2Written.diskFilePath, archiveFile.drData.drPath);
ASSERT_EQ(file2Written.diskFileUser, archiveFile.drData.drOwner);
ASSERT_EQ(file2Written.diskFileGroup, archiveFile.drData.drGroup);
ASSERT_EQ(file2Written.diskFileRecoveryBlob, archiveFile.drData.drBlob);
ASSERT_EQ(file2Written.diskFilePath, archiveFile.diskFileInfo.path);
ASSERT_EQ(file2Written.diskFileUser, archiveFile.diskFileInfo.owner);
ASSERT_EQ(file2Written.diskFileGroup, archiveFile.diskFileInfo.group);
ASSERT_EQ(file2Written.diskFileRecoveryBlob, archiveFile.diskFileInfo.recoveryBlob);
ASSERT_EQ(2, archiveFile.tapeFiles.size());
......@@ -2292,10 +2292,10 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, fileWrittenToTape_2_tape_files_diffe
ASSERT_EQ(file1Written.storageClassName, archiveFile.storageClass);
ASSERT_EQ(file1Written.diskInstance, archiveFile.diskInstance);
ASSERT_EQ(file1Written.diskFilePath, archiveFile.drData.drPath);
ASSERT_EQ(file1Written.diskFileUser, archiveFile.drData.drOwner);
ASSERT_EQ(file1Written.diskFileGroup, archiveFile.drData.drGroup);
ASSERT_EQ(file1Written.diskFileRecoveryBlob, archiveFile.drData.drBlob);
ASSERT_EQ(file1Written.diskFilePath, archiveFile.diskFileInfo.path);
ASSERT_EQ(file1Written.diskFileUser, archiveFile.diskFileInfo.owner);
ASSERT_EQ(file1Written.diskFileGroup, archiveFile.diskFileInfo.group);
ASSERT_EQ(file1Written.diskFileRecoveryBlob, archiveFile.diskFileInfo.recoveryBlob);
ASSERT_EQ(1, archiveFile.tapeFiles.size());
auto copyNbToTapeFile1Itor = archiveFile.tapeFiles.find(1);
......@@ -2342,10 +2342,10 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, fileWrittenToTape_2_tape_files_diffe
ASSERT_EQ(file2Written.storageClassName, archiveFile.storageClass);
ASSERT_EQ(file2Written.diskInstance, archiveFile.diskInstance);
ASSERT_EQ(file2Written.diskFilePath, archiveFile.drData.drPath);
ASSERT_EQ(file2Written.diskFileUser, archiveFile.drData.drOwner);
ASSERT_EQ(file2Written.diskFileGroup, archiveFile.drData.drGroup);
ASSERT_EQ(file2Written.diskFileRecoveryBlob, archiveFile.drData.drBlob);
ASSERT_EQ(file2Written.diskFilePath, archiveFile.diskFileInfo.path);
ASSERT_EQ(file2Written.diskFileUser, archiveFile.diskFileInfo.owner);
ASSERT_EQ(file2Written.diskFileGroup, archiveFile.diskFileInfo.group);
ASSERT_EQ(file2Written.diskFileRecoveryBlob, archiveFile.diskFileInfo.recoveryBlob);
ASSERT_EQ(2, archiveFile.tapeFiles.size());
......@@ -2459,10 +2459,10 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, fileWrittenToTape_2_tape_files_same_
ASSERT_EQ(file1Written.storageClassName, archiveFile.storageClass);
ASSERT_EQ(file1Written.diskInstance, archiveFile.diskInstance);
ASSERT_EQ(file1Written.diskFilePath, archiveFile.drData.drPath);
ASSERT_EQ(file1Written.diskFileUser, archiveFile.drData.drOwner);
ASSERT_EQ(file1Written.diskFileGroup, archiveFile.drData.drGroup);
ASSERT_EQ(file1Written.diskFileRecoveryBlob, archiveFile.drData.drBlob);
ASSERT_EQ(file1Written.diskFilePath, archiveFile.diskFileInfo.path);
ASSERT_EQ(file1Written.diskFileUser, archiveFile.diskFileInfo.owner);
ASSERT_EQ(file1Written.diskFileGroup, archiveFile.diskFileInfo.group);
ASSERT_EQ(file1Written.diskFileRecoveryBlob, archiveFile.diskFileInfo.recoveryBlob);
ASSERT_EQ(1, archiveFile.tapeFiles.size());
auto copyNbToTapeFile1Itor = archiveFile.tapeFiles.find(1);
......@@ -2573,10 +2573,10 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, fileWrittenToTape_2_tape_files_corru
ASSERT_EQ(file1Written.storageClassName, archiveFile.storageClass);
ASSERT_EQ(file1Written.diskInstance, archiveFile.diskInstance);
ASSERT_EQ(file1Written.diskFilePath, archiveFile.drData.drPath);
ASSERT_EQ(file1Written.diskFileUser, archiveFile.drData.drOwner);
ASSERT_EQ(file1Written.diskFileGroup, archiveFile.drData.drGroup);
ASSERT_EQ(file1Written.diskFileRecoveryBlob, archiveFile.drData.drBlob);
ASSERT_EQ(file1Written.diskFilePath, archiveFile.diskFileInfo.path);
ASSERT_EQ(file1Written.diskFileUser, archiveFile.diskFileInfo.owner);
ASSERT_EQ(file1Written.diskFileGroup, archiveFile.diskFileInfo.group);
ASSERT_EQ(file1Written.diskFileRecoveryBlob, archiveFile.diskFileInfo.recoveryBlob);
ASSERT_EQ(1, archiveFile.tapeFiles.size());
auto copyNbToTapeFile1Itor = archiveFile.tapeFiles.find(1);
......@@ -2728,10 +2728,10 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, deleteArchiveFile) {
ASSERT_EQ(file1Written.storageClassName, archiveFile.storageClass);
ASSERT_EQ(file1Written.diskInstance, archiveFile.diskInstance);
ASSERT_EQ(file1Written.diskFilePath, archiveFile.drData.drPath);
ASSERT_EQ(file1Written.diskFileUser, archiveFile.drData.drOwner);
ASSERT_EQ(file1Written.diskFileGroup, archiveFile.drData.drGroup);
ASSERT_EQ(file1Written.diskFileRecoveryBlob, archiveFile.drData.drBlob);
ASSERT_EQ(file1Written.diskFilePath, archiveFile.diskFileInfo.path);
ASSERT_EQ(file1Written.diskFileUser, archiveFile.diskFileInfo.owner);
ASSERT_EQ(file1Written.diskFileGroup, archiveFile.diskFileInfo.group);
ASSERT_EQ(file1Written.diskFileRecoveryBlob, archiveFile.diskFileInfo.recoveryBlob);
ASSERT_EQ(1, archiveFile.tapeFiles.size());
auto copyNbToTapeFile1Itor = archiveFile.tapeFiles.find(1);
......@@ -2753,10 +2753,10 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, deleteArchiveFile) {
ASSERT_EQ(file1Written.storageClassName, archiveFile.storageClass);
ASSERT_EQ(file1Written.diskInstance, archiveFile.diskInstance);
ASSERT_EQ(file1Written.diskFilePath, archiveFile.drData.drPath);
ASSERT_EQ(file1Written.diskFileUser, archiveFile.drData.drOwner);
ASSERT_EQ(file1Written.diskFileGroup, archiveFile.drData.drGroup);
ASSERT_EQ(file1Written.diskFileRecoveryBlob, archiveFile.drData.drBlob);
ASSERT_EQ(file1Written.diskFilePath, archiveFile.diskFileInfo.path);
ASSERT_EQ(file1Written.diskFileUser, archiveFile.diskFileInfo.owner);
ASSERT_EQ(file1Written.diskFileGroup, archiveFile.diskFileInfo.group);
ASSERT_EQ(file1Written.diskFileRecoveryBlob, archiveFile.diskFileInfo.recoveryBlob);
ASSERT_EQ(1, archiveFile.tapeFiles.size());
auto copyNbToTapeFile1Itor = archiveFile.tapeFiles.find(1);
......@@ -2811,10 +2811,10 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, deleteArchiveFile) {
ASSERT_EQ(file2Written.storageClassName, archiveFile.storageClass);
ASSERT_EQ(file2Written.diskInstance, archiveFile.diskInstance);
ASSERT_EQ(file2Written.diskFilePath, archiveFile.drData.drPath);
ASSERT_EQ(file2Written.diskFileUser, archiveFile.drData.drOwner);
ASSERT_EQ(file2Written.diskFileGroup, archiveFile.drData.drGroup);
ASSERT_EQ(file2Written.diskFileRecoveryBlob, archiveFile.drData.drBlob);
ASSERT_EQ(file2Written.diskFilePath, archiveFile.diskFileInfo.path);
ASSERT_EQ(file2Written.diskFileUser, archiveFile.diskFileInfo.owner);
ASSERT_EQ(file2Written.diskFileGroup, archiveFile.diskFileInfo.group);
ASSERT_EQ(file2Written.diskFileRecoveryBlob, archiveFile.diskFileInfo.recoveryBlob);
ASSERT_EQ(2, archiveFile.tapeFiles.size());
......@@ -2847,10 +2847,10 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, deleteArchiveFile) {
ASSERT_EQ(file2Written.storageClassName, archiveFile.storageClass);
ASSERT_EQ(file2Written.diskInstance, archiveFile.diskInstance);
ASSERT_EQ(file2Written.diskFilePath, archiveFile.drData.drPath);
ASSERT_EQ(file2Written.diskFileUser, archiveFile.drData.drOwner);
ASSERT_EQ(file2Written.diskFileGroup, archiveFile.drData.drGroup);
ASSERT_EQ(file2Written.diskFileRecoveryBlob, archiveFile.drData.drBlob);
ASSERT_EQ(file2Written.diskFilePath, archiveFile.diskFileInfo.path);
ASSERT_EQ(file2Written.diskFileUser, archiveFile.diskFileInfo.owner);
ASSERT_EQ(file2Written.diskFileGroup, archiveFile.diskFileInfo.group);
ASSERT_EQ(file2Written.diskFileRecoveryBlob, archiveFile.diskFileInfo.recoveryBlob);
ASSERT_EQ(2, archiveFile.tapeFiles.size());
......@@ -2882,10 +2882,10 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, deleteArchiveFile) {
ASSERT_EQ(file2Written.storageClassName, archiveFile.storageClass);
ASSERT_EQ(file2Written.diskInstance, archiveFile.diskInstance);
ASSERT_EQ(file2Written.diskFilePath, archiveFile.drData.drPath);
ASSERT_EQ(file2Written.diskFileUser, archiveFile.drData.drOwner);
ASSERT_EQ(file2Written.diskFileGroup, archiveFile.drData.drGroup);
ASSERT_EQ(file2Written.diskFileRecoveryBlob, archiveFile.drData.drBlob);
ASSERT_EQ(file2Written.diskFilePath, archiveFile.diskFileInfo.path);
ASSERT_EQ(file2Written.diskFileUser, archiveFile.diskFileInfo.owner);
ASSERT_EQ(file2Written.diskFileGroup, archiveFile.diskFileInfo.group);
ASSERT_EQ(file2Written.diskFileRecoveryBlob, archiveFile.diskFileInfo.recoveryBlob);
ASSERT_EQ(2, archiveFile.tapeFiles.size());
......
......@@ -2483,10 +2483,10 @@ std::list<common::dataStructures::ArchiveFile> RdbmsCatalogue::getArchiveFilesFo
archiveFile.archiveFileID = archiveFileId;
archiveFile.diskInstance = rset->columnText("DISK_INSTANCE");
archiveFile.diskFileId = rset->columnText("DISK_FILE_ID");
archiveFile.drData.drPath = rset->columnText("DISK_FILE_PATH");
archiveFile.drData.drOwner = rset->columnText("DISK_FILE_USER");
archiveFile.drData.drGroup = rset->columnText("DISK_FILE_GROUP");
archiveFile.drData.drBlob = rset->columnText("DISK_FILE_RECOVERY_BLOB");
archiveFile.diskFileInfo.path = rset->columnText("DISK_FILE_PATH");
archiveFile.diskFileInfo.owner = rset->columnText("DISK_FILE_USER");
archiveFile.diskFileInfo.group = rset->columnText("DISK_FILE_GROUP");
archiveFile.diskFileInfo.recoveryBlob = rset->columnText("DISK_FILE_RECOVERY_BLOB");
archiveFile.fileSize = rset->columnUint64("FILE_SIZE");
archiveFile.checksumType = rset->columnText("CHECKSUM_TYPE");
archiveFile.checksumValue = rset->columnText("CHECKSUM_VALUE");
......@@ -2754,25 +2754,25 @@ void RdbmsCatalogue::throwIfCommonEventDataMismatch(const common::dataStructures
actual.diskInstance;
throw ex;
}
if(expected.drData.drPath != actual.diskFilePath) {
if(expected.diskFileInfo.path != actual.diskFilePath) {
exception::Exception ex;
ex.getMessage() << "Disk file path mismatch: expected=" << expected.drData.drPath << " actual=" <<
ex.getMessage() << "Disk file path mismatch: expected=" << expected.diskFileInfo.path << " actual=" <<
actual.diskFilePath;
throw ex;
}
if(expected.drData.drOwner != actual.diskFileUser) {
if(expected.diskFileInfo.owner != actual.diskFileUser) {
exception::Exception ex;
ex.getMessage() << "Disk file user mismatch: expected=" << expected.drData.drOwner << " actual=" <<
ex.getMessage() << "Disk file user mismatch: expected=" << expected.diskFileInfo.owner << " actual=" <<
actual.diskFileUser;
throw ex;
}
if(expected.drData.drGroup != actual.diskFileGroup) {
if(expected.diskFileInfo.group != actual.diskFileGroup) {
exception::Exception ex;
ex.getMessage() << "Disk file group mismatch: expected=" << expected.drData.drGroup << " actual=" <<
ex.getMessage() << "Disk file group mismatch: expected=" << expected.diskFileInfo.group << " actual=" <<
actual.diskFileGroup;
throw ex;
}
if(expected.drData.drGroup != actual.diskFileGroup) {
if(expected.diskFileInfo.group != actual.diskFileGroup) {
exception::Exception ex;
ex.getMessage() << "Disk recovery blob mismatch";
throw ex;
......@@ -3157,10 +3157,10 @@ std::unique_ptr<common::dataStructures::ArchiveFile> RdbmsCatalogue::getArchiveF
archiveFile->archiveFileID = rset->columnUint64("ARCHIVE_FILE_ID");
archiveFile->diskInstance = rset->columnText("DISK_INSTANCE");
archiveFile->diskFileId = rset->columnText("DISK_FILE_ID");
archiveFile->drData.drPath = rset->columnText("DISK_FILE_PATH");
archiveFile->drData.drOwner = rset->columnText("DISK_FILE_USER");
archiveFile->drData.drGroup = rset->columnText("DISK_FILE_GROUP");
archiveFile->drData.drBlob = rset->columnText("DISK_FILE_RECOVERY_BLOB");
archiveFile->diskFileInfo.path = rset->columnText("DISK_FILE_PATH");
archiveFile->diskFileInfo.owner = rset->columnText("DISK_FILE_USER");
archiveFile->diskFileInfo.group = rset->columnText("DISK_FILE_GROUP");
archiveFile->diskFileInfo.recoveryBlob = rset->columnText("DISK_FILE_RECOVERY_BLOB");
archiveFile->fileSize = rset->columnUint64("FILE_SIZE");
archiveFile->checksumType = rset->columnText("CHECKSUM_TYPE");
archiveFile->checksumValue = rset->columnText("CHECKSUM_VALUE");
......
......@@ -91,10 +91,10 @@ common::dataStructures::ArchiveFile SqliteCatalogue::deleteArchiveFile(const uin
archiveFile->archiveFileID = selectRset->columnUint64("ARCHIVE_FILE_ID");
archiveFile->diskInstance = selectRset->columnText("DISK_INSTANCE");
archiveFile->diskFileId = selectRset->columnText("DISK_FILE_ID");
archiveFile->drData.drPath = selectRset->columnText("DISK_FILE_PATH");
archiveFile->drData.drOwner = selectRset->columnText("DISK_FILE_USER");
archiveFile->drData.drGroup = selectRset->columnText("DISK_FILE_GROUP");
archiveFile->drData.drBlob = selectRset->columnText("DISK_FILE_RECOVERY_BLOB");
archiveFile->diskFileInfo.path = selectRset->columnText("DISK_FILE_PATH");
archiveFile->diskFileInfo.owner = selectRset->columnText("DISK_FILE_USER");
archiveFile->diskFileInfo.group = selectRset->columnText("DISK_FILE_GROUP");
archiveFile->diskFileInfo.recoveryBlob = selectRset->columnText("DISK_FILE_RECOVERY_BLOB");
archiveFile->fileSize = selectRset->columnUint64("FILE_SIZE");
archiveFile->checksumType = selectRset->columnText("CHECKSUM_TYPE");
archiveFile->checksumValue = selectRset->columnText("CHECKSUM_VALUE");
......
......@@ -34,7 +34,7 @@ set (COMMON_LIB_SRC_FILES
dataStructures/Dedication.cpp
dataStructures/DedicationType.cpp
dataStructures/DeleteArchiveRequest.cpp
dataStructures/DRData.cpp
dataStructures/DiskFileInfo.cpp
dataStructures/DriveState.cpp
dataStructures/DriveStatus.cpp
dataStructures/EntryLog.cpp
......
......@@ -45,7 +45,7 @@ bool ArchiveFile::operator==(const ArchiveFile &rhs) const {
&& checksumType == rhs.checksumType
&& checksumValue == rhs.checksumValue
&& storageClass == rhs.storageClass
&& drData == rhs.drData
&& diskFileInfo == rhs.diskFileInfo
&& tapeFiles == rhs.tapeFiles;
}
......@@ -69,7 +69,7 @@ std::ostream &operator<<(std::ostream &os, ArchiveFile &obj) {
"checksumType=" << obj.checksumType << ","
"checksumValue=" << obj.checksumValue << ","
"storageClass=" << obj.storageClass << ","
"drData=" << obj.drData << ","
"diskFileInfo=" << obj.diskFileInfo << ","
"tapeFiles=" << obj.tapeFiles << ","
"creationTime=" << obj.creationTime << ","
"reconciliationTime=" << obj.reconciliationTime <<
......
......@@ -23,7 +23,7 @@
#include <stdint.h>
#include <string>
#include "common/dataStructures/DRData.hpp"
#include "common/dataStructures/DiskFileInfo.hpp"
#include "common/dataStructures/TapeFile.hpp"
namespace cta {
......@@ -62,7 +62,7 @@ struct ArchiveFile {
*/
std::string checksumValue;
std::string storageClass;
DRData drData;
DiskFileInfo diskFileInfo;
/**
* This map represents the non-necessarily-exhaustive set of tape copies
* to be listed by the operator. For example, if the listing requested is
......
......@@ -45,10 +45,10 @@ TEST_F(cta_common_dataStructures_ArchiveFileTest, copy_constructor) {
archiveFile1.storageClass = "storage_class";
archiveFile1.diskInstance = "recovery_instance";
archiveFile1.drData.drPath = "recovery_path";
archiveFile1.drData.drOwner = "recovery_owner";
archiveFile1.drData.drGroup = "recovery_group";
archiveFile1.drData.drBlob = "recovery_blob";
archiveFile1.diskFileInfo.path = "recovery_path";
archiveFile1.diskFileInfo.owner = "recovery_owner";
archiveFile1.diskFileInfo.group = "recovery_group";
archiveFile1.diskFileInfo.recoveryBlob = "recovery_blob";
TapeFile tapeFile1;
tapeFile1.vid = "VID1";
......@@ -82,10 +82,10 @@ TEST_F(cta_common_dataStructures_ArchiveFileTest, copy_constructor) {
ASSERT_EQ(archiveFile1.storageClass, archiveFile2.storageClass);
ASSERT_EQ(archiveFile1.diskInstance, archiveFile2.diskInstance);
ASSERT_EQ(archiveFile1.drData.drPath, archiveFile2.drData.drPath);
ASSERT_EQ(archiveFile1.drData.drOwner, archiveFile2.drData.drOwner);
ASSERT_EQ(archiveFile1.drData.drGroup, archiveFile2.drData.drGroup);
ASSERT_EQ(archiveFile1.drData.drBlob, archiveFile2.drData.drBlob);
ASSERT_EQ(archiveFile1.diskFileInfo.path, archiveFile2.diskFileInfo.path);
ASSERT_EQ(archiveFile1.diskFileInfo.owner, archiveFile2.diskFileInfo.owner);
ASSERT_EQ(archiveFile1.diskFileInfo.group, archiveFile2.diskFileInfo.group);
ASSERT_EQ(archiveFile1.diskFileInfo.recoveryBlob, archiveFile2.diskFileInfo.recoveryBlob);
ASSERT_EQ(2, archiveFile2.tapeFiles.size());
......
......@@ -43,7 +43,7 @@ bool ArchiveRequest::operator==(const ArchiveRequest &rhs) const {
&& checksumType==rhs.checksumType
&& checksumValue==rhs.checksumValue
&& storageClass==rhs.storageClass
&& drData==rhs.drData
&& diskFileInfo==rhs.diskFileInfo
&& diskpoolName==rhs.diskpoolName
&& diskpoolThroughput==rhs.diskpoolThroughput
&& creationLog==rhs.creationLog;
......@@ -68,7 +68,7 @@ std::ostream &operator<<(std::ostream &os, const ArchiveRequest &obj) {
<< " checksumType=" << obj.checksumType
<< " checksumValue=" << obj.checksumValue
<< " storageClass=" << obj.storageClass
<< " drData=" << obj.drData
<< " diskFileInfo=" << obj.diskFileInfo
<< " diskpoolName=" << obj.diskpoolName
<< " diskpoolThroughput=" << obj.diskpoolThroughput
<< " creationLog=" << obj.creationLog << ")";
......
......@@ -23,7 +23,7 @@
#include <stdint.h>
#include <string>
#include "common/dataStructures/DRData.hpp"
#include "common/dataStructures/DiskFileInfo.hpp"
#include "common/dataStructures/EntryLog.hpp"
#include "common/dataStructures/UserIdentity.hpp"
......@@ -56,7 +56,7 @@ struct ArchiveRequest {
*/
std::string checksumValue;
std::string storageClass;
DRData drData;
DiskFileInfo diskFileInfo;
std::string diskpoolName;
uint64_t diskpoolThroughput;
EntryLog creationLog;
......
......@@ -37,7 +37,7 @@ bool CancelRetrieveRequest::operator==(const CancelRetrieveRequest &rhs) const {
return requester==rhs.requester
&& archiveFileID==rhs.archiveFileID
&& dstURL==rhs.dstURL
&& drData==rhs.drData;
&& diskFileInfo==rhs.diskFileInfo;
}
//------------------------------------------------------------------------------
......@@ -54,7 +54,7 @@ std::ostream &operator<<(std::ostream &os, const CancelRetrieveRequest &obj) {
os << "(requester=" << obj.requester
<< " archiveFileID=" << obj.archiveFileID
<< " dstURL=" << obj.dstURL
<< " drData=" << obj.drData << ")";
<< " diskFileInfo=" << obj.diskFileInfo << ")";
return os;
}
......
......@@ -23,7 +23,7 @@
#include <stdint.h>
#include <string>
#include "common/dataStructures/DRData.hpp"
#include "common/dataStructures/DiskFileInfo.hpp"
#include "common/dataStructures/UserIdentity.hpp"
namespace cta {
......@@ -44,7 +44,7 @@ struct CancelRetrieveRequest {
UserIdentity requester;
uint64_t archiveFileID;
std::string dstURL;
DRData drData;
DiskFileInfo diskFileInfo;
}; // struct CancelRetrieveRequest
......
......@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "common/dataStructures/DRData.hpp"
#include "common/dataStructures/DiskFileInfo.hpp"
#include "common/dataStructures/utils.hpp"
#include "common/exception/Exception.hpp"
......@@ -27,33 +27,33 @@ namespace dataStructures {
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
DRData::DRData() {}
DiskFileInfo::DiskFileInfo() {}
//------------------------------------------------------------------------------
// operator==
//------------------------------------------------------------------------------
bool DRData::operator==(const DRData &rhs) const {
return drPath==rhs.drPath
&& drOwner==rhs.drOwner
&& drGroup==rhs.drGroup
&& drBlob==rhs.drBlob;
bool DiskFileInfo::operator==(const DiskFileInfo &rhs) const {
return path==rhs.path
&& owner==rhs.owner
&& group==rhs.group
&& recoveryBlob==rhs.recoveryBlob;
}
//------------------------------------------------------------------------------
// operator!=
//------------------------------------------------------------------------------
bool DRData::operator!=(const DRData &rhs) const {
bool DiskFileInfo::operator!=(const DiskFileInfo &rhs) const {
return !operator==(rhs);
}
//------------------------------------------------------------------------------
// operator<<
//------------------------------------------------------------------------------
std::ostream &operator<<(std::ostream &os, const DRData &obj) {
os << "(drPath=" << obj.drPath
<< " drOwner=" << obj.drOwner
<< " drGroup=" << obj.drGroup
<< " drBlob=" << obj.drBlob << ")";
std::ostream &operator<<(std::ostream &os, const DiskFileInfo &obj) {
os << "(path=" << obj.path
<< " owner=" << obj.owner
<< " group=" << obj.group
<< " recoveryBlob=" << obj.recoveryBlob << ")";
return os;
}
......
......@@ -32,22 +32,22 @@ namespace dataStructures {
* This struct holds all the data necessary to rebuild the original disk based
* file in case of disaster
*/
struct DRData {
struct DiskFileInfo {
DRData();
DiskFileInfo();
bool operator==(const DRData &rhs) const;
bool operator==(const DiskFileInfo &rhs) const;
bool operator!=(const DRData &rhs) const;
bool operator!=(const DiskFileInfo &rhs) const;
std::string drPath;
std::string drOwner;
std::string drGroup;
std::string drBlob;
std::string path;
std::string owner;
std::string group;
std::string recoveryBlob;
}; // struct DRData
}; // struct DiskFileInfo
std::ostream &operator<<(std::ostream &os, const DRData &obj);
std::ostream &operator<<(std::ostream &os, const DiskFileInfo &obj);
} // namespace dataStructures
} // namespace common
......
......@@ -38,7 +38,7 @@ bool RetrieveRequest::operator==(const RetrieveRequest &rhs) const {
return requester==rhs.requester
&& archiveFileID==rhs.archiveFileID
&& dstURL==rhs.dstURL
&& drData==rhs.drData
&& diskFileInfo==rhs.diskFileInfo
&& diskpoolName==rhs.diskpoolName
&& diskpoolThroughput==rhs.diskpoolThroughput
&& creationLog==rhs.creationLog;
......@@ -58,7 +58,7 @@ std::ostream &operator<<(std::ostream &os, const RetrieveRequest &obj) {
os << "(requester=" << obj.requester
<< " archiveFileID=" << obj.archiveFileID
<< " dstURL=" << obj.dstURL
<< " drData=" << obj.drData
<< " diskFileInfo=" << obj.diskFileInfo
<< " diskpoolName=" << obj.diskpoolName
<< " diskpoolThroughput=" << obj.diskpoolThroughput
<< " creationLog=" << obj.creationLog << ")";
......
......@@ -23,7 +23,7 @@
#include <stdint.h>
#include <string>
#include "common/dataStructures/DRData.hpp"
#include "common/dataStructures/DiskFileInfo.hpp"
#include "common/dataStructures/EntryLog.hpp"
#include "common/dataStructures/UserIdentity.hpp"
......@@ -45,7 +45,7 @@ struct RetrieveRequest {
UserIdentity requester;
uint64_t archiveFileID;
std::string dstURL;
DRData drData;
DiskFileInfo diskFileInfo;
std::string diskpoolName;
uint64_t diskpoolThroughput;
EntryLog creationLog;
......
......@@ -35,7 +35,7 @@ UpdateFileInfoRequest::UpdateFileInfoRequest():
//------------------------------------------------------------------------------
bool UpdateFileInfoRequest::operator==(const UpdateFileInfoRequest &rhs) const {
return archiveFileID==rhs.archiveFileID
&& drData==rhs.drData;
&& diskFileInfo==rhs.diskFileInfo;
}
//------------------------------------------------------------------------------
......@@ -50,7 +50,7 @@ bool UpdateFileInfoRequest::operator!=(const UpdateFileInfoRequest &rhs) const {
//------------------------------------------------------------------------------
std::ostream &operator<<(std::ostream &os, const UpdateFileInfoRequest &obj) {
os << "(archiveFileID=" << obj.archiveFileID
<< " drData=" << obj.drData << ")";
<< " diskFileInfo=" << obj.diskFileInfo << ")";
return os;
}
......
......@@ -23,7 +23,7 @@
#include <stdint.h>
#include <string>
#include "common/dataStructures/DRData.hpp"
#include "common/dataStructures/DiskFileInfo.hpp"
namespace cta {
namespace common {
......@@ -42,7 +42,7 @@ struct UpdateFileInfoRequest {
bool operator!=(const UpdateFileInfoRequest &rhs) const;
uint64_t archiveFileID;
DRData drData;
DiskFileInfo diskFileInfo;
}; // struct UpdateFileInfoRequest
......
......@@ -37,7 +37,7 @@ bool UpdateFileStorageClassRequest::operator==(const UpdateFileStorageClassReque
return requester==rhs.requester
&& archiveFileID==rhs.archiveFileID
&& storageClass==rhs.storageClass
&& drData==rhs.drData;
&& diskFileInfo==rhs.diskFileInfo;