Commit 4e37fa06 authored by Steven Murray's avatar Steven Murray
Browse files

Removed minimum files and bytes from the use of mount group within the catalogue

parent 9fe3bcad
......@@ -24,7 +24,6 @@ set (CATALOGUE_LIB_SRC_FILES
Catalogue.cpp
ColumnNameToIdx.cpp
DbLogin.cpp
DummyCatalogue.cpp
OcciConn.cpp
OcciEnv.cpp
OcciRset.cpp
......
......@@ -138,9 +138,16 @@ public:
virtual void modifyUserMountGroup(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &group, const std::string &mountGroup) = 0;
virtual void modifyUserComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &group, const std::string &comment) = 0;
virtual void createMountGroup(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t archivePriority, const uint64_t minArchiveFilesQueued,
const uint64_t minArchiveBytesQueued, const uint64_t minArchiveRequestAge, const uint64_t retrievePriority, const uint64_t minRetrieveFilesQueued,
const uint64_t minRetrieveBytesQueued, const uint64_t minRetrieveRequestAge, const uint64_t maxDrivesAllowed, const std::string &comment) = 0;
virtual void createMountGroup(
const cta::common::dataStructures::SecurityIdentity &cliIdentity,
const std::string &name,
const uint64_t archivePriority,
const uint64_t minArchiveRequestAge,
const uint64_t retrievePriority,
const uint64_t minRetrieveRequestAge,
const uint64_t maxDrivesAllowed,
const std::string &comment) = 0;
virtual void deleteMountGroup(const std::string &name) = 0;
virtual std::list<cta::common::dataStructures::MountGroup> getMountGroups() const = 0;
virtual void modifyMountGroupArchivePriority(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t archivePriority) = 0;
......
This diff is collapsed.
/*
* 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 "catalogue/Catalogue.hpp"
namespace cta {
namespace catalogue {
/**
* Dummy CTA catalogue to facilitate unit testing.
*/
class DummyCatalogue: public Catalogue {
public:
/**
* Destructor.
*/
virtual ~DummyCatalogue();
virtual void createBootstrapAdminAndHostNoAuth(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const cta::common::dataStructures::UserIdentity &user, const std::string &hostName, const std::string &comment);
virtual void createAdminUser(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const cta::common::dataStructures::UserIdentity &user, const std::string &comment);
virtual void deleteAdminUser(const cta::common::dataStructures::UserIdentity &user);
virtual std::list<cta::common::dataStructures::AdminUser> getAdminUsers() const;
virtual void modifyAdminUserComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const cta::common::dataStructures::UserIdentity &user, const std::string &comment);
virtual void createAdminHost(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &hostName, const std::string &comment);
virtual void deleteAdminHost(const std::string &hostName);
virtual std::list<cta::common::dataStructures::AdminHost> getAdminHosts() const;
virtual void modifyAdminHostComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &hostName, const std::string &comment);
virtual void createStorageClass(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t nbCopies, const std::string &comment);
virtual void deleteStorageClass(const std::string &name);
virtual std::list<cta::common::dataStructures::StorageClass> getStorageClasses() const;
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 bool encryptionValue, const std::string &comment);
virtual void deleteTapePool(const std::string &name);
virtual std::list<cta::common::dataStructures::TapePool> getTapePools() 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 std::string &storageClassName, const uint64_t copyNb);
virtual std::list<cta::common::dataStructures::ArchiveRoute> getArchiveRoutes() const;
virtual void modifyArchiveRouteTapePoolName(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &storageClassName, const uint64_t copyNb, const std::string &tapePoolName);
virtual void modifyArchiveRouteComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &storageClassName, const uint64_t copyNb, const std::string &comment);
virtual void createLogicalLibrary(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &comment);
virtual void deleteLogicalLibrary(const std::string &name);
virtual std::list<cta::common::dataStructures::LogicalLibrary> getLogicalLibraries() 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 std::string &encryptionKey, const uint64_t capacityInBytes, const bool disabledValue, const bool fullValue, const std::string &comment);
virtual void deleteTape(const std::string &vid);
virtual std::list<cta::common::dataStructures::Tape> getTapes(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 &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);
virtual void deleteUser(const std::string &name, const std::string &group);
virtual std::list<cta::common::dataStructures::User> getUsers() const;
virtual void modifyUserMountGroup(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &group, const std::string &mountGroup);
virtual void modifyUserComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &group, const std::string &comment);
virtual void createMountGroup(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t archivePriority, const uint64_t minArchiveFilesQueued,
const uint64_t minArchiveBytesQueued, const uint64_t minArchiveRequestAge, const uint64_t retrievePriority, const uint64_t minRetrieveFilesQueued,
const uint64_t minRetrieveBytesQueued, const uint64_t minRetrieveRequestAge, const uint64_t maxDrivesAllowed, const std::string &comment);
virtual void deleteMountGroup(const std::string &name);
virtual std::list<cta::common::dataStructures::MountGroup> getMountGroups() const;
virtual void modifyMountGroupArchivePriority(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t archivePriority);
virtual void modifyMountGroupArchiveMinFilesQueued(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t minArchiveFilesQueued);
virtual void modifyMountGroupArchiveMinBytesQueued(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t minArchiveBytesQueued);
virtual void modifyMountGroupArchiveMinRequestAge(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t minArchiveRequestAge);
virtual void modifyMountGroupRetrievePriority(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t retrievePriority);
virtual void modifyMountGroupRetrieveMinFilesQueued(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t minRetrieveFilesQueued);
virtual void modifyMountGroupRetrieveMinBytesQueued(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t minRetrieveBytesQueued);
virtual void modifyMountGroupRetrieveMinRequestAge(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t minRetrieveRequestAge);
virtual void modifyMountGroupMaxDrivesAllowed(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t maxDrivesAllowed);
virtual void modifyMountGroupComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &comment);
virtual void createDedication(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &drivename, const cta::common::dataStructures::DedicationType dedicationType, const std::string &mountGroup,
const std::string &tag, const std::string &vid, const uint64_t fromTimestamp, const uint64_t untilTimestamp,const std::string &comment);
virtual void deleteDedication(const std::string &drivename);
virtual std::list<cta::common::dataStructures::Dedication> getDedications() const;
virtual void modifyDedicationType(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &drivename, const cta::common::dataStructures::DedicationType dedicationType);
virtual void modifyDedicationMountGroup(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &drivename, const std::string &mountGroup);
virtual void modifyDedicationTag(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &drivename, const std::string &tag);
virtual void modifyDedicationVid(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &drivename, const std::string &vid);
virtual void modifyDedicationFrom(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &drivename, const uint64_t fromTimestamp);
virtual void modifyDedicationUntil(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &drivename, const uint64_t untilTimestamp);
virtual void modifyDedicationComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &drivename, const std::string &comment);
virtual std::list<cta::common::dataStructures::ArchiveFile> getArchiveFiles(const uint64_t id, const std::string &eosid,
const std::string &copynb, const std::string &tapepool, const std::string &vid, const std::string &owner, const std::string &group, const std::string &storageclass, const std::string &path);
virtual cta::common::dataStructures::ArchiveFileSummary getArchiveFileSummary(const uint64_t id, const std::string &eosid,
const std::string &copynb, const std::string &tapepool, const std::string &vid, const std::string &owner, const std::string &group, const std::string &storageclass, const std::string &path);
virtual cta::common::dataStructures::ArchiveFile getArchiveFileById(const uint64_t id);
virtual void setDriveStatus(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &driveName, const bool up, const bool force);
/**
* Notifies the catalogue that a file has been written to tape.
*
* @param archiveRequest The identifier of the archive file.
*
*/
virtual void fileWrittenToTape(
const cta::common::dataStructures::ArchiveRequest &archiveRequest,
const cta::common::dataStructures::TapeFileLocation &tapeFileLocation);
/**
* Prepares the catalogue for a new archive file and returns the information
* required to queue the associated archive request.
*
* @param storageClass The storage class of the file to be archived. This
* will be used by the Catalogue to determine the destinate tape pool for
* each tape copy.
* @param user The user for whom the file is to be archived. This will be
* used by the Catalogue to determine the mount policy to be used when
* archiving the file.
* @return The information required to queue the associated archive request.
*/
virtual cta::common::dataStructures::ArchiveFileQueueCriteria
prepareForNewFile(const std::string &storageClass, const std::string &user);
virtual cta::common::dataStructures::TapeCopyToPoolMap getTapeCopyToPoolMap(const std::string &storageClass) const;
/**
* Returns the archive mount policy for the specified end user.
*
* @param user The name of the end user.
* @return The archive mount policy.
*/
virtual cta::common::dataStructures::MountPolicy getArchiveMountPolicy(
const std::string &user) const;
/**
* Returns the retrieve mount policy for the specified end user.
*
* @param user The name of the end user.
* @return The retrieve mount policy.
*/
virtual cta::common::dataStructures::MountPolicy getRetrieveMountPolicy(
const std::string &user) const;
virtual bool isAdmin(const cta::common::dataStructures::SecurityIdentity &cliIdentity) const;
}; // class DummyCatalogue
} // namespace catalogue
} // namespace cta
......@@ -1537,12 +1537,8 @@ void cta::catalogue::SqliteCatalogue::createMountGroup(
const common::dataStructures::SecurityIdentity &cliIdentity,
const std::string &name,
const uint64_t archivePriority,
const uint64_t minArchiveFilesQueued,
const uint64_t minArchiveBytesQueued,
const uint64_t minArchiveRequestAge,
const uint64_t retrievePriority,
const uint64_t minRetrieveFilesQueued,
const uint64_t minRetrieveBytesQueued,
const uint64_t minRetrieveRequestAge,
const uint64_t maxDrivesAllowed,
const std::string &comment) {
......@@ -1552,13 +1548,9 @@ void cta::catalogue::SqliteCatalogue::createMountGroup(
"MOUNT_GROUP_NAME,"
"ARCHIVE_PRIORITY,"
"MIN_ARCHIVE_FILES_QUEUED,"
"MIN_ARCHIVE_BYTES_QUEUED,"
"MIN_ARCHIVE_REQUEST_AGE,"
"RETRIEVE_PRIORITY,"
"MIN_RETRIEVE_FILES_QUEUED,"
"MIN_RETRIEVE_BYTES_QUEUED,"
"MIN_RETRIEVE_REQUEST_AGE,"
"MAX_DRIVES_ALLOWED,"
......@@ -1578,13 +1570,9 @@ void cta::catalogue::SqliteCatalogue::createMountGroup(
":MOUNT_GROUP_NAME,"
":ARCHIVE_PRIORITY,"
":MIN_ARCHIVE_FILES_QUEUED,"
":MIN_ARCHIVE_BYTES_QUEUED,"
":MIN_ARCHIVE_REQUEST_AGE,"
":RETRIEVE_PRIORITY,"
":MIN_RETRIEVE_FILES_QUEUED,"
":MIN_RETRIEVE_BYTES_QUEUED,"
":MIN_RETRIEVE_REQUEST_AGE,"
":MAX_DRIVES_ALLOWED,"
......@@ -1605,13 +1593,9 @@ void cta::catalogue::SqliteCatalogue::createMountGroup(
stmt->bind(":MOUNT_GROUP_NAME", name);
stmt->bind(":ARCHIVE_PRIORITY", archivePriority);
stmt->bind(":MIN_ARCHIVE_FILES_QUEUED", minArchiveFilesQueued);
stmt->bind(":MIN_ARCHIVE_BYTES_QUEUED", minArchiveBytesQueued);
stmt->bind(":MIN_ARCHIVE_REQUEST_AGE", minArchiveRequestAge);
stmt->bind(":RETRIEVE_PRIORITY", retrievePriority);
stmt->bind(":MIN_RETRIEVE_FILES_QUEUED", minRetrieveFilesQueued);
stmt->bind(":MIN_RETRIEVE_BYTES_QUEUED", minRetrieveBytesQueued);
stmt->bind(":MIN_RETRIEVE_REQUEST_AGE", minRetrieveRequestAge);
stmt->bind(":MAX_DRIVES_ALLOWED", maxDrivesAllowed);
......@@ -1641,15 +1625,11 @@ std::list<cta::common::dataStructures::MountGroup>
"SELECT "
"MOUNT_GROUP_NAME AS MOUNT_GROUP_NAME,"
"ARCHIVE_PRIORITY AS ARCHIVE_PRIORITY,"
"MIN_ARCHIVE_FILES_QUEUED AS MIN_ARCHIVE_FILES_QUEUED,"
"MIN_ARCHIVE_BYTES_QUEUED AS MIN_ARCHIVE_BYTES_QUEUED,"
"MIN_ARCHIVE_REQUEST_AGE AS MIN_ARCHIVE_REQUEST_AGE,"
"ARCHIVE_PRIORITY AS ARCHIVE_PRIORITY,"
"MIN_ARCHIVE_REQUEST_AGE AS MIN_ARCHIVE_REQUEST_AGE,"
"RETRIEVE_PRIORITY AS RETRIEVE_PRIORITY,"
"MIN_RETRIEVE_FILES_QUEUED AS MIN_RETRIEVE_FILES_QUEUED,"
"MIN_RETRIEVE_BYTES_QUEUED AS MIN_RETRIEVE_BYTES_QUEUED,"
"MIN_RETRIEVE_REQUEST_AGE AS MIN_RETRIEVE_REQUEST_AGE,"
"RETRIEVE_PRIORITY AS RETRIEVE_PRIORITY,"
"MIN_RETRIEVE_REQUEST_AGE AS MIN_RETRIEVE_REQUEST_AGE,"
"MAX_DRIVES_ALLOWED AS MAX_DRIVES_ALLOWED,"
......@@ -1676,19 +1656,11 @@ std::list<cta::common::dataStructures::MountGroup>
group.name = stmt->columnText(nameToIdx["MOUNT_GROUP_NAME"]);
group.archive_priority = stmt->columnUint64(nameToIdx["ARCHIVE_PRIORITY"]);
group.archive_minFilesQueued =
stmt->columnUint64(nameToIdx["MIN_ARCHIVE_FILES_QUEUED"]);
group.archive_minBytesQueued =
stmt->columnUint64(nameToIdx["MIN_ARCHIVE_BYTES_QUEUED"]);
group.archive_minRequestAge =
stmt->columnUint64(nameToIdx["MIN_ARCHIVE_REQUEST_AGE"]);
group.retrieve_priority =
stmt->columnUint64(nameToIdx["RETRIEVE_PRIORITY"]);
group.retrieve_minFilesQueued =
stmt->columnUint64(nameToIdx["MIN_RETRIEVE_FILES_QUEUED"]);
group.retrieve_minBytesQueued =
stmt->columnUint64(nameToIdx["MIN_RETRIEVE_BYTES_QUEUED"]);
group.retrieve_minRequestAge =
stmt->columnUint64(nameToIdx["MIN_RETRIEVE_REQUEST_AGE"]);
......
......@@ -102,9 +102,16 @@ public:
virtual void modifyUserMountGroup(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &group, const std::string &mountGroup);
virtual void modifyUserComment(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const std::string &group, const std::string &comment);
virtual void createMountGroup(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t archivePriority, const uint64_t minArchiveFilesQueued,
const uint64_t minArchiveBytesQueued, const uint64_t minArchiveRequestAge, const uint64_t retrievePriority, const uint64_t minRetrieveFilesQueued,
const uint64_t minRetrieveBytesQueued, const uint64_t minRetrieveRequestAge, const uint64_t maxDrivesAllowed, const std::string &comment);
virtual void createMountGroup(
const cta::common::dataStructures::SecurityIdentity &cliIdentity,
const std::string &name,
const uint64_t archivePriority,
const uint64_t minArchiveRequestAge,
const uint64_t retrievePriority,
const uint64_t minRetrieveRequestAge,
const uint64_t maxDrivesAllowed,
const std::string &comment);
virtual void deleteMountGroup(const std::string &name);
virtual std::list<cta::common::dataStructures::MountGroup> getMountGroups() const;
virtual void modifyMountGroupArchivePriority(const cta::common::dataStructures::SecurityIdentity &cliIdentity, const std::string &name, const uint64_t archivePriority);
......
......@@ -651,26 +651,18 @@ TEST_F(cta_catalogue_SqliteCatalogueTest, createMountGroup) {
const std::string name = "mount_group";
const uint64_t archivePriority = 1;
const uint64_t minArchiveFilesQueued = 2;
const uint64_t minArchiveBytesQueued = 3;
const uint64_t minArchiveRequestAge = 4;
const uint64_t retrievePriority = 5;
const uint64_t minRetrieveFilesQueued = 6;
const uint64_t minRetrieveBytesQueued = 7;
const uint64_t minRetrieveRequestAge = 8;
const uint64_t maxDrivesAllowed = 9;
const uint64_t minArchiveRequestAge = 2;
const uint64_t retrievePriority = 3;
const uint64_t minRetrieveRequestAge = 4;
const uint64_t maxDrivesAllowed = 5;
const std::string &comment = "create mount group";
catalogue.createMountGroup(
m_cliSI,
name,
archivePriority,
minArchiveFilesQueued,
minArchiveBytesQueued,
minArchiveRequestAge,
retrievePriority,
minRetrieveFilesQueued,
minRetrieveBytesQueued,
minRetrieveRequestAge,
maxDrivesAllowed,
comment);
......@@ -685,13 +677,9 @@ TEST_F(cta_catalogue_SqliteCatalogueTest, createMountGroup) {
ASSERT_EQ(name, group.name);
ASSERT_EQ(archivePriority, group.archive_priority);
ASSERT_EQ(minArchiveFilesQueued, group.archive_minFilesQueued);
ASSERT_EQ(minArchiveBytesQueued, group.archive_minBytesQueued);
ASSERT_EQ(minArchiveRequestAge, group.archive_minRequestAge);
ASSERT_EQ(retrievePriority, group.retrieve_priority);
ASSERT_EQ(minRetrieveFilesQueued, group.retrieve_minFilesQueued);
ASSERT_EQ(minRetrieveBytesQueued, group.retrieve_minBytesQueued);
ASSERT_EQ(minRetrieveRequestAge, group.retrieve_minRequestAge);
ASSERT_EQ(maxDrivesAllowed, group.maxDrivesAllowed);
......@@ -717,12 +705,8 @@ TEST_F(cta_catalogue_SqliteCatalogueTest, createMountGroup_same_twice) {
const std::string name = "mount_group";
const uint64_t archivePriority = 1;
const uint64_t minArchiveFilesQueued = 2;
const uint64_t minArchiveBytesQueued = 3;
const uint64_t minArchiveRequestAge = 4;
const uint64_t retrievePriority = 5;
const uint64_t minRetrieveFilesQueued = 6;
const uint64_t minRetrieveBytesQueued = 7;
const uint64_t minRetrieveRequestAge = 8;
const uint64_t maxDrivesAllowed = 9;
const std::string &comment = "create mount group";
......@@ -731,12 +715,8 @@ TEST_F(cta_catalogue_SqliteCatalogueTest, createMountGroup_same_twice) {
m_cliSI,
name,
archivePriority,
minArchiveFilesQueued,
minArchiveBytesQueued,
minArchiveRequestAge,
retrievePriority,
minRetrieveFilesQueued,
minRetrieveBytesQueued,
minRetrieveRequestAge,
maxDrivesAllowed,
comment);
......@@ -745,12 +725,8 @@ TEST_F(cta_catalogue_SqliteCatalogueTest, createMountGroup_same_twice) {
m_cliSI,
name,
archivePriority,
minArchiveFilesQueued,
minArchiveBytesQueued,
minArchiveRequestAge,
retrievePriority,
minRetrieveFilesQueued,
minRetrieveBytesQueued,
minRetrieveRequestAge,
maxDrivesAllowed,
comment), exception::Exception);
......@@ -765,12 +741,8 @@ TEST_F(cta_catalogue_SqliteCatalogueTest, createUser) {
const std::string mountGroupName = "mount_group";
const uint64_t archivePriority = 1;
const uint64_t minArchiveFilesQueued = 2;
const uint64_t minArchiveBytesQueued = 3;
const uint64_t minArchiveRequestAge = 4;
const uint64_t retrievePriority = 5;
const uint64_t minRetrieveFilesQueued = 6;
const uint64_t minRetrieveBytesQueued = 7;
const uint64_t minRetrieveRequestAge = 8;
const uint64_t maxDrivesAllowed = 9;
......@@ -778,12 +750,8 @@ TEST_F(cta_catalogue_SqliteCatalogueTest, createUser) {
m_cliSI,
mountGroupName,
archivePriority,
minArchiveFilesQueued,
minArchiveBytesQueued,
minArchiveRequestAge,
retrievePriority,
minRetrieveFilesQueued,
minRetrieveBytesQueued,
minRetrieveRequestAge,
maxDrivesAllowed,
"create mount group");
......@@ -811,8 +779,6 @@ TEST_F(cta_catalogue_SqliteCatalogueTest, createUser) {
catalogue.getArchiveMountPolicy(userName);
ASSERT_EQ(archivePriority, archivePolicy.priority);
ASSERT_EQ(minArchiveFilesQueued, archivePolicy.minFilesQueued);
ASSERT_EQ(minArchiveBytesQueued, archivePolicy.minBytesQueued);
ASSERT_EQ(minArchiveRequestAge, archivePolicy.minRequestAge);
ASSERT_EQ(maxDrivesAllowed, archivePolicy.maxDrives);
......@@ -820,8 +786,6 @@ TEST_F(cta_catalogue_SqliteCatalogueTest, createUser) {
catalogue.getRetrieveMountPolicy(userName);
ASSERT_EQ(retrievePriority, retrievePolicy.priority);
ASSERT_EQ(minRetrieveFilesQueued, retrievePolicy.minFilesQueued);
ASSERT_EQ(minRetrieveBytesQueued, retrievePolicy.minBytesQueued);
ASSERT_EQ(minRetrieveRequestAge, retrievePolicy.minRequestAge);
ASSERT_EQ(maxDrivesAllowed, retrievePolicy.maxDrives);
}
......@@ -835,12 +799,8 @@ TEST_F(cta_catalogue_SqliteCatalogueTest, createUser_same_twice) {
const std::string mountGroupName = "mount_group";
const uint64_t archivePriority = 1;
const uint64_t minArchiveFilesQueued = 2;
const uint64_t minArchiveBytesQueued = 3;
const uint64_t minArchiveRequestAge = 4;
const uint64_t retrievePriority = 5;
const uint64_t minRetrieveFilesQueued = 6;
const uint64_t minRetrieveBytesQueued = 7;
const uint64_t minRetrieveRequestAge = 8;
const uint64_t maxDrivesAllowed = 9;
......@@ -848,12 +808,8 @@ TEST_F(cta_catalogue_SqliteCatalogueTest, createUser_same_twice) {
m_cliSI,
mountGroupName,
archivePriority,
minArchiveFilesQueued,
minArchiveBytesQueued,
minArchiveRequestAge,
retrievePriority,
minRetrieveFilesQueued,
minRetrieveBytesQueued,
minRetrieveRequestAge,
maxDrivesAllowed,
"create mount group");
......@@ -965,12 +921,8 @@ TEST_F(cta_catalogue_SqliteCatalogueTest, prepareForNewFile) {
m_cliSI,
mountGroupName,
archivePriority,
minArchiveFilesQueued,
minArchiveBytesQueued,
minArchiveRequestAge,
retrievePriority,
minRetrieveFilesQueued,
minRetrieveBytesQueued,
minRetrieveRequestAge,
maxDrivesAllowed,
"create mount group");
......
......@@ -47,7 +47,7 @@
#include "castor/tape/tapeserver/daemon/ProcessForkerUtils.hpp"
#include "castor/utils/SmartArrayPtr.hpp"
#include "castor/utils/utils.hpp"
#include "catalogue/DummyCatalogue.hpp"
#include "catalogue/SqliteCatalogue.hpp"
#include "objectstore/BackendVFS.hpp"
#include "objectstore/BackendFactory.hpp"
#include "objectstore/RootEntry.hpp"
......@@ -569,7 +569,7 @@ castor::tape::tapeserver::daemon::Session::EndOfSessionAction
} catch (std::bad_cast &){}
cta::objectstore::BackendPopulator backendPopulator(*backend);
cta::OStoreDBWithAgent osdb(*backend, backendPopulator.getAgent());
cta::catalogue::DummyCatalogue catalogue;
cta::catalogue::SqliteCatalogue catalogue;
cta::Scheduler scheduler(catalogue, osdb);
castor::tape::System::realWrapper sysWrapper;
......
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