Commit 2d7dac08 authored by Daniele Kruse's avatar Daniele Kruse
Browse files

added to the interfaces the features requested by Vlado:...

added to the interfaces the features requested by Vlado: label/lastwrite/lastread logs, encryption key and lbp tag for tapes; and encryption flag for pools
parent efa5f144
......@@ -92,11 +92,12 @@ public:
virtual void modifyStorageClassNbCopies(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbCopies) = 0;
virtual void modifyStorageClassComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &comment) = 0;
virtual void createTapePool(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbPartialTapes, const std::string &comment) = 0;
virtual void createTapePool(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbPartialTapes, const bool encryptionValue, const std::string &comment) = 0;
virtual void deleteTapePool(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name) = 0;
virtual std::list<cta::common::dataStructures::TapePool> getTapePools(const cta::common::dataStructures::SecurityIdentity &cliIdentity) const = 0;
virtual void modifyTapePoolNbPartialTapes(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbPartialTapes) = 0;
virtual void modifyTapePoolComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &comment) = 0;
virtual void setTapePoolEncryption(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const bool encryptionValue) = 0;
virtual void createArchiveRoute(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &storageClassName, const uint64_t copyNb, const std::string &tapePoolName, const std::string &comment) = 0;
virtual void deleteArchiveRoute(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &storageClassName, const uint64_t copyNb) = 0;
......@@ -109,19 +110,24 @@ public:
virtual std::list<cta::common::dataStructures::LogicalLibrary> getLogicalLibraries(const cta::common::dataStructures::SecurityIdentity &cliIdentity) const = 0;
virtual void modifyLogicalLibraryComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &comment) = 0;
virtual void createTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName, const uint64_t capacityInBytes,
const bool disabledValue, const bool fullValue, const std::string &comment) = 0;
virtual void createTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName,
const std::string &encryptionKey, const uint64_t capacityInBytes, const bool disabledValue, const bool fullValue, const std::string &comment) = 0;
virtual void deleteTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid) = 0;
virtual std::list<cta::common::dataStructures::Tape> getTapes(const cta::common::dataStructures::SecurityIdentity &cliIdentity,
const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName,
const std::string &capacityInBytes, const std::string &disabledValue, const std::string &fullValue, const std::string &busyValue) = 0;
const std::string &capacityInBytes, const std::string &disabledValue, const std::string &fullValue, const std::string &busyValue, const std::string &lbpValue) = 0;
virtual void reclaimTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid) = 0;
virtual void modifyTapeLogicalLibraryName(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &logicalLibraryName) = 0;
virtual void modifyTapeTapePoolName(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &tapePoolName) = 0;
virtual void modifyTapeCapacityInBytes(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const uint64_t capacityInBytes) = 0;
virtual void modifyTapeEncryptionKey(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &encryptionKey) = 0;
virtual void modifyTapeLabelLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp) = 0; // internal function (noCLI)
virtual void modifyTapeLastWrittenLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp) = 0; // internal function (noCLI)
virtual void modifyTapeLastReadLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp) = 0; // internal function (noCLI)
virtual void setTapeBusy(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool busyValue) = 0; // internal function not exposed to the Admin CLI
virtual void setTapeFull(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool fullValue) = 0;
virtual void setTapeDisabled(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool disabledValue) = 0;
virtual void setTapeLbp(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool lbpValue) = 0; // internal function (noCLI)
virtual void modifyTapeComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &comment) = 0;
virtual void createUser(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &group, const std::string &mountGroup, const std::string &comment) = 0;
......
......@@ -98,7 +98,7 @@ void cta::catalogue::DummyCatalogue::modifyStorageClassComment(const cta::common
//------------------------------------------------------------------------------
// createTapePool
//------------------------------------------------------------------------------
void cta::catalogue::DummyCatalogue::createTapePool(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbPartialTapes, const std::string &comment) {}
void cta::catalogue::DummyCatalogue::createTapePool(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbPartialTapes, const bool encryptionValue, const std::string &comment) {}
//------------------------------------------------------------------------------
// deleteTapePool
......@@ -120,6 +120,11 @@ void cta::catalogue::DummyCatalogue::modifyTapePoolNbPartialTapes(const cta::com
//------------------------------------------------------------------------------
void cta::catalogue::DummyCatalogue::modifyTapePoolComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &comment) {}
//------------------------------------------------------------------------------
// setTapePoolEncryption
//------------------------------------------------------------------------------
void cta::catalogue::DummyCatalogue::setTapePoolEncryption(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const bool encryptionValue) {}
//------------------------------------------------------------------------------
// createArchiveRoute
//------------------------------------------------------------------------------
......@@ -168,8 +173,8 @@ void cta::catalogue::DummyCatalogue::modifyLogicalLibraryComment(const cta::comm
//------------------------------------------------------------------------------
// createTape
//------------------------------------------------------------------------------
void cta::catalogue::DummyCatalogue::createTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName, const uint64_t capacityInBytes,
const bool disabledValue, const bool fullValue, const std::string &comment) {}
void cta::catalogue::DummyCatalogue::createTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName,
const std::string &encryptionKey, const uint64_t capacityInBytes, const bool disabledValue, const bool fullValue, const std::string &comment) {}
//------------------------------------------------------------------------------
// deleteTape
......@@ -181,7 +186,7 @@ void cta::catalogue::DummyCatalogue::deleteTape(const cta::common::dataStructure
//------------------------------------------------------------------------------
std::list<cta::common::dataStructures::Tape> cta::catalogue::DummyCatalogue::getTapes(const cta::common::dataStructures::SecurityIdentity &cliIdentity,
const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName,
const std::string &capacityInBytes, const std::string &disabledValue, const std::string &fullValue, const std::string &busyValue) { return std::list<cta::common::dataStructures::Tape>();}
const std::string &capacityInBytes, const std::string &disabledValue, const std::string &fullValue, const std::string &busyValue, const std::string &lbpValue) { return std::list<cta::common::dataStructures::Tape>();}
//------------------------------------------------------------------------------
// reclaimTape
......@@ -203,6 +208,26 @@ void cta::catalogue::DummyCatalogue::modifyTapeTapePoolName(const cta::common::d
//------------------------------------------------------------------------------
void cta::catalogue::DummyCatalogue::modifyTapeCapacityInBytes(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const uint64_t capacityInBytes) {}
//------------------------------------------------------------------------------
// modifyTapeEncryptionKey
//------------------------------------------------------------------------------
void cta::catalogue::DummyCatalogue::modifyTapeEncryptionKey(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &encryptionKey) {}
//------------------------------------------------------------------------------
// modifyTapeLabelLog
//------------------------------------------------------------------------------
void cta::catalogue::DummyCatalogue::modifyTapeLabelLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp) {}
//------------------------------------------------------------------------------
// modifyTapeLastWrittenLog
//------------------------------------------------------------------------------
void cta::catalogue::DummyCatalogue::modifyTapeLastWrittenLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp) {}
//------------------------------------------------------------------------------
// modifyTapeLastReadLog
//------------------------------------------------------------------------------
void cta::catalogue::DummyCatalogue::modifyTapeLastReadLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp) {}
//------------------------------------------------------------------------------
// setTapeBusy
//------------------------------------------------------------------------------
......@@ -218,6 +243,11 @@ void cta::catalogue::DummyCatalogue::setTapeFull(const cta::common::dataStructur
//------------------------------------------------------------------------------
void cta::catalogue::DummyCatalogue::setTapeDisabled(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool disabledValue) {}
//------------------------------------------------------------------------------
// setTapeLbp
//------------------------------------------------------------------------------
void cta::catalogue::DummyCatalogue::setTapeLbp(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool lbpValue) {}
//------------------------------------------------------------------------------
// modifyTapeComment
//------------------------------------------------------------------------------
......
......@@ -52,11 +52,12 @@ public:
virtual void modifyStorageClassNbCopies(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbCopies);
virtual void modifyStorageClassComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &comment);
virtual void createTapePool(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbPartialTapes, const std::string &comment);
virtual void createTapePool(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbPartialTapes, const bool encryptionValue, const std::string &comment);
virtual void deleteTapePool(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name);
virtual std::list<cta::common::dataStructures::TapePool> getTapePools(const cta::common::dataStructures::SecurityIdentity &cliIdentity) const;
virtual void modifyTapePoolNbPartialTapes(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbPartialTapes);
virtual void modifyTapePoolComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &comment);
virtual void setTapePoolEncryption(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const bool encryptionValue);
virtual void createArchiveRoute(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &storageClassName, const uint64_t copyNb, const std::string &tapePoolName, const std::string &comment);
virtual void deleteArchiveRoute(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &storageClassName, const uint64_t copyNb);
......@@ -69,19 +70,24 @@ public:
virtual std::list<cta::common::dataStructures::LogicalLibrary> getLogicalLibraries(const cta::common::dataStructures::SecurityIdentity &cliIdentity) const;
virtual void modifyLogicalLibraryComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &comment);
virtual void createTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName, const uint64_t capacityInBytes,
const bool disabledValue, const bool fullValue, const std::string &comment);
virtual void createTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName,
const std::string &encryptionKey, const uint64_t capacityInBytes, const bool disabledValue, const bool fullValue, const std::string &comment);
virtual void deleteTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid);
virtual std::list<cta::common::dataStructures::Tape> getTapes(const cta::common::dataStructures::SecurityIdentity &cliIdentity,
const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName,
const std::string &capacityInBytes, const std::string &disabledValue, const std::string &fullValue, const std::string &busyValue);
const std::string &capacityInBytes, const std::string &disabledValue, const std::string &fullValue, const std::string &busyValue, const std::string &lbpValue);
virtual void reclaimTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid);
virtual void modifyTapeLogicalLibraryName(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &logicalLibraryName);
virtual void modifyTapeTapePoolName(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &tapePoolName);
virtual void modifyTapeCapacityInBytes(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const uint64_t capacityInBytes);
virtual void modifyTapeEncryptionKey(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &encryptionKey);
virtual void modifyTapeLabelLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp); // internal function (noCLI)
virtual void modifyTapeLastWrittenLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp); // internal function (noCLI)
virtual void modifyTapeLastReadLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp); // internal function (noCLI)
virtual void setTapeBusy(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool busyValue); // internal function not exposed to the Admin CLI
virtual void setTapeFull(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool fullValue);
virtual void setTapeDisabled(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool disabledValue);
virtual void setTapeLbp(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool lbpValue); // internal function (noCLI)
virtual void modifyTapeComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &comment);
virtual void createUser(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &group, const std::string &mountGroup, const std::string &comment);
......
......@@ -342,7 +342,7 @@ void cta::catalogue::SqliteCatalogue::modifyStorageClassComment(const common::da
//------------------------------------------------------------------------------
// createTapePool
//------------------------------------------------------------------------------
void cta::catalogue::SqliteCatalogue::createTapePool(const common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbPartialTapes, const std::string &comment) {}
void cta::catalogue::SqliteCatalogue::createTapePool(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbPartialTapes, const bool encryptionValue, const std::string &comment) {}
//------------------------------------------------------------------------------
// deleteTapePool
......@@ -364,6 +364,11 @@ void cta::catalogue::SqliteCatalogue::modifyTapePoolNbPartialTapes(const common:
//------------------------------------------------------------------------------
void cta::catalogue::SqliteCatalogue::modifyTapePoolComment(const common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &comment) {}
//------------------------------------------------------------------------------
// setTapePoolEncryption
//------------------------------------------------------------------------------
void cta::catalogue::SqliteCatalogue::setTapePoolEncryption(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const bool encryptionValue) {}
//------------------------------------------------------------------------------
// createArchiveRoute
//------------------------------------------------------------------------------
......@@ -412,8 +417,8 @@ void cta::catalogue::SqliteCatalogue::modifyLogicalLibraryComment(const common::
//------------------------------------------------------------------------------
// createTape
//------------------------------------------------------------------------------
void cta::catalogue::SqliteCatalogue::createTape(const common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName, const uint64_t capacityInBytes,
const bool disabledValue, const bool fullValue, const std::string &comment) {}
void cta::catalogue::SqliteCatalogue::createTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName,
const std::string &encryptionKey, const uint64_t capacityInBytes, const bool disabledValue, const bool fullValue, const std::string &comment) {}
//------------------------------------------------------------------------------
// deleteTape
......@@ -423,9 +428,9 @@ void cta::catalogue::SqliteCatalogue::deleteTape(const common::dataStructures::S
//------------------------------------------------------------------------------
// getTapes
//------------------------------------------------------------------------------
std::list<cta::common::dataStructures::Tape> cta::catalogue::SqliteCatalogue::getTapes(const common::dataStructures::SecurityIdentity &cliIdentity,
std::list<cta::common::dataStructures::Tape> cta::catalogue::SqliteCatalogue::getTapes(const cta::common::dataStructures::SecurityIdentity &cliIdentity,
const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName,
const std::string &capacityInBytes, const std::string &disabledValue, const std::string &fullValue, const std::string &busyValue) { return std::list<cta::common::dataStructures::Tape>();}
const std::string &capacityInBytes, const std::string &disabledValue, const std::string &fullValue, const std::string &busyValue, const std::string &lbpValue) { return std::list<cta::common::dataStructures::Tape>();}
//------------------------------------------------------------------------------
// reclaimTape
......@@ -447,6 +452,26 @@ void cta::catalogue::SqliteCatalogue::modifyTapeTapePoolName(const common::dataS
//------------------------------------------------------------------------------
void cta::catalogue::SqliteCatalogue::modifyTapeCapacityInBytes(const common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const uint64_t capacityInBytes) {}
//------------------------------------------------------------------------------
// modifyTapeEncryptionKey
//------------------------------------------------------------------------------
void cta::catalogue::SqliteCatalogue::modifyTapeEncryptionKey(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &encryptionKey) {}
//------------------------------------------------------------------------------
// modifyTapeLabelLog
//------------------------------------------------------------------------------
void cta::catalogue::SqliteCatalogue::modifyTapeLabelLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp) {}
//------------------------------------------------------------------------------
// modifyTapeLastWrittenLog
//------------------------------------------------------------------------------
void cta::catalogue::SqliteCatalogue::modifyTapeLastWrittenLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp) {}
//------------------------------------------------------------------------------
// modifyTapeLastReadLog
//------------------------------------------------------------------------------
void cta::catalogue::SqliteCatalogue::modifyTapeLastReadLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp) {}
//------------------------------------------------------------------------------
// setTapeBusy
//------------------------------------------------------------------------------
......@@ -462,6 +487,11 @@ void cta::catalogue::SqliteCatalogue::setTapeFull(const common::dataStructures::
//------------------------------------------------------------------------------
void cta::catalogue::SqliteCatalogue::setTapeDisabled(const common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool disabledValue) {}
//------------------------------------------------------------------------------
// setTapeLbp
//------------------------------------------------------------------------------
void cta::catalogue::SqliteCatalogue::setTapeLbp(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool lbpValue) {}
//------------------------------------------------------------------------------
// modifyTapeComment
//------------------------------------------------------------------------------
......
......@@ -58,11 +58,12 @@ public:
virtual void modifyStorageClassNbCopies(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbCopies);
virtual void modifyStorageClassComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &comment);
virtual void createTapePool(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbPartialTapes, const std::string &comment);
virtual void createTapePool(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbPartialTapes, const bool encryptionValue, const std::string &comment);
virtual void deleteTapePool(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name);
virtual std::list<cta::common::dataStructures::TapePool> getTapePools(const cta::common::dataStructures::SecurityIdentity &cliIdentity) const;
virtual void modifyTapePoolNbPartialTapes(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbPartialTapes);
virtual void modifyTapePoolComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &comment);
virtual void setTapePoolEncryption(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const bool encryptionValue);
virtual void createArchiveRoute(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &storageClassName, const uint64_t copyNb, const std::string &tapePoolName, const std::string &comment);
virtual void deleteArchiveRoute(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &storageClassName, const uint64_t copyNb);
......@@ -75,19 +76,24 @@ public:
virtual std::list<cta::common::dataStructures::LogicalLibrary> getLogicalLibraries(const cta::common::dataStructures::SecurityIdentity &cliIdentity) const;
virtual void modifyLogicalLibraryComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &comment);
virtual void createTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName, const uint64_t capacityInBytes,
const bool disabledValue, const bool fullValue, const std::string &comment);
virtual void createTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName,
const std::string &encryptionKey, const uint64_t capacityInBytes, const bool disabledValue, const bool fullValue, const std::string &comment);
virtual void deleteTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid);
virtual std::list<cta::common::dataStructures::Tape> getTapes(const cta::common::dataStructures::SecurityIdentity &cliIdentity,
const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName,
const std::string &capacityInBytes, const std::string &disabledValue, const std::string &fullValue, const std::string &busyValue);
const std::string &capacityInBytes, const std::string &disabledValue, const std::string &fullValue, const std::string &busyValue, const std::string &lbpValue);
virtual void reclaimTape(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid);
virtual void modifyTapeLogicalLibraryName(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &logicalLibraryName);
virtual void modifyTapeTapePoolName(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &tapePoolName);
virtual void modifyTapeCapacityInBytes(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const uint64_t capacityInBytes);
virtual void modifyTapeEncryptionKey(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &encryptionKey);
virtual void modifyTapeLabelLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp); // internal function (noCLI)
virtual void modifyTapeLastWrittenLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp); // internal function (noCLI)
virtual void modifyTapeLastReadLog(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &drive, const uint64_t timestamp); // internal function (noCLI)
virtual void setTapeBusy(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool busyValue); // internal function not exposed to the Admin CLI
virtual void setTapeFull(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool fullValue);
virtual void setTapeDisabled(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool disabledValue);
virtual void setTapeLbp(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const bool lbpValue); // internal function (noCLI)
virtual void modifyTapeComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &vid, const std::string &comment);
virtual void createUser(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &group, const std::string &mountGroup, const std::string &comment);
......
......@@ -29,6 +29,7 @@ set (COMMON_LIB_SRC_FILES
dataStructures/StorageClass.cpp
dataStructures/Tape.cpp
dataStructures/TapeFileLocation.cpp
dataStructures/TapeLog.cpp
dataStructures/TapePool.cpp
dataStructures/TestSourceType.cpp
dataStructures/UpdateFileInfoRequest.cpp
......
......@@ -30,9 +30,14 @@ bool cta::common::dataStructures::Tape::operator==(const Tape &rhs) const {
&& creationLog==rhs.creationLog
&& dataOnTapeInBytes==rhs.dataOnTapeInBytes
&& disabled==rhs.disabled
&& encryptionKey==rhs.encryptionKey
&& full==rhs.full
&& labelLog==rhs.labelLog
&& lastFSeq==rhs.lastFSeq
&& lastModificationLog==rhs.lastModificationLog
&& lastReadLog==rhs.lastReadLog
&& lastWriteLog==rhs.lastWriteLog
&& lbp==rhs.lbp
&& logicalLibraryName==rhs.logicalLibraryName
&& tapePoolName==rhs.tapePoolName
&& vid==rhs.vid;
......@@ -55,9 +60,14 @@ std::ostream &operator<<(std::ostream &os, const cta::common::dataStructures::Ta
<< " creationLog=" << obj.creationLog
<< " dataOnTapeInBytes=" << obj.dataOnTapeInBytes
<< " disabled=" << obj.disabled
<< " encryptionKey=" << obj.encryptionKey
<< " full=" << obj.full
<< " labelLog=" << obj.labelLog
<< " lastFSeq=" << obj.lastFSeq
<< " lastModificationLog=" << obj.lastModificationLog
<< " lastReadLog=" << obj.lastReadLog
<< " lastWriteLog=" << obj.lastWriteLog
<< " lbp=" << obj.lbp
<< " logicalLibraryName=" << obj.logicalLibraryName
<< " tapePoolName=" << obj.tapePoolName
<< " vid=" << obj.vid << ")";
......
......@@ -24,6 +24,7 @@
#include <string>
#include "common/dataStructures/EntryLog.hpp"
#include "common/dataStructures/TapeLog.hpp"
namespace cta {
namespace common {
......@@ -42,9 +43,14 @@ struct Tape {
cta::common::dataStructures::EntryLog creationLog;
uint64_t dataOnTapeInBytes;
bool disabled;
std::string encryptionKey;
bool full;
cta::common::dataStructures::TapeLog labelLog;
uint64_t lastFSeq;
cta::common::dataStructures::EntryLog lastModificationLog;
cta::common::dataStructures::TapeLog lastReadLog;
cta::common::dataStructures::TapeLog lastWriteLog;
bool lbp;
std::string logicalLibraryName;
std::string tapePoolName;
std::string vid;
......
/*
* The CERN Tape Archive (CTA) project
* Copyright (C) 2015 CERN
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "common/dataStructures/TapeLog.hpp"
#include "common/dataStructures/utils.hpp"
#include "common/exception/Exception.hpp"
//------------------------------------------------------------------------------
// operator==
//------------------------------------------------------------------------------
bool cta::common::dataStructures::TapeLog::operator==(const TapeLog &rhs) const {
return drive==rhs.drive
&& time==rhs.time;
}
//------------------------------------------------------------------------------
// operator!=
//------------------------------------------------------------------------------
bool cta::common::dataStructures::TapeLog::operator!=(const TapeLog &rhs) const {
return !operator==(rhs);
}
//------------------------------------------------------------------------------
// operator<<
//------------------------------------------------------------------------------
std::ostream &operator<<(std::ostream &os, const cta::common::dataStructures::TapeLog &obj) {
os << "(drive=" << obj.drive
<< " time=" << obj.time << ")";
return os;
}
/*
* The CERN Tape Archive (CTA) project
* Copyright (C) 2015 CERN
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <list>
#include <map>
#include <stdint.h>
#include <string>
namespace cta {
namespace common {
namespace dataStructures {
struct TapeLog {
bool operator==(const TapeLog &rhs) const;
bool operator!=(const TapeLog &rhs) const;
std::string drive;
time_t time;
}; // struct TapeLog
} // namespace dataStructures
} // namespace common
} // namespace cta
std::ostream &operator<<(std::ostream &os, const cta::common::dataStructures::TapeLog &obj);
......@@ -26,6 +26,7 @@
bool cta::common::dataStructures::TapePool::operator==(const TapePool &rhs) const {
return comment==rhs.comment
&& creationLog==rhs.creationLog
&& encryption==rhs.encryption
&& lastModificationLog==rhs.lastModificationLog
&& name==rhs.name
&& nbPartialTapes==rhs.nbPartialTapes;
......@@ -44,6 +45,7 @@ bool cta::common::dataStructures::TapePool::operator!=(const TapePool &rhs) cons
std::ostream &operator<<(std::ostream &os, const cta::common::dataStructures::TapePool &obj) {
os << "(comment=" << obj.comment
<< " creationLog=" << obj.creationLog
<< " encryption=" << obj.encryption
<< " lastModificationLog=" << obj.lastModificationLog
<< " name=" << obj.name
<< " nbPartialTapes=" << obj.nbPartialTapes << ")";
......
......@@ -38,6 +38,7 @@ struct TapePool {
std::string comment;
cta::common::dataStructures::EntryLog creationLog;
bool encryption;
cta::common::dataStructures::EntryLog lastModificationLog;
std::string name;
uint64_t nbPartialTapes;
......
......@@ -15,8 +15,8 @@ cta ah/adminhost add/ch/rm/ls:
ls [--header/-h]
cta tp/tapepool add/ch/rm/ls:
add --name/-n <tapepool_name> --partialtapesnumber/-p <number_of_partial_tapes> --comment/-m <"comment">
ch --name/-n <tapepool_name> [--partialtapesnumber/-p <number_of_partial_tapes>] [--comment/-m <"comment">]
add --name/-n <tapepool_name> --partialtapesnumber/-p <number_of_partial_tapes> [--encryption/-e or --clear/-c] --comment/-m <"comment">
ch --name/-n <tapepool_name> [--partialtapesnumber/-p <number_of_partial_tapes>] [--encryption/-e or --clear/-c] [--comment/-m <"comment">]
rm --name/-n <tapepool_name>
ls [--header/-h]
......@@ -33,11 +33,14 @@ cta ll/logicallibrary add/ch/rm/ls:
ls [--header/-h]
cta ta/tape add/ch/rm/reclaim/ls/label:
add --vid/-v <vid> --logicallibrary/-l <logical_library_name> --tapepool/-t <tapepool_name> --capacity/-c <capacity_in_bytes> [--enabled/-e or --disabled/-d] [--free/-f or --full/-F] [--comment/-m <"comment">]
ch --vid/-v <vid> [--logicallibrary/-l <logical_library_name>] [--tapepool/-t <tapepool_name>] [--capacity/-c <capacity_in_bytes>] [--enabled/-e or --disabled/-d] [--free/-f or --full/-F] [--comment/-m <"comment">]
add --vid/-v <vid> --logicallibrary/-l <logical_library_name> --tapepool/-t <tapepool_name> --capacity/-c <capacity_in_bytes> --encryptionkey/-k <encryption_key> [--enabled/-e or --disabled/-d]
[--free/-f or --full/-F] [--comment/-m <"comment">]
ch --vid/-v <vid> [--logicallibrary/-l <logical_library_name>] [--tapepool/-t <tapepool_name>] [--capacity/-c <capacity_in_bytes>] [--encryptionkey/-k <encryption_key>] [--enabled/-e or --disabled/-d]
[--free/-f or --full/-F] [--comment/-m <"comment">]
rm --vid/-v <vid>
reclaim --vid/-v <vid>
ls [--header/-h] [--vid/-v <vid>] [--logicallibrary/-l <logical_library_name>] [--tapepool/-t <tapepool_name>] [--capacity/-c <capacity_in_bytes>] [--enabled/-e or --disabled/-d] [--free/-f or --full/-F] [--busy/-b or --notbusy/-n]
ls [--header/-h] [--vid/-v <vid>] [--logicallibrary/-l <logical_library_name>] [--tapepool/-t <tapepool_name>] [--capacity/-c <capacity_in_bytes>] [--enabled/-e or --disabled/-d]
[--free/-f or --full/-F] [--lbp/-p or --nolbp/-P] [--busy/-b or --notbusy/-n]
label --vid/-v <vid> [--force/-f] [--lbp/-l] [--tag/-t <tag_name>]
cta sc/storageclass add/ch/rm/ls:
......
......@@ -110,11 +110,12 @@ virtual std::list<StorageClass> getStorageClass
virtual void modifyStorageClassNbCopies (const SecurityIdentity &requester, const std::string &name, const uint64_t nbCopies);
virtual void modifyStorageClassComment (const SecurityIdentity &requester, const std::string &name, const std::string &comment);
virtual void createTapePool (const SecurityIdentity &requester, const std::string &name, const uint64_t nbPartialTapes, const std::string &comment);
virtual void createTapePool (const SecurityIdentity &requester, const std::string &name, const uint64_t nbPartialTapes, const bool encryptionValue, const std::string &comment);
virtual void deleteTapePool (const SecurityIdentity &requester, const std::string &name);
virtual std::list<TapePool> getTapePools (const SecurityIdentity &requester) const;
virtual void modifyTapePoolNbPartialTapes (const SecurityIdentity &requester, const std::string &name, const uint64_t nbPartialTapes);
virtual void modifyTapePoolComment (const SecurityIdentity &requester, const std::string &name, const std::string &comment);
virtual void setTapePoolEncryption (const SecurityIdentity &requester, const std::string &name, const bool encryptionValue);
virtual void createArchiveRoute (const SecurityIdentity &requester, const std::string &storageClassName, const uint64_t copyNb, const std::string &tapePoolName,
const std::string &comment);
......@@ -129,49 +130,55 @@ virtual std::list<LogicalLibrary> getLogicalLibra
virtual void modifyLogicalLibraryComment (const SecurityIdentity &requester, const std::string &name, const std::string &comment);
virtual void createTape (const SecurityIdentity &requester, const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName,
const uint64_t capacityInBytes, const bool disabledValue, const bool fullValue, const std::string &comment);
const std::string &encryptionKey, const uint64_t capacityInBytes, const bool disabledValue, const bool fullValue, const std::string &comment);
virtual void deleteTape (const SecurityIdentity &requester, const std::string &vid);
virtual std::list<Tape> getTapes (const SecurityIdentity &requester, const std::string &vid, const std::string &logicalLibraryName, const std::string &tapePoolName,
const std::string &capacityInBytes, const std::string &disabledValue, const std::string &fullValue, const std::string &busyValue);
const std::string &capacityInBytes, const std::string &disabledValue, const std::string &fullValue, const std::string &busyValue,
const std::string &lbpValue);
virtual void labelTape (const SecurityIdentity &requester, const std::string &vid, const bool force, const bool lbp, const std::string &tag);
virtual void reclaimTape (const SecurityIdentity &requester, const std::string &vid);
virtual void modifyTapeLogicalLibraryName (const SecurityIdentity &requester, const std::string &vid, const std::string &logicalLibraryName);
virtual void modifyTapeTapePoolName (const SecurityIdentity &requester, const std::string &vid, const std::string &tapePoolName);
virtual void modifyTapeEncryptionKey (const SecurityIdentity &requester, const std::string &vid, const std::string &encryptionKey);
virtual void modifyTapeCapacityInBytes (const SecurityIdentity &requester, const std::string &vid, const uint64_t capacityInBytes);
virtual void setTapeBusy (const SecurityIdentity &requester, const std::string &vid, const bool busyValue); // internal function not exposed to the Admin CLI
virtual void modifyTapeLabelLog (const SecurityIdentity &requester, const std::string &vid, const std::string &drive, const uint64_t timestamp); // internal function (noCLI)
virtual void modifyTapeLastWrittenLog (const SecurityIdentity &requester, const std::string &vid, const std::string &drive, const uint64_t timestamp); // internal function (noCLI)
virtual void modifyTapeLastReadLog (const SecurityIdentity &requester, const std::string &vid, const std::string &drive, const uint64_t timestamp); // internal function (noCLI)
virtual void setTapeBusy (const SecurityIdentity &requester, const std::string &vid, const bool busyValue); // internal function (noCLI)
virtual void setTapeFull (const SecurityIdentity &requester, const std::string &vid, const bool fullValue);
virtual void setTapeDisabled (const SecurityIdentity &requester, const std::string &vid, const bool disabledValue);
virtual void setTapeLbp (const SecurityIdentity &requester, const std::string &vid, const bool lbpValue); // internal function (noCLI)
virtual void modifyTapeComment (const SecurityIdentity &requester, const std::string &vid, const std::string &comment);
virtual void createUser (const SecurityIdentity &requester, const std::string &name, const std::string &group, const std::string &mountGroup,
const std::string &comment);
virtual void deleteUser (const SecurityIdentity &requester, const std::string &name, const std::string &group);