diff --git a/xroot_plugins/CMakeLists.txt b/xroot_plugins/CMakeLists.txt index d5c00b3d4c886c2dd4cd6b7610d2d5892aebc1ad..029f25cb3e484e4504d1eb917525389e0e607591 100644 --- a/xroot_plugins/CMakeLists.txt +++ b/xroot_plugins/CMakeLists.txt @@ -40,7 +40,7 @@ add_subdirectory(messages) add_definitions(-DXRDSSI_DEBUG) include_directories(../xroot_ssi_pb) -add_library(XrdSsiCta MODULE XrdSsiCtaServiceProvider.cpp XrdSsiCtaRequestProc.cpp) +add_library(XrdSsiCta MODULE XrdSsiCtaServiceProvider.cpp XrdSsiCtaRequestProc.cpp XrdSsiCtaEos.cpp) target_link_libraries(XrdSsiCta XrdSsi-4 XrdSsiLib XrdCtaMessages ctascheduler ctacommon ctaobjectstore ctacatalogue) set_target_properties(XrdSsiCta PROPERTIES INSTALL_RPATH ${PROTOBUF3_RPATH}) diff --git a/xroot_plugins/XrdSsiCtaEos.cpp b/xroot_plugins/XrdSsiCtaEos.cpp new file mode 100644 index 0000000000000000000000000000000000000000..df9e7715170ebcb79d84694fba4384f2d20d1e45 --- /dev/null +++ b/xroot_plugins/XrdSsiCtaEos.cpp @@ -0,0 +1,185 @@ +/*! + * @project The CERN Tape Archive (CTA) + * @brief XRootD EOS Notification handler + * @copyright Copyright 2017 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 "XrdSsiPbException.hpp" +using XrdSsiPb::PbException; + +#include "xroot_plugins/messages/cta_frontend.pb.h" +#include "XrdSsiCtaEos.hpp" + + +#if 0 +#include "common/dataStructures/ArchiveRequest.hpp" +#include "common/exception/Exception.hpp" + +#ifdef XRDSSI_DEBUG +#include "XrdSsiPbDebug.hpp" +#endif +#include "XrdSsiPbResource.hpp" +#include "XrdSsiPbRequestProc.hpp" +#include "xroot_plugins/messages/cta_frontend.pb.h" + +#include "XrdSsiCtaServiceProvider.hpp" +#endif + + + +namespace cta { namespace frontend { + +void EosNotificationRequest::process(const cta::eos::Notification ¬ification, cta::xrd::Response &response) +{ + switch(notification.wf().event()) + { + using namespace cta::eos; + + case Workflow::CLOSEW: requestProcCLOSEW (notification, response); break; + case Workflow::PREPARE: requestProcPREPARE(notification, response); break; + case Workflow::DELETE: requestProcDELETE (notification, response); break; + + default: + throw PbException("Workflow Event type " + std::to_string(notification.wf().event()) + " is not supported."); + } +} + + + + +void EosNotificationRequest::requestProcCLOSEW(const cta::eos::Notification ¬ification, cta::xrd::Response &response) +{ + // Unpack message + + cta::common::dataStructures::UserIdentity originator; + originator.name = notification.cli().user().username(); + originator.group = notification.cli().user().groupname(); + + cta::common::dataStructures::DiskFileInfo diskFileInfo; + diskFileInfo.owner = notification.file().owner().username(); + diskFileInfo.group = notification.file().owner().groupname(); + diskFileInfo.path = notification.file().lpath(); + + cta::common::dataStructures::ArchiveRequest request; + request.checksumType = notification.file().cks().name(); + request.checksumValue = notification.file().cks().value(); + request.diskFileInfo = diskFileInfo; + request.diskFileID = notification.file().fid(); + request.fileSize = notification.file().size(); + request.requester = originator; + request.srcURL = notification.wf().instance().url(); + request.storageClass = notification.file().xattr().at("CTA_StorageClass"); + request.archiveReportURL = "null:"; + + // Queue the request + + uint64_t archiveFileId = m_scheduler.queueArchive(m_instance_name, request, m_lc); + + // Set archiveFileId in response (deprecated) + + std::string result_str = "<eos::wfe::path::fxattr:sys.archiveFileId>" + std::to_string(archiveFileId); +#ifdef XRDSSI_DEBUG + std::cerr << result_str << std::endl; +#endif + response.set_message_txt(result_str); + + // Set response type + + response.set_type(cta::xrd::Response::RSP_SUCCESS); +} + + + +void EosNotificationRequest::requestProcPREPARE(const cta::eos::Notification ¬ification, cta::xrd::Response &response) +{ + // Unpack message + + cta::common::dataStructures::UserIdentity originator; + originator.name = notification.cli().user().username(); + originator.group = notification.cli().user().groupname(); + + cta::common::dataStructures::DiskFileInfo diskFileInfo; + diskFileInfo.owner = notification.file().owner().username(); + diskFileInfo.group = notification.file().owner().groupname(); + diskFileInfo.path = notification.file().lpath(); + + cta::common::dataStructures::RetrieveRequest request; + request.requester = originator; + request.dstURL = notification.transport().url(); + request.diskFileInfo = diskFileInfo; + + // CTA Archive ID is an EOS extended attribute, i.e. it is stored as a string, which + // must be converted to a valid uint64_t + + std::string archiveFileIdStr = notification.file().xattr().at("CTA_ArchiveFileId"); + if((request.archiveFileID = strtoul(archiveFileIdStr.c_str(), nullptr, 10)) == 0) + { + throw PbException("Invalid archiveFileID " + archiveFileIdStr); + } + + // Queue the request + + m_scheduler.queueRetrieve(m_instance_name, request, m_lc); + + // Set response type + + response.set_type(cta::xrd::Response::RSP_SUCCESS); +} + + + +void EosNotificationRequest::requestProcDELETE(const cta::eos::Notification ¬ification, cta::xrd::Response &response) +{ + // Unpack message + + cta::common::dataStructures::UserIdentity originator; + originator.name = notification.cli().user().username(); + originator.group = notification.cli().user().groupname(); + + cta::common::dataStructures::DiskFileInfo diskFileInfo; + diskFileInfo.owner = notification.file().owner().username(); + diskFileInfo.group = notification.file().owner().groupname(); + diskFileInfo.path = notification.file().lpath(); + + cta::common::dataStructures::DeleteArchiveRequest request; + request.requester = originator; + + // CTA Archive ID is an EOS extended attribute, i.e. it is stored as a string, which + // must be converted to a valid uint64_t + + std::string archiveFileIdStr = notification.file().xattr().at("CTA_ArchiveFileId"); + if((request.archiveFileID = strtoul(archiveFileIdStr.c_str(), nullptr, 10)) == 0) + { + throw PbException("Invalid archiveFileID " + archiveFileIdStr); + } + + // Queue the request + + cta::utils::Timer t; + m_scheduler.deleteArchive(m_instance_name, request, m_lc); + + // Create a log entry + + cta::log::ScopedParamContainer params(m_lc); + params.add("fileId", request.archiveFileID).add("catalogueTime", t.secs()); + m_lc.log(cta::log::INFO, "In requestProcDELETE(): deleted archive file."); + + // Set response type + + response.set_type(cta::xrd::Response::RSP_SUCCESS); +} + +}} // namespace cta::frontend + diff --git a/xroot_plugins/XrdSsiCtaEos.hpp b/xroot_plugins/XrdSsiCtaEos.hpp new file mode 100644 index 0000000000000000000000000000000000000000..31fb07ac5d07933ad745a7113c7e18668236a8e8 --- /dev/null +++ b/xroot_plugins/XrdSsiCtaEos.hpp @@ -0,0 +1,78 @@ +/*! + * @project The CERN Tape Archive (CTA) + * @brief XRootD EOS Notification handler + * @copyright Copyright 2017 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 <XrdSsi/XrdSsiEntity.hh> + +#include "XrdSsiCtaServiceProvider.hpp" + +namespace cta { namespace frontend { + +/*! + * EOS Notification handler class + */ +class EosNotificationRequest +{ +public: + EosNotificationRequest(const XrdSsiEntity &client, const XrdSsiCtaServiceProvider *service) : + m_scheduler(service->getScheduler()), + m_lc(service->getLogContext()), + m_instance_name(client.name) {} + + /*! + * Process the Notification request + * + * @param[in] notification Notification request message from EOS WFE + * @param[out] response Response message to return to EOS + */ + void process(const cta::eos::Notification ¬ification, cta::xrd::Response &response); + +private: + /*! + * Process the CLOSEW workflow event + * + * @param[in] notification Notification request message from EOS WFE + * @param[out] response Response message to return to EOS + */ + void requestProcCLOSEW(const cta::eos::Notification ¬ification, cta::xrd::Response &response); + + /*! + * Process the PREPARE workflow event + * + * @param[in] notification Notification request message from EOS WFE + * @param[out] response Response message to return to EOS + */ + void requestProcPREPARE(const cta::eos::Notification ¬ification, cta::xrd::Response &response); + + /*! + * Process the DELETE workflow event + * + * @param[in] notification Notification request message from EOS WFE + * @param[out] response Response message to return to EOS + */ + void requestProcDELETE(const cta::eos::Notification ¬ification, cta::xrd::Response &response); + + // Member variables + + cta::Scheduler &m_scheduler; //< Reference to CTA Scheduler + cta::log::LogContext m_lc; //< CTA Log Context + const char * const m_instance_name; //< Instance name = XRootD client name +}; + +}} // namespace cta::frontend diff --git a/xroot_plugins/XrdSsiCtaRequestProc.cpp b/xroot_plugins/XrdSsiCtaRequestProc.cpp index 944c0f2278005ad139c52736ea9f3f7a1bda0e7b..61ef4447efa57f63d8af672dc0a673a6f1f27b08 100644 --- a/xroot_plugins/XrdSsiCtaRequestProc.cpp +++ b/xroot_plugins/XrdSsiCtaRequestProc.cpp @@ -28,165 +28,12 @@ #include "xroot_plugins/messages/cta_frontend.pb.h" #include "XrdSsiCtaServiceProvider.hpp" +#include "XrdSsiCtaEos.hpp" namespace XrdSsiPb { -/*! - * Process the CLOSEW workflow event - * - * @param[in,out] scheduler CTA Scheduler to queue this request - * @param[in,out] lc CTA Log Context for this request - * @param[in] client XRootD Client Entity, taken from authentication key for the request - * @param[in] request Request message from EOS - * @param[out] response Response message to return to EOS - */ -static void requestProcCLOSEW(cta::Scheduler &scheduler, cta::log::LogContext &lc, XrdSsiEntity &client, - const cta::eos::Notification ¬ification, cta::xrd::Response &response) -{ - // Unpack message - - cta::common::dataStructures::UserIdentity originator; - originator.name = notification.cli().user().username(); - originator.group = notification.cli().user().groupname(); - - cta::common::dataStructures::DiskFileInfo diskFileInfo; - diskFileInfo.owner = notification.file().owner().username(); - diskFileInfo.group = notification.file().owner().groupname(); - diskFileInfo.path = notification.file().lpath(); - - cta::common::dataStructures::ArchiveRequest request; - request.checksumType = notification.file().cks().name(); - request.checksumValue = notification.file().cks().value(); - request.diskFileInfo = diskFileInfo; - request.diskFileID = notification.file().fid(); - request.fileSize = notification.file().size(); - request.requester = originator; - request.srcURL = notification.wf().instance().url(); - request.storageClass = notification.file().xattr().at("CTA_StorageClass"); - request.archiveReportURL = "null:"; - - // Queue the request - - uint64_t archiveFileId = scheduler.queueArchive(client.name, request, lc); - - // Set archiveFileId in response (deprecated) - - std::string result_str = "<eos::wfe::path::fxattr:sys.archiveFileId>" + std::to_string(archiveFileId); -#ifdef XRDSSI_DEBUG - std::cerr << result_str << std::endl; -#endif - response.set_message_txt(result_str); - - // Set response type - - response.set_type(cta::xrd::Response::RSP_SUCCESS); -} - - - -/*! - * Process the PREPARE workflow event. - * - * @param[in,out] scheduler CTA Scheduler to queue this request - * @param[in,out] lc Log Context for this request - * @param[in] client XRootD Client Entity, taken from authentication key for the request - * @param[in] notification EOS WFE Notification message - * @param[out] response Response message to return to EOS - */ -static void requestProcPREPARE(cta::Scheduler &scheduler, cta::log::LogContext &lc, XrdSsiEntity &client, - const cta::eos::Notification ¬ification, cta::xrd::Response &response) -{ - // Unpack message - - cta::common::dataStructures::UserIdentity originator; - originator.name = notification.cli().user().username(); - originator.group = notification.cli().user().groupname(); - - cta::common::dataStructures::DiskFileInfo diskFileInfo; - diskFileInfo.owner = notification.file().owner().username(); - diskFileInfo.group = notification.file().owner().groupname(); - diskFileInfo.path = notification.file().lpath(); - - cta::common::dataStructures::RetrieveRequest request; - request.requester = originator; - request.dstURL = notification.transport().url(); - request.diskFileInfo = diskFileInfo; - - // CTA Archive ID is an EOS extended attribute, i.e. it is stored as a string, which - // must be converted to a valid uint64_t - - std::string archiveFileIdStr = notification.file().xattr().at("CTA_ArchiveFileId"); - if((request.archiveFileID = strtoul(archiveFileIdStr.c_str(), nullptr, 10)) == 0) - { - throw PbException("Invalid archiveFileID " + archiveFileIdStr); - } - - // Queue the request - - scheduler.queueRetrieve(client.name, request, lc); - - // Set response type - - response.set_type(cta::xrd::Response::RSP_SUCCESS); -} - - - -/*! - * Process the DELETE workflow event. - * - * @param[in,out] scheduler CTA Scheduler to queue this request - * @param[in,out] lc Log Context for this request - * @param[in] client XRootD Client Entity, taken from authentication key for the request - * @param[in] notification EOS WFE Notification message - * @param[out] response Response message to return to EOS - */ -static void requestProcDELETE(cta::Scheduler &scheduler, cta::log::LogContext &lc, XrdSsiEntity &client, - const cta::eos::Notification ¬ification, cta::xrd::Response &response) -{ - // Unpack message - - cta::common::dataStructures::UserIdentity originator; - originator.name = notification.cli().user().username(); - originator.group = notification.cli().user().groupname(); - - cta::common::dataStructures::DiskFileInfo diskFileInfo; - diskFileInfo.owner = notification.file().owner().username(); - diskFileInfo.group = notification.file().owner().groupname(); - diskFileInfo.path = notification.file().lpath(); - - cta::common::dataStructures::DeleteArchiveRequest request; - request.requester = originator; - - // CTA Archive ID is an EOS extended attribute, i.e. it is stored as a string, which - // must be converted to a valid uint64_t - - std::string archiveFileIdStr = notification.file().xattr().at("CTA_ArchiveFileId"); - if((request.archiveFileID = strtoul(archiveFileIdStr.c_str(), nullptr, 10)) == 0) - { - throw PbException("Invalid archiveFileID " + archiveFileIdStr); - } - - // Queue the request - - cta::utils::Timer t; - scheduler.deleteArchive(client.name, request, lc); - - // Create a log entry - - cta::log::ScopedParamContainer params(lc); - params.add("fileId", request.archiveFileID).add("catalogueTime", t.secs()); - lc.log(cta::log::INFO, "In requestProcDELETE(): deleted archive file."); - - // Set response type - - response.set_type(cta::xrd::Response::RSP_SUCCESS); -} - - - /*! * Convert a framework exception into a Response */ @@ -211,7 +58,7 @@ void RequestProc<cta::xrd::Request, cta::xrd::Response, cta::xrd::Alert>::Execut XrdSsiCtaServiceProvider *cta_service_ptr; - if(!(cta_service_ptr = dynamic_cast<XrdSsiCtaServiceProvider *>(XrdSsiProviderServer))) + if(!(cta_service_ptr = dynamic_cast<XrdSsiCtaServiceProvider*>(XrdSsiProviderServer))) { throw cta::exception::Exception("XRootD Service is not a CTA Service"); } @@ -221,36 +68,12 @@ void RequestProc<cta::xrd::Request, cta::xrd::Response, cta::xrd::Alert>::Execut OutputJsonString(std::cerr, &m_request); #endif - // Get XRootD client entity - - auto client = getClient(m_resource); - - // Get CTA Scheduler and Log Context - - auto scheduler = cta_service_ptr->getScheduler(); - auto lc = cta_service_ptr->getLogContext(); + // Process EOS Request - // Determine the message type - - const cta::eos::Notification ¬ification = m_request.notification(); - - switch(notification.wf().event()) - { - using namespace cta::eos; - - case Workflow::CLOSEW: - requestProcCLOSEW(scheduler, lc, client, notification, m_metadata); break; - - case Workflow::PREPARE: - requestProcPREPARE(scheduler, lc, client, notification, m_metadata); break; - - case Workflow::DELETE: - requestProcDELETE(scheduler, lc, client, notification, m_metadata); break; - - default: - throw PbException("Workflow Event type " + std::to_string(notification.wf().event()) + " is not supported."); - } + //const cta::eos::Notification ¬ification = m_request.notification(); + cta::frontend::EosNotificationRequest eos_rq(getClient(m_resource), cta_service_ptr); + eos_rq.process(m_request.notification(), m_metadata); } catch(std::exception &ex) { diff --git a/xroot_plugins/XrdSsiCtaServiceProvider.hpp b/xroot_plugins/XrdSsiCtaServiceProvider.hpp index fc8e06c14904223a120d195c37a6053f580e6da3..acefca4edeea70cc536d62be9a86944456718b72 100644 --- a/xroot_plugins/XrdSsiCtaServiceProvider.hpp +++ b/xroot_plugins/XrdSsiCtaServiceProvider.hpp @@ -16,8 +16,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __XRD_SSI_CTA_SERVICE_PROVIDER_H -#define __XRD_SSI_CTA_SERVICE_PROVIDER_H +#pragma once + +#ifdef XRDSSI_DEBUG +#include <iostream> +#endif #include <XrdSsi/XrdSsiProvider.hh> @@ -79,12 +82,12 @@ public: /*! * Get a reference to the Scheduler for this Service */ - cta::Scheduler &getScheduler() { return *m_scheduler; } + cta::Scheduler &getScheduler() const { return *m_scheduler; } /*! * Get the log context for this Service */ - cta::log::LogContext getLogContext() { return cta::log::LogContext(*m_log); } + cta::log::LogContext getLogContext() const { return cta::log::LogContext(*m_log); } private: /*! @@ -106,9 +109,7 @@ private: typedef std::unique_ptr<cta::objectstore::AgentHeartbeatThread, AgentHeartbeatThreadDeleter> UniquePtrAgentHeartbeatThread; - /* - * Member variables - */ + // Member variables cta::common::Configuration m_ctaConf; //!< CTA configuration @@ -121,4 +122,3 @@ private: UniquePtrAgentHeartbeatThread m_agentHeartbeat; //!< Agent heartbeat thread }; -#endif diff --git a/xroot_ssi_pb/XrdSsiPbAlert.hpp b/xroot_ssi_pb/XrdSsiPbAlert.hpp index b4b06ff651649ce741404cf536118b7ba768b39f..dbdaecc84be62260058887229c01e2ef8457cff8 100644 --- a/xroot_ssi_pb/XrdSsiPbAlert.hpp +++ b/xroot_ssi_pb/XrdSsiPbAlert.hpp @@ -16,8 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __XRD_SSI_PB_ALERT_H -#define __XRD_SSI_PB_ALERT_H +#pragma once #include <XrdSsi/XrdSsiRespInfo.hh> #include "XrdSsiPbException.hpp" @@ -81,4 +80,3 @@ private: } // namespace XrdSsiPb -#endif diff --git a/xroot_ssi_pb/XrdSsiPbDebug.hpp b/xroot_ssi_pb/XrdSsiPbDebug.hpp index 900a0d4311078a142003c30bc5bdb06e0c07dca6..f95590d6cdcfedd25a7faf011afe08606d7a8530 100644 --- a/xroot_ssi_pb/XrdSsiPbDebug.hpp +++ b/xroot_ssi_pb/XrdSsiPbDebug.hpp @@ -16,8 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __XRD_SSI_PB_DEBUG -#define __XRD_SSI_PB_DEBUG +#pragma once #include <iostream> #include <stdio.h> @@ -61,4 +60,3 @@ inline void DumpBuffer(const std::string &buffer) } // namespace XrdSsiPb -#endif diff --git a/xroot_ssi_pb/XrdSsiPbException.hpp b/xroot_ssi_pb/XrdSsiPbException.hpp index 999319c0b79651c93f6aa6a0138c97d87e3537d1..91f978d00e802e2cb5ffb5f60d286b1f84182418 100644 --- a/xroot_ssi_pb/XrdSsiPbException.hpp +++ b/xroot_ssi_pb/XrdSsiPbException.hpp @@ -16,8 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __XRD_SSI_PB_EXCEPTION_H -#define __XRD_SSI_PB_EXCEPTION_H +#pragma once #include <stdexcept> #include <XrdSsi/XrdSsiErrInfo.hh> @@ -51,4 +50,3 @@ public: } // namespace XrdSsiPb -#endif diff --git a/xroot_ssi_pb/XrdSsiPbRequest.hpp b/xroot_ssi_pb/XrdSsiPbRequest.hpp index 77b5de9d8cc8846715691c94da957cb8a972e54f..2ade279c3e5f0b90a414e8b78fdd52cd5b7db8a4 100644 --- a/xroot_ssi_pb/XrdSsiPbRequest.hpp +++ b/xroot_ssi_pb/XrdSsiPbRequest.hpp @@ -16,8 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __XRD_SSI_PB_REQUEST_H -#define __XRD_SSI_PB_REQUEST_H +#pragma once #include <future> #include <XrdSsi/XrdSsiRequest.hh> @@ -352,4 +351,3 @@ void Request<RequestType, MetadataType, AlertType>::Alert(XrdSsiRespInfoMsg &ale } // namespace XrdSsiPb -#endif diff --git a/xroot_ssi_pb/XrdSsiPbRequestProc.hpp b/xroot_ssi_pb/XrdSsiPbRequestProc.hpp index 14ad0c7bf45d9ff3d1f738cbd5ddc38da8d13a98..a7b55c54c76e2eeed646a970b490cb9254a75f71 100644 --- a/xroot_ssi_pb/XrdSsiPbRequestProc.hpp +++ b/xroot_ssi_pb/XrdSsiPbRequestProc.hpp @@ -16,8 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __XRD_SSI_PB_REQUEST_PROC_H -#define __XRD_SSI_PB_REQUEST_PROC_H +#pragma once #include <future> @@ -242,4 +241,3 @@ void RequestProc<RequestType, MetadataType, AlertType>::Finished(XrdSsiRequest & } // namespace XrdSsiPb -#endif diff --git a/xroot_ssi_pb/XrdSsiPbResource.hpp b/xroot_ssi_pb/XrdSsiPbResource.hpp index e73043c8c21f87aea2c842a9c103f2f6913b2204..3317a82f012ace1ade0eb175295b1ea609dc0c39 100644 --- a/xroot_ssi_pb/XrdSsiPbResource.hpp +++ b/xroot_ssi_pb/XrdSsiPbResource.hpp @@ -16,8 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __XRD_SSI_PB_RESOURCE_H -#define __XRD_SSI_PB_RESOURCE_H +#pragma once #include <XrdSsi/XrdSsiResource.hh> #include <XrdSsi/XrdSsiEntity.hh> @@ -79,4 +78,3 @@ static const XrdSsiEntity &getClient(const XrdSsiResource &resource) } // namespace XrdSsiPb -#endif diff --git a/xroot_ssi_pb/XrdSsiPbService.hpp b/xroot_ssi_pb/XrdSsiPbService.hpp index 17f1ca04cf2352eaefa0583d4f8e88cf1179724c..5c292c32fee4e7ebe83071b45d679f5aecf857c9 100644 --- a/xroot_ssi_pb/XrdSsiPbService.hpp +++ b/xroot_ssi_pb/XrdSsiPbService.hpp @@ -16,8 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __XRD_SSI_PB_SERVICE_H -#define __XRD_SSI_PB_SERVICE_H +#pragma once #include <XrdSsi/XrdSsiService.hh> #include "XrdSsiPbRequestProc.hpp" @@ -129,4 +128,3 @@ void Service<RequestType, MetadataType, AlertType>::ProcessRequest(XrdSsiRequest } // namespace XrdSsiPb -#endif diff --git a/xroot_ssi_pb/XrdSsiPbServiceClientSide.hpp b/xroot_ssi_pb/XrdSsiPbServiceClientSide.hpp index 70e0175507f68b42a4a623a3f84841182cc8a179..a45d305efa3affc206e63eef8b894f97038182b4 100644 --- a/xroot_ssi_pb/XrdSsiPbServiceClientSide.hpp +++ b/xroot_ssi_pb/XrdSsiPbServiceClientSide.hpp @@ -16,8 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __XRD_SSI_PB_SERVICE_CLIENT_SIDE_H -#define __XRD_SSI_PB_SERVICE_CLIENT_SIDE_H +#pragma once #include <XrdSsi/XrdSsiProvider.hh> #include <XrdSsi/XrdSsiService.hh> @@ -174,4 +173,3 @@ MetadataType ServiceClientSide<RequestType, MetadataType, AlertType>::Send(const } // namespace XrdSsiPb -#endif