/* * @project The CERN Tape Archive (CTA) * @copyright Copyright © 2021-2022 CERN * @license This program is free software, distributed under the terms of the GNU General Public * Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". You can * redistribute it and/or modify it under the terms of the GPL Version 3, 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. * * In applying this licence, CERN does not waive the privileges and immunities * granted to it by virtue of its status as an Intergovernmental Organization or * submit itself to any jurisdiction. */ #pragma once #include #include "catalogue/Catalogue.hpp" namespace cta::catalogue { /** * An empty implementation of the Catalogue used to populate unit tests of the scheduler database * as they need a reference to a Catalogue, used in very few situations (requeueing of retrieve * requests). */ class DummyCatalogue: public Catalogue { public: DummyCatalogue(); ~DummyCatalogue() override = default; const std::unique_ptr& Schema() override; const std::unique_ptr& AdminUser() override; const std::unique_ptr& DiskSystem() override; const std::unique_ptr& DiskInstance() override; const std::unique_ptr& DiskInstanceSpace() override; const std::unique_ptr& VO() override; const std::unique_ptr& ArchiveRoute() override; const std::unique_ptr& MediaType() override; const std::unique_ptr& StorageClass() override; const std::unique_ptr& TapePool() override; const std::unique_ptr& Tape() override; const std::unique_ptr& MountPolicy() override; const std::unique_ptr& RequesterActivityMountRule() override; const std::unique_ptr& RequesterMountRule() override; const std::unique_ptr& RequesterGroupMountRule() override; const std::unique_ptr& LogicalLibrary() override; const std::unique_ptr& PhysicalLibrary() override; const std::unique_ptr& TapeFile() override; const std::unique_ptr& FileRecycleLog() override; const std::unique_ptr& ArchiveFile() override; const std::unique_ptr& DriveConfig() override; const std::unique_ptr& DriveState() override; protected: std::unique_ptr m_schema; std::unique_ptr m_adminUser; std::unique_ptr m_diskSystem; std::unique_ptr m_diskInstance; std::unique_ptr m_diskInstanceSpace; std::unique_ptr m_vo; std::unique_ptr m_archiveRoute; std::unique_ptr m_mediaType; std::unique_ptr m_storageClass; std::unique_ptr m_tapePool; std::unique_ptr m_tape; std::unique_ptr m_mountPolicy; std::unique_ptr m_requesterActivityMountRule; std::unique_ptr m_requesterMountRule; std::unique_ptr m_requesterGroupMountRule; std::unique_ptr m_logicalLibrary; std::unique_ptr m_physicalLibrary; std::unique_ptr m_tapeFile; std::unique_ptr m_fileRecycleLog; std::unique_ptr m_driveConfig; std::unique_ptr m_archiveFile; std::unique_ptr m_driveState; }; } // namespace cta::catalogue