diff --git a/xroot_plugins/ListArchiveFilesCmd.cpp b/xroot_plugins/ListArchiveFilesCmd.cpp index 35206a722f1bb4ef5376bda6408643e079d941bf..c8064a38f91ec2ae9ea761074e31427224460177 100644 --- a/xroot_plugins/ListArchiveFilesCmd.cpp +++ b/xroot_plugins/ListArchiveFilesCmd.cpp @@ -29,11 +29,9 @@ namespace xrootPlugins { // constructor //------------------------------------------------------------------------------ ListArchiveFilesCmd::ListArchiveFilesCmd( - log::Logger &log, XrdOucErrInfo &xrdSfsFileError, const bool displayHeader, catalogue::ArchiveFileItor archiveFileItor): - m_log(log), m_xrdSfsFileError(xrdSfsFileError), m_displayHeader(displayHeader), m_archiveFileItor(std::move(archiveFileItor)) { diff --git a/xroot_plugins/ListArchiveFilesCmd.hpp b/xroot_plugins/ListArchiveFilesCmd.hpp index 50c9d69483c2cc0ab5b206b28cd2f37e60557a91..fd5993154e0ae8927e0856d10aa6f77f073fbf6f 100644 --- a/xroot_plugins/ListArchiveFilesCmd.hpp +++ b/xroot_plugins/ListArchiveFilesCmd.hpp @@ -45,7 +45,6 @@ public: * @param archiveFileItor Iterator over the archive files in the CTA catalogue that are to be listed. */ ListArchiveFilesCmd( - log::Logger &log, XrdOucErrInfo &xrdSfsFileError, const bool displayHeader, catalogue::ArchiveFileItor archiveFileItor); @@ -57,11 +56,6 @@ public: protected: - /** - * The object representing the API of the CTA logging system. - */ - log::Logger &m_log; - /** * The error member-variable of the XrdSfsFile class. */ diff --git a/xroot_plugins/XrdCtaFile.cpp b/xroot_plugins/XrdCtaFile.cpp index c457a7d1fa39139bd1407e7acb5d886f11508fea..d0882e0d96c989527b05fe35712a9e84e5493aa8 100644 --- a/xroot_plugins/XrdCtaFile.cpp +++ b/xroot_plugins/XrdCtaFile.cpp @@ -1678,7 +1678,7 @@ std::string XrdCtaFile::xCom_archivefile() { if(!summary) { const bool displayHeader = hasOption("-h", "--header"); auto archiveFileItor = m_catalogue->getArchiveFiles(searchCriteria); - m_listArchiveFilesCmd.reset(new ListArchiveFilesCmd(m_log, error, displayHeader, std::move(archiveFileItor))); + m_listArchiveFilesCmd.reset(new ListArchiveFilesCmd(error, displayHeader, std::move(archiveFileItor))); /* std::unique_ptr<cta::catalogue::ArchiveFileItor> itor = m_catalogue->getArchiveFileItor(searchCriteria); if(itor->hasMore()) { diff --git a/xroot_plugins/XrdSsiCtaRequestMessage.cpp b/xroot_plugins/XrdSsiCtaRequestMessage.cpp index 7a611e0138e154a2aa1000474d72a4c7d2fd28b7..1fa0f75d809eadc6a026ed906aa1bf51cec099d6 100644 --- a/xroot_plugins/XrdSsiCtaRequestMessage.cpp +++ b/xroot_plugins/XrdSsiCtaRequestMessage.cpp @@ -621,10 +621,10 @@ void RequestMessage::processArchiveFile_Ls(const cta::admin::AdminCmd &admincmd, cmdlineOutput << formatResponse(responseTable); } else { auto archiveFileItor = m_catalogue.getArchiveFiles(searchCriteria); -#if 0 - // TO DO: Implement list archive files - m_listArchiveFilesCmd.reset(new xrootPlugins::ListArchiveFilesCmd(m_log, error, has_flag(OptionBoolean::SHOW_HEADER), std::move(archiveFileItor))); -#endif + + XrdOucErrInfo xrdSfsFileError; + + m_listArchiveFilesCmd.reset(new xrootPlugins::ListArchiveFilesCmd(xrdSfsFileError, has_flag(OptionBoolean::SHOW_HEADER), std::move(archiveFileItor))); } response.set_message_txt(cmdlineOutput.str()); diff --git a/xroot_plugins/XrdSsiCtaRequestMessage.hpp b/xroot_plugins/XrdSsiCtaRequestMessage.hpp index bf4473aa4e171c27c21edadf437177391e9e85f5..a658f64dc0b56518e48fd1b1bedf77fe3bc3886d 100644 --- a/xroot_plugins/XrdSsiCtaRequestMessage.hpp +++ b/xroot_plugins/XrdSsiCtaRequestMessage.hpp @@ -20,6 +20,7 @@ #include <XrdSsi/XrdSsiEntity.hh> +#include "ListArchiveFilesCmd.hpp" #include "XrdSsiCtaServiceProvider.hpp" #include "xroot_plugins/messages/cta_frontend.pb.h" @@ -247,13 +248,14 @@ private: // Member variables - cta::catalogue::Catalogue &m_catalogue; //!< Reference to CTA Catalogue - cta::Scheduler &m_scheduler; //!< Reference to CTA Scheduler - cta::log::LogContext m_lc; //!< CTA Log Context - cta::common::dataStructures::SecurityIdentity m_cliIdentity; //!< The client identity info: username and host - std::map<cta::admin::OptionBoolean::Key, bool> m_option_bool; //!< Boolean options - std::map<cta::admin::OptionUInt64::Key, uint64_t> m_option_uint64; //!< UInt64 options - std::map<cta::admin::OptionString::Key, std::string> m_option_str; //!< String options + cta::catalogue::Catalogue &m_catalogue; //!< Reference to CTA Catalogue + cta::Scheduler &m_scheduler; //!< Reference to CTA Scheduler + cta::log::LogContext m_lc; //!< CTA Log Context + cta::common::dataStructures::SecurityIdentity m_cliIdentity; //!< The client identity info: username and host + std::map<cta::admin::OptionBoolean::Key, bool> m_option_bool; //!< Boolean options + std::map<cta::admin::OptionUInt64::Key, uint64_t> m_option_uint64; //!< UInt64 options + std::map<cta::admin::OptionString::Key, std::string> m_option_str; //!< String options + std::unique_ptr<cta::xrootPlugins::ListArchiveFilesCmd> m_listArchiveFilesCmd; //!< List archive files command }; }} // namespace cta::xrd