From 70eb2ead1be9069ceb5609ef238cb7e6af895f2e Mon Sep 17 00:00:00 2001
From: mvelosob <miguel.veloso.barros@cern.ch>
Date: Tue, 9 Nov 2021 08:42:54 +0100
Subject: [PATCH] Remove unused MountRequest class from Scheduler

---
 scheduler/MountRequest.cpp  | 48 ---------------------
 scheduler/MountRequest.hpp  | 84 -------------------------------------
 scheduler/SchedulerTest.cpp |  1 -
 3 files changed, 133 deletions(-)
 delete mode 100644 scheduler/MountRequest.cpp
 delete mode 100644 scheduler/MountRequest.hpp

diff --git a/scheduler/MountRequest.cpp b/scheduler/MountRequest.cpp
deleted file mode 100644
index e7ac574131..0000000000
--- a/scheduler/MountRequest.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * @project        The CERN Tape Archive (CTA)
- * @copyright      Copyright(C) 2015-2021 CERN
- * @license        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 "scheduler/MountRequest.hpp"
-
-//------------------------------------------------------------------------------
-// transferTypeToStr
-//------------------------------------------------------------------------------
-const char *cta::MountRequest::TapeJobTypeToStr(const EntryType enumValue)
-  throw() {
-  switch(enumValue) {
-  case TRANSFERTYPE_NONE     : return "NONE";
-  case TRANSFERTYPE_ARCHIVE  : return "ARCHIVE";
-  case TRANSFERTYPE_RETRIEVE : return "RETRIEVE";
-  default                    : return "UNKNOWN";
-}
-
-//------------------------------------------------------------------------------
-// constructor
-//------------------------------------------------------------------------------
-cta::MountRequest::MountRequest(): m_transferType(TRANSFERTYPE_NONE) {
-}
-
-//------------------------------------------------------------------------------
-// constructor
-//------------------------------------------------------------------------------
-cta::MountRequest::MountRequest(
-  const std::string &mountId,
-  const std::string &vid,
-  const TransferType transferType):
-  mountId(mountId),
-  vid(vid),
-  transferType(transferType) {
-}
diff --git a/scheduler/MountRequest.hpp b/scheduler/MountRequest.hpp
deleted file mode 100644
index c7b2a1eec9..0000000000
--- a/scheduler/MountRequest.hpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * @project        The CERN Tape Archive (CTA)
- * @copyright      Copyright(C) 2015-2021 CERN
- * @license        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 <string>
-
-namespace cta {
-
-/**
- * A request to mount a tape in a tape drive in order to start a data transfer
- * session.
- */
-struct MountRequest {
-
-  /**
-   * Enumeration of the possible transfer types for a tape mount, either all
-   * archives or all retrieves.
-   */
-  enum TapeJobType {
-    TAPEJOBTYPE_NONE,
-    TAPEJOBTYPE_ARCHIVE,
-    TAPEJOBTYPE_RETRIEVE
-  };
-
-  /**
-   * Thread safe method that returns the string representation of the specified
-   * enumeration value.
-   *
-   * @param enumValue The integer value of the type.
-   * @return The string representation.
-   */
-  static const char *TapeJobTypeToStr(const TapeJobType enumValue) throw();
-
-  /**
-   * Constructor.
-   */
-  MountRequest();
-
-  /**
-   * Constructor.
-   *
-   * @param mountId The identifier of the mount.
-   * @param vid The volume identifier of the tape to be mounted.
-   * @param transferType The type of transfers to be carried out, either
-   * all archives or all retrieves.
-   */
-  MountRequest(
-    const std::string &mountId,
-    const std::string &vid,
-    const TapeJobType transferType);
-
-  /**
-   * The identifier of the mount.
-   */
-  std::string mountId;
-
-  /**
-   * The volume identifier of the tape to be mounted.
-   */
-  std::string vid;
-
-  /**
-   * The type of transfers to be carried out, either archives or retrieves.
-   */
-  TapeJobType transferType;
-
-}; // class MountRequest
-
-} // namespace cta
diff --git a/scheduler/SchedulerTest.cpp b/scheduler/SchedulerTest.cpp
index b0304c614f..19c0588fab 100644
--- a/scheduler/SchedulerTest.cpp
+++ b/scheduler/SchedulerTest.cpp
@@ -37,7 +37,6 @@
 #include "objectstore/RootEntry.hpp"
 #include "scheduler/ArchiveMount.hpp"
 #include "scheduler/LogicalLibrary.hpp"
-#include "scheduler/MountRequest.hpp"
 #include "scheduler/OStoreDB/OStoreDBFactory.hpp"
 #include "scheduler/RetrieveMount.hpp"
 #include "scheduler/Scheduler.hpp"
-- 
GitLab