Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
82c07d8a
Commit
82c07d8a
authored
Jan 11, 2018
by
Anastasia Karachaliou
Browse files
Ported ACS dev tools from CASTOR
parent
cae21178
Changes
57
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
82c07d8a
...
...
@@ -17,6 +17,7 @@ cmake_minimum_required (VERSION 2.6)
project
(
cta
)
set
(
CMAKE_C_FLAGS
"-fPIC -Wall -Wextra -Werror -Wno-unused-parameter"
)
# Please note that the -fms-extensions option should be dropped when this
...
...
@@ -112,6 +113,7 @@ ELSE(DEFINED PackageOnly)
# OCCI support is on by default
set
(
OCCI_SUPPORT ON
)
find_package
(
stk REQUIRED
)
# Switch OCCI support off if using gcc 5.1 or higher
#if (CMAKE_COMPILER_IS_GNUCC)
# if (GCC_VERSION VERSION_GREATER 5.0)
...
...
cmake/Findstk.cmake
0 → 100644
View file @
82c07d8a
# The CERN Tape Archive(CTA) project
# Copyright(C) 2015 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/>.
# This module will set the following variables:
# STK_FOUND
# STK_LIBRARIES
# STK_INCLUDE_DIR
find_library
(
STK_LIBRARIES
stk-ssi
PATHS /usr/lib64/CDK /usr/lib/CDK
NO_DEFAULT_PATH
)
find_path
(
STK_INCLUDE_DIRS
acssys.h
PATHS /usr/include/CDK
NO_DEFAULT_PATH
)
message
(
STATUS
"STK_LIBRARIES=
${
STK_LIBRARIES
}
"
)
message
(
STATUS
"STK_INCLUDE_DIRS=
${
STK_INCLUDE_DIRS
}
"
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
stk DEFAULT_MSG
STK_LIBRARIES
STK_INCLUDE_DIRS
)
common/CMakeLists.txt
View file @
82c07d8a
...
...
@@ -73,23 +73,29 @@ set (COMMON_LIB_SRC_FILES
admin/AdminUser.cpp
archiveRoutes/ArchiveRoute.cpp
checksum/Checksum.cpp
exception/Backtrace.cpp
exception/Errnum.cpp
exception/Exception.cpp
exception/NonRetryableError.cpp
exception/RetryableError.cpp
exception/UserError.cpp
exception/AcceptConnectionInterrupted.cpp
exception/AcsQueryVolumeCmd.cpp
exception/Backtrace.cpp
exception/BadAlloc.cpp
exception/CommandLineNotParsed.cpp
exception/DismountFailed.cpp
exception/Errnum.cpp
exception/Exception.cpp
exception/InvalidArgument.cpp
exception/InvalidConfigEntry.cpp
exception/Mismatch.cpp
exception/MissingOperand.cpp
exception/MountFailed.cpp
exception/NoEntry.cpp
exception/NonRetryableError.cpp
exception/NoPortInRange.cpp
exception/NotAnOwner.cpp
exception/OutOfMemory.cpp
exception/QueryVolumeFailed.cpp
exception/RequestFailed.cpp
exception/RetryableError.cpp
exception/TimeOut.cpp
exception/UserError.cpp
exception/XrootCl.cpp
log/DummyLogger.cpp
log/FileLogger.cpp
...
...
common/exception/AcsQueryVolumeCmd.cpp
0 → 100644
View file @
82c07d8a
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include
"AcsQueryVolumeCmd.hpp"
// -----------------------------------------------------------------------------
// Constructor
// -----------------------------------------------------------------------------
cta
::
exception
::
AcsQueryVolumeCmd
::
AcsQueryVolumeCmd
()
:
cta
::
exception
::
Exception
()
{
}
common/exception/AcsQueryVolumeCmd.hpp
0 → 100644
View file @
82c07d8a
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include
"Exception.hpp"
namespace
cta
{
namespace
exception
{
/**
* Failed to query volume.
*/
class
AcsQueryVolumeCmd
:
public
cta
::
exception
::
Exception
{
public:
/**
* Constructor
*/
AcsQueryVolumeCmd
();
};
// class AcsQueryVolumeCmd
}
}
// namespace castor exception
common/exception/DismountFailed.cpp
0 → 100644
View file @
82c07d8a
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include
"common/exception/DismountFailed.hpp"
// -----------------------------------------------------------------------------
// Constructor
// -----------------------------------------------------------------------------
cta
::
exception
::
DismountFailed
::
DismountFailed
()
:
cta
::
exception
::
Exception
()
{
}
common/exception/DismountFailed.hpp
0 → 100644
View file @
82c07d8a
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include
"common/exception/Exception.hpp"
namespace
cta
{
namespace
exception
{
/**
* Failed to dismount volume.
*/
class
DismountFailed
:
public
cta
::
exception
::
Exception
{
public:
/**
* Constructor
*/
DismountFailed
();
};
// class DismountFailed
}
}
// namespace cta exception
common/exception/Exception.cpp
View file @
82c07d8a
...
...
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include
"
common/exception/
Exception.hpp"
#include
"Exception.hpp"
//------------------------------------------------------------------------------
// constructor
...
...
common/exception/Exception.hpp
View file @
82c07d8a
...
...
@@ -18,7 +18,7 @@
#pragma once
#include
"
common/exception/
Backtrace.hpp"
#include
"Backtrace.hpp"
#include
<exception>
#include
<sstream>
...
...
common/exception/Mismatch.cpp
0 → 100644
View file @
82c07d8a
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include
"Mismatch.hpp"
// -----------------------------------------------------------------------------
// Constructor
// -----------------------------------------------------------------------------
cta
::
exception
::
Mismatch
::
Mismatch
()
:
cta
::
exception
::
Exception
()
{
}
common/exception/Mismatch.hpp
0 → 100644
View file @
82c07d8a
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include
"common/exception/Exception.hpp"
namespace
cta
{
namespace
exception
{
/**
* Mismatch.
*/
class
Mismatch
:
public
cta
::
exception
::
Exception
{
public:
/**
* Constructor
*/
Mismatch
();
};
// class Mismatch
}
}
// namespace cta exception
common/exception/MountFailed.cpp
0 → 100644
View file @
82c07d8a
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include
"MountFailed.hpp"
// -----------------------------------------------------------------------------
// Constructor
// -----------------------------------------------------------------------------
cta
::
exception
::
MountFailed
::
MountFailed
()
:
cta
::
exception
::
Exception
()
{
}
common/exception/MountFailed.hpp
0 → 100644
View file @
82c07d8a
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include
"common/exception/Exception.hpp"
namespace
cta
{
namespace
exception
{
/**
* Failed to mount volume.
*/
class
MountFailed
:
public
cta
::
exception
::
Exception
{
public:
/**
* Constructor
*/
MountFailed
();
};
// class MountFailed
}
}
// namespace castor exception
common/exception/QueryVolumeFailed.cpp
0 → 100644
View file @
82c07d8a
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include
"QueryVolumeFailed.hpp"
// -----------------------------------------------------------------------------
// Constructor
// -----------------------------------------------------------------------------
cta
::
exception
::
QueryVolumeFailed
::
QueryVolumeFailed
()
:
cta
::
exception
::
Exception
()
{
}
common/exception/QueryVolumeFailed.hpp
0 → 100644
View file @
82c07d8a
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include
"Exception.hpp"
namespace
cta
{
namespace
exception
{
/**
* Failed to query volume.
*/
class
QueryVolumeFailed
:
public
cta
::
exception
::
Exception
{
public:
/**
* Constructor
*/
QueryVolumeFailed
();
};
// class QueryVolumeFailed
}
}
// namespace castor exception
common/exception/RequestFailed.cpp
0 → 100644
View file @
82c07d8a
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include
"RequestFailed.hpp"
// -----------------------------------------------------------------------------
// Constructor
// -----------------------------------------------------------------------------
cta
::
exception
::
RequestFailed
::
RequestFailed
()
:
cta
::
exception
::
Exception
()
{
}
common/exception/RequestFailed.hpp
0 → 100644
View file @
82c07d8a
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include
"Exception.hpp"
namespace
cta
{
namespace
exception
{
/**
* request failed.
*/
class
RequestFailed
:
public
cta
::
exception
::
Exception
{
public:
/**
* Constructor
*/
RequestFailed
();
};
// class RequestFailed
}
}
// namespace cta exception
cta.spec.in
View file @
82c07d8a
...
...
@@ -317,5 +317,21 @@ Tools to faciliate working with rmcd and smc in cta
%attr(0644,root,root) %config(noreplace) /etc/sysconfig/cta-rmcd
%attr(0644,root,root) /etc/systemd/system/cta-rmcd.service
%package -n cta-tape-developer-acs-tools
Summary: Cern Advanced mass STORage
Group: Application/Castor
Requires: cta-lib = %{version}-%{release}
Requires: stk-ssi-lib
BuildRequires: stk-ssi-devel
%description -n cta-tape-developer-acs-tools
castor (Cern Advanced STORage system)
ASC tools for CASTOR tape developers
%files -n cta-tape-developer-acs-tools
%defattr(-,root,root)
%attr(0755,root,root) /usr/bin/cta-tape-acs-queryvolume
%attr(0755,root,root) /usr/bin/cta-tape-acs-dismount
%attr(0755,root,root) /usr/bin/cta-tape-acs-mount
%attr(0644,root,root) %doc /usr/share/man/man1/cta-tape-acs-queryvolume.1cta.gz
%attr(0644,root,root) %doc /usr/share/man/man1/cta-tape-acs-mount.1cta.gz
%attr(0644,root,root) %doc /usr/share/man/man1/cta-tape-acs-dismount.1cta.gz
%endif
mediachanger/CMakeLists.txt
View file @
82c07d8a
...
...
@@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required
(
VERSION 2.6
)
add_subdirectory
(
acs
)
add_subdirectory
(
castorrmc
)
find_package
(
openssl REQUIRED
)
find_package
(
Protobuf3 REQUIRED
)
...
...
mediachanger/acs/Acs.cpp
0 → 100644
View file @
82c07d8a
/*
* The CERN Tape Archive(CTA) project
* Copyright(C) 2015 CERN
*