diff --git a/scheduler/Scheduler.cpp b/scheduler/Scheduler.cpp index 1c0a3326b5c96d50b4c8560d1778466e04fe5b1b..f91fce351ee017dd67e32df28e5a64c52fbf3aa0 100644 --- a/scheduler/Scheduler.cpp +++ b/scheduler/Scheduler.cpp @@ -876,7 +876,8 @@ void Scheduler::reportDriveConfig(const cta::tape::daemon::TpconfigLine& tpConfi //------------------------------------------------------------------------------ // reportDriveStatus //------------------------------------------------------------------------------ -void Scheduler::reportDriveStatus(const common::dataStructures::DriveInfo& driveInfo, common::dataStructures::MountType type, common::dataStructures::DriveStatus status, log::LogContext & lc) { +void Scheduler::reportDriveStatus(const common::dataStructures::DriveInfo& driveInfo, + common::dataStructures::MountType type, common::dataStructures::DriveStatus status, log::LogContext & lc) { // TODO: mount type should be transmitted too. utils::Timer t; m_tapeDrivesState->reportDriveStatus(driveInfo, type, status, time(NULL), lc); @@ -899,32 +900,6 @@ void Scheduler::createTapeDriveStatus(const common::dataStructures::DriveInfo& d lc.log(log::DEBUG, "In Scheduler::createTapeDriveStatus(): success."); } -void Scheduler::updateTapeDriveStatus(const common::dataStructures::DriveInfo& driveInfo, - const common::dataStructures::DesiredDriveState & desiredState, const common::dataStructures::MountType& type, - const common::dataStructures::DriveStatus& status, const tape::daemon::TpconfigLine& tpConfigLine, - const common::dataStructures::SecurityIdentity& identity, log::LogContext & lc) { - auto tapeDriveStatus = m_catalogue.getTapeDrive(driveInfo.driveName).value(); - const time_t reportTime = time(NULL); - tapeDriveStatus.host = driveInfo.host; - tapeDriveStatus.logicalLibrary = driveInfo.logicalLibrary; - tapeDriveStatus.downOrUpStartTime = reportTime; - tapeDriveStatus.mountType = type; - tapeDriveStatus.driveStatus = status; - tapeDriveStatus.desiredUp = desiredState.up; - tapeDriveStatus.desiredForceDown = desiredState.forceDown; - if (desiredState.reason) tapeDriveStatus.reasonUpDown = desiredState.reason; - if (desiredState.comment) tapeDriveStatus.userComment = desiredState.comment; - tapeDriveStatus.devFileName = tpConfigLine.devFilename; - tapeDriveStatus.rawLibrarySlot = tpConfigLine.rawLibrarySlot; - tapeDriveStatus.creationLog = common::dataStructures::EntryLog(identity.username, identity.host, reportTime); - tapeDriveStatus.lastModificationLog = common::dataStructures::EntryLog(identity.username, identity.host, reportTime); - m_catalogue.modifyTapeDrive(tapeDriveStatus); - log::ScopedParamContainer spc(lc); - spc.add("drive", driveInfo.driveName); - lc.log(log::DEBUG, "In Scheduler::updateTapeDriveStatus(): success."); -} - - //------------------------------------------------------------------------------ // getPendingArchiveJobs //------------------------------------------------------------------------------ diff --git a/scheduler/Scheduler.hpp b/scheduler/Scheduler.hpp index fb854903aee673037dfb96db40aa1ab897b9503b..ebf78e1b188c112ac61879dc053ed5cf114f2893 100644 --- a/scheduler/Scheduler.hpp +++ b/scheduler/Scheduler.hpp @@ -272,19 +272,6 @@ public: const common::dataStructures::DriveStatus& status, const tape::daemon::TpconfigLine& tpConfigLine, const common::dataStructures::SecurityIdentity& identity, log::LogContext & lc); - /** - * Update the Table in the Database for an specific Tape Drive - * @param driveInfo default info of the Tape Drive - * @param desiredState the structure that contains the desired state informations - * @param type the type of the session, if any - * @param status the state of the drive. Reporting the state to down will also - * @param status The identity of the user requesting the drive to put up or down. - */ - void updateTapeDriveStatus(const common::dataStructures::DriveInfo& driveInfo, - const common::dataStructures::DesiredDriveState & desiredState, const common::dataStructures::MountType& type, - const common::dataStructures::DriveStatus& status, const tape::daemon::TpconfigLine& tpConfigLine, - const common::dataStructures::SecurityIdentity& identity, log::LogContext & lc); - /** * Reports the configuration of the drive to the objectstore. * @param driveName the name of the drive to report the config to the objectstore