Commit f20b955b authored by Daniele Kruse's avatar Daniele Kruse
Browse files

Added temporary mount criteria for demo

parent 95c6e8b2
......@@ -22,8 +22,9 @@
// constructor
//------------------------------------------------------------------------------
cta::Tape::Tape():
capacityInBytes(0),
dataOnTapeInBytes(0) {
nbFiles(0),
capacityInBytes(0),
dataOnTapeInBytes(0) {
}
//------------------------------------------------------------------------------
......@@ -36,22 +37,22 @@ cta::Tape::~Tape() throw() {
// constructor
//------------------------------------------------------------------------------
cta::Tape::Tape(
const std::string &vid,
const uint64_t nbFiles,
const std::string &logicalLibraryName,
const std::string &tapePoolName,
const uint64_t capacityInBytes,
const uint64_t dataOnTapeInBytes,
const CreationLog & creationLog,
const Status & status):
vid(vid),
nbFiles(nbFiles),
logicalLibraryName(logicalLibraryName),
tapePoolName(tapePoolName),
capacityInBytes(capacityInBytes),
dataOnTapeInBytes(dataOnTapeInBytes),
creationLog(creationLog),
status(status) {
const std::string &vid,
const uint64_t nbFiles,
const std::string &logicalLibraryName,
const std::string &tapePoolName,
const uint64_t capacityInBytes,
const uint64_t dataOnTapeInBytes,
const CreationLog & creationLog,
const Status & status):
vid(vid),
nbFiles(nbFiles),
logicalLibraryName(logicalLibraryName),
tapePoolName(tapePoolName),
capacityInBytes(capacityInBytes),
dataOnTapeInBytes(dataOnTapeInBytes),
creationLog(creationLog),
status(status) {
}
//------------------------------------------------------------------------------
......
......@@ -611,8 +611,16 @@ void XrdProFile::xCom_tapepool(const std::vector<std::string> &tokens, const cta
}
std::istringstream partialtapes_ss(partialtapes_s);
int partialtapes = 0;
partialtapes_ss >> partialtapes;
partialtapes_ss >> partialtapes;
m_scheduler->createTapePool(requester, name, partialtapes, comment);
//TODO: The following hardcoded parameters should really be given by the user from the CLI. However before doing this we must clarify the scheduler interface and change it accordingly
cta::MountCriteria immediateMount;
immediateMount.maxAge = 0;
immediateMount.maxBytesQueued = 1;
immediateMount.maxFilesQueued = 1;
immediateMount.quota = 10;
m_scheduler->setTapePoolMountCriteria(name, cta::MountCriteriaByDirection(immediateMount, immediateMount));
}
else if("ch" == tokens[2]) {
std::string name = getOptionValue(tokens, "-n", "--name");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment