Skip to content

Commit

Permalink
Revert "Removed the no longer used XRootdSSiRmcd sub-directory"
Browse files Browse the repository at this point in the history
This reverts commit 20c4f60.
  • Loading branch information
murrayc3 committed Mar 23, 2020
1 parent 20c4f60 commit 23c9077
Show file tree
Hide file tree
Showing 31 changed files with 3,374 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ ELSE(DEFINED PackageOnly)
add_subdirectory(rdbms)
add_subdirectory(scheduler)
add_subdirectory(tapeserver)
add_subdirectory(XRootdSSiRmcd)

add_subdirectory(statistics)

Expand Down
69 changes: 69 additions & 0 deletions XRootdSSiRmcd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# XRootD SSI/Protocol Buffer Interface Project
# Copyright 2018 CERN
#
# 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/>.

cmake_minimum_required (VERSION 2.6)

find_package(xrootdclient REQUIRED)
find_package(xrootd REQUIRED)
find_package(Protobuf3 REQUIRED)

add_subdirectory(protobuf)

#
# XRootD SSI
#
include_directories(${XROOTD_INCLUDE_DIR} ${XROOTD_INCLUDE_DIR}/private)

#
# XRootD SSI Protocol Buffer bindings
#
include_directories(${CMAKE_SOURCE_DIR}/)

include_directories (${CMAKE_SOURCE_DIR}/xrootd-ssi-protobuf-interface/include)

#
# Compiled protocol buffers
#
include_directories(${CMAKE_BINARY_DIR}/XRootdSSiRmcd ${PROTOBUF3_INCLUDE_DIRS})

#
# Test Client
#
add_executable(cta-xsmc RmcdClient.cpp)
target_link_libraries(cta-xsmc XrdSsi-4 XrdSsiLib XrdSsiPbRmcd XrdUtils)
set_property(TARGET cta-xsmc APPEND PROPERTY INSTALL_RPATH ${PROTOBUF3_RPATH})
#install (TARGETS cta-xsmc DESTINATION /usr/bin)
#install (FILES cta-xsmc-mount.1cta DESTINATION /usr/share/man/man1)
#install (FILES cta-xsmc-dismount.1cta DESTINATION /usr/share/man/man1)

#
# XRootD SSI plugin for Test Server
#
add_library(XrdSsiRmcd MODULE
RmcdServiceProvider.cpp
RmcdRequestProc.cpp
rmc_send_scsi_cmd.cpp
serrno.cpp
rmc_smcsubr.cpp
)
target_link_libraries(XrdSsiRmcd XrdSsi-4 XrdSsiLib XrdSsiPbRmcd XrdUtils)
set_property(TARGET XrdSsiRmcd APPEND PROPERTY INSTALL_RPATH ${PROTOBUF3_RPATH})
#install(TARGETS XrdSsiRmcd DESTINATION usr/${CMAKE_INSTALL_LIBDIR})

#install (FILES cta-xrmcd.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/cta)
#install (FILES cta-xrmcd.logrotate DESTINATION /etc/logrotate.d RENAME cta-xrmcd)
#install (FILES cta-xrmcd.sysconfig DESTINATION /etc/sysconfig RENAME cta-xrmcd)
#install (FILES cta-xrmcd.service DESTINATION /etc/systemd/system)
71 changes: 71 additions & 0 deletions XRootdSSiRmcd/Castor_limits.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* Castor_limits.h,v 1.27 2004/02/12 15:38:08 obarring Exp
*/

/*
* Copyright (C) 1999-2003 by CERN/IT/PDP/DM
* All rights reserved
*/

/*
* @(#)Castor_limits.h,v 1.27 2004/02/12 15:38:08 CERN IT-PDP/DM Jean-Philippe Baud
*/

#pragma once

/* all maximum lengths defined below do not include the trailing null */

#define CA_MAXACLENTRIES 300 /* maximum number of ACL entries for a file/dir */
#define CA_MAXCLASNAMELEN 15 /* maximum length for a fileclass name */
#define CA_MAXCOMMENTLEN 255 /* maximum length for user comments in metadata */
#define CA_MAXDENLEN 8 /* maximum length for a alphanumeric density */
#define CA_MAXDGNLEN 6 /* maximum length for a device group name */
#define CA_MAXDVNLEN 63 /* maximum length for a device name */
#define CA_MAXDVTLEN 8 /* maximum length for a device type */
#define CA_MAXFIDLEN 17 /* maximum length for a fid (DSN) */
#define CA_MAXFSEQLEN 14 /* maximum length for a fseq string */
#define CA_MAXGRPNAMELEN 2 /* maximum length for a group name */
#define CA_MAXGUIDLEN 36 /* maximum length for a guid */
#define CA_MAXHOSTNAMELEN 63 /* maximum length for a hostname */
#define CA_MAXSVCCLASSNAMELEN 63 /* maximum length for a svc class name */
#define CA_MAXLBLTYPLEN 3 /* maximum length for a label type */
#define CA_MAXLINELEN 1023 /* maximum length for a line in a log */
#define CA_MAXMANUFLEN 12 /* maximum length for a cartridge manufacturer */
#define CA_MAXMIGPNAMELEN 15 /* maximum length for a migration policy name */
#define CA_MAXMIGRNAMELEN 15 /* maximum length for a migrator name */
#define CA_MAXMLLEN 1 /* maximum length for a cartridge media_letter */
#define CA_MAXMODELLEN 6 /* maximum length for a cartridge model */
#define CA_MAXNAMELEN 255 /* maximum length for a pathname component */
#define CA_MAXNBDRIVES 4 /* maximum number of tape drives per server */
#define CA_MAXPATHLEN 1023 /* maximum length for a pathname */
#define CA_MAXPOOLNAMELEN 15 /* maximum length for a pool name */
#define CA_MAXPROTOLEN 7 /* maximum length for a protocol name */
#define CA_MAXRBTNAMELEN 17 /* maximum length for a robot name */
#define CA_MAXRECFMLEN 3 /* maximum length for a record format */
#define CA_MAXREGEXPLEN 63 /* Maximum length for a regular expression */
#define CA_MAXCSECNAMELEN 512 /* Maximum length for a Csec authorization id */
#define CA_MAXCSECPROTOLEN 20 /* Maximum length for a Csec mechanism */
#define CA_MAXSFNLEN 1103 /* maximum length for a replica */
#define CA_MAXSHORTHOSTLEN 10 /* maximum length for a hostname without domain */
#define CA_MAXSNLEN 24 /* maximum length for a cartridge serial nb */
#define CA_MAXSTGRIDLEN 77 /* maximum length for a stager full request id */
/* must be >= nb digits in CA_MAXSTGREQID +
CA_MAXHOSTNAMELEN + 8 */
#define CA_MAXSTGREQID 999999 /* maximum value for a stager request id */
#define CA_MAXSYMLINKS 5 /* maximum number of symbolic links */
#define CA_MAXTAGLEN 255 /* maximum length for a volume tag */
#define CA_MAXTAPELIBLEN 8 /* maximum length for a tape library name */
#define CA_MAXUNMLEN 8 /* maximum length for a drive name */
#define CA_MAXUSRNAMELEN 14 /* maximum length for a login name */
#define CA_MAXVIDLEN 6 /* maximum length for a VID */
#define CA_MAXVSNLEN 6 /* maximum length for a VSN */
#define CA_MAXCKSUMNAMELEN 15 /* maximum length for a checksum algorithm name */
#define CA_MAXCKSUMLEN 32 /* maximum length for a checksum value in an asci form */
#define CA_MAXDMPROTNAMELEN 15 /* maximum length for Disk Mover protocol name */
#define CA_MAXJOBIDLEN 36 /* Maximum length for the representation of the Cuuid */
#define CA_MAXUSERTAGLEN 63 /* Maximum length for a user tag (stage request) */
#define CA_MAXRFSLINELEN 2047 /* maximum length for the requested filesystem string */

/* Max allowed uid/gif */
#define CA_MAXUID 0x7FFFFFFF /* Maximum uid */
#define CA_MAXGID 0x7FFFFFFF /* Maximum gid */
41 changes: 41 additions & 0 deletions XRootdSSiRmcd/RmcdApi.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*!
* @project XRootD SSI/Protocol Buffer Interface Project
* @brief XRootD SSI/Google Protocol Buffer bindings for the rmc_test client/server
* @copyright Copyright 2018 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 "XrdSsiPbServiceClientSide.hpp" //!< XRootD SSI/Protocol Buffer Service, client-side bindings
#include "protobuf/rmc_test.pb.h" //!< Auto-generated message types from .proto file

/*!
* Bind the type of the XrdSsiService to the types defined in the .proto file
*/
typedef XrdSsiPb::ServiceClientSide<rmc_test::Request, //!< XrdSSi Request message type
rmc_test::Response, //!< XrdSsi Metadata message type
rmc_test::Data, //!< XrdSsi Data message type
rmc_test::Alert> //!< XrdSsi Alert message type
XrdSsiPbServiceType;

/*!
* Bind the type of the XrdSsiRequest to the types defined in the .proto file
*/
typedef XrdSsiPb::Request<rmc_test::Request, //!< XrdSSi Request message type
rmc_test::Response, //!< XrdSsi Metadata message type
rmc_test::Data, //!< XrdSsi Data message type
rmc_test::Alert> //!< XrdSsi Alert message type
XrdSsiPbRequestType;

Loading

0 comments on commit 23c9077

Please sign in to comment.