Commit 8a8d8861 authored by Steven Murray's avatar Steven Murray
Browse files

Removed obsolete TCP/IP proxy factories from TapeDaemon

The different tape sessions, Cleaner, DataTransfer and Label
require TCP/IP proxies in order to request services from other
daemons such as rmcd.  Since the move of the sessions from
TapeDaemon to ProcessForker, the factories for creating those
proxies within TapeDaemon have become obsolete.
parent 706a9a92
......@@ -72,9 +72,6 @@ castor::tape::tapeserver::daemon::TapeDaemon::TapeDaemon(
const utils::DriveConfigMap &driveConfigs,
legacymsg::VdqmProxy &vdqm,
legacymsg::VmgrProxy &vmgr,
legacymsg::RmcProxyFactory &rmcFactory,
messages::TapeserverProxyFactory &tapeserverFactory,
legacymsg::NsProxyFactory &nsFactory,
reactor::ZMQReactor &reactor,
castor::server::ProcessCap &capUtils):
castor::server::Daemon(stdOut, stdErr, log),
......@@ -83,9 +80,6 @@ castor::tape::tapeserver::daemon::TapeDaemon::TapeDaemon(
m_driveConfigs(driveConfigs),
m_vdqm(vdqm),
m_vmgr(vmgr),
m_rmcFactory(rmcFactory),
m_tapeserverFactory(tapeserverFactory),
m_nsFactory(nsFactory),
m_reactor(reactor),
m_capUtils(capUtils),
m_programName("tapeserverd"),
......
......@@ -27,11 +27,8 @@
#include "castor/exception/Exception.hpp"
#include "castor/exception/InvalidConfigEntry.hpp"
#include "castor/exception/NoEntry.hpp"
#include "castor/legacymsg/NsProxyFactory.hpp"
#include "castor/legacymsg/RmcProxyFactory.hpp"
#include "castor/legacymsg/VdqmProxy.hpp"
#include "castor/legacymsg/VmgrProxy.hpp"
#include "castor/messages/TapeserverProxyFactory.hpp"
#include "castor/server/Daemon.hpp"
#include "castor/server/ProcessCap.hpp"
#include "castor/tape/reactor/ZMQReactor.hpp"
......@@ -72,8 +69,6 @@ public:
* @param driveConfig The configuration of the tape drives.
* @param vdqm Proxy object representing the vdqmd daemon.
* @param vmgr Proxy object representing the vmgrd daemon.
* @param rmcFactory Factory to create proxy objects representing the rmcd
* daemon.
* @param reactor The reactor responsible for dispatching the I/O events of
* the parent process of the tape server daemon.
* @param capUtils Object providing utilities for working UNIX capabilities.
......@@ -87,9 +82,6 @@ public:
const utils::DriveConfigMap &driveConfigs,
legacymsg::VdqmProxy &vdqm,
legacymsg::VmgrProxy &vmgr,
legacymsg::RmcProxyFactory &rmcFactory,
messages::TapeserverProxyFactory &tapeserverProxyFactory,
legacymsg::NsProxyFactory &nsProxyFactory,
reactor::ZMQReactor &reactor,
castor::server::ProcessCap &capUtils);
......@@ -541,21 +533,6 @@ protected:
*/
legacymsg::VmgrProxy &m_vmgr;
/**
* Factory to create proxy objects representing the rmcd daemon.
*/
legacymsg::RmcProxyFactory &m_rmcFactory;
/**
* The proxy object representing the tapeserver daemon.
*/
messages::TapeserverProxyFactory &m_tapeserverFactory;
/**
* The proxy object representing the nameserver daemon.
*/
legacymsg::NsProxyFactory &m_nsFactory;
/**
* The reactor responsible for dispatching the file-descriptor event-handlers
* of the tape server daemon.
......
......@@ -22,12 +22,9 @@
*****************************************************************************/
#include "castor/common/CastorConfiguration.hpp"
#include "castor/legacymsg/NsProxy_TapeAlwaysEmptyFactory.hpp"
#include "castor/legacymsg/RmcProxyTcpIpFactory.hpp"
#include "castor/legacymsg/VdqmProxyTcpIp.hpp"
#include "castor/legacymsg/VmgrProxyTcpIp.hpp"
#include "castor/log/SyslogLogger.hpp"
#include "castor/messages/TapeserverProxyZmqFactory.hpp"
#include "castor/server/ProcessCap.hpp"
#include "castor/tape/reactor/ZMQReactor.hpp"
#include "castor/tape/tapeserver/daemon/Constants.hpp"
......@@ -117,8 +114,6 @@ static int exceptionThrowingMain(const int argc, char **const argv,
const std::string vdqmHost = config.getConfEntString("VDQM", "HOST", &log);
const std::string vmgrHost = config.getConfEntString("VMGR", "HOST", &log);
const uint32_t rmcPort = config.getConfEntInt("RMC", "PORT",
(uint32_t)RMC_PORT, &log);
// Parse /etc/castor/TPCONFIG
tape::utils::TpconfigLines tpconfigLines;
......@@ -131,10 +126,6 @@ static int exceptionThrowingMain(const int argc, char **const argv,
const int netTimeout = 10; // Timeout in seconds
legacymsg::VdqmProxyTcpIp vdqm(log, vdqmHost, VDQM_PORT, netTimeout);
legacymsg::VmgrProxyTcpIp vmgr(log, vmgrHost, VMGR_PORT, netTimeout);
legacymsg::RmcProxyTcpIpFactory rmcFactory(log, rmcPort, netTimeout);
messages::TapeserverProxyZmqFactory tapeserverFactory(log,
tape::tapeserver::daemon::TAPE_SERVER_INTERNAL_LISTENING_PORT, netTimeout);
legacymsg::NsProxy_TapeAlwaysEmptyFactory nsFactory;
tape::reactor::ZMQReactor reactor(log);
......@@ -151,9 +142,6 @@ static int exceptionThrowingMain(const int argc, char **const argv,
driveConfigs,
vdqm,
vmgr,
rmcFactory,
tapeserverFactory,
nsFactory,
reactor,
capUtils);
......
......@@ -87,15 +87,11 @@ TEST_F(castor_tape_tapeserver_daemon_TapeDaemonTest, constructor) {
castor::tape::utils::DriveConfigMap driveConfigs;
castor::legacymsg::VdqmProxyDummy vdqm;
castor::legacymsg::VmgrProxyDummy vmgr;
castor::legacymsg::RmcProxyDummyFactory rmcFactory;
castor::messages::TapeserverProxyDummyFactory tpsFactory;
castor::legacymsg::NsProxyDummyFactory nsFactory;
castor::tape::reactor::ZMQReactor reactor(log);
castor::server::ProcessCapDummy capUtils;
std::auto_ptr<TapeDaemon> daemon;
ASSERT_NO_THROW(daemon.reset(new TapeDaemon(argc, argv, stdOut, stdErr, log,
driveConfigs, vdqm, vmgr, rmcFactory, tpsFactory, nsFactory,
reactor, capUtils)));
driveConfigs, vdqm, vmgr, reactor, capUtils)));
}
} // namespace unitTests
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment