Commit a809c2e0 authored by Eric Cano's avatar Eric Cano
Browse files

Moved all tapeserver code into castor::tape::tapeserver::daemon.

parent 86dfd2c9
......@@ -37,11 +37,11 @@
#include <stdlib.h>
#include <typeinfo>
castor::tape::server::
castor::tape::tapeserver::daemon::
ClientInterface::ClientInterface(const legacymsg::RtcpJobRqstMsgBody& clientRequest)
throw (castor::tape::Exception): m_request(clientRequest) {}
castor::tape::server::ClientInterface::UnexpectedResponse::
castor::tape::tapeserver::daemon::ClientInterface::UnexpectedResponse::
UnexpectedResponse(const castor::IObject* resp, const std::string & w):
castor::tape::Exception(w) {
std::string responseType = typeid(*resp).name();
......@@ -54,7 +54,7 @@ castor::tape::Exception(w) {
}
tapegateway::GatewayMessage *
castor::tape::server::ClientInterface::requestResponseSession(
castor::tape::tapeserver::daemon::ClientInterface::requestResponseSession(
const tapegateway::GatewayMessage &req,
RequestReport & report)
throw (castor::tape::Exception)
......@@ -98,7 +98,7 @@ throw (castor::tape::Exception)
return ret;
}
void castor::tape::server::ClientInterface::fetchVolumeId(
void castor::tape::tapeserver::daemon::ClientInterface::fetchVolumeId(
VolumeInfo & volInfo, RequestReport &report)
throw (castor::tape::Exception) {
// 1) Build the request
......@@ -140,7 +140,7 @@ throw (castor::tape::Exception) {
}
}
void castor::tape::server::ClientInterface::reportEndOfSession(
void castor::tape::tapeserver::daemon::ClientInterface::reportEndOfSession(
RequestReport &transactionReport)
throw (castor::tape::Exception) {
// 1) Build the report
......@@ -162,7 +162,7 @@ throw (castor::tape::Exception) {
}
void castor::tape::server::ClientInterface::reportEndOfSessionWithError(
void castor::tape::tapeserver::daemon::ClientInterface::reportEndOfSessionWithError(
RequestReport &transactionReport, const std::string & errorMsg,
int errorCode)
throw (castor::tape::Exception) {
......
......@@ -35,7 +35,8 @@ using namespace castor::tape;
namespace castor {
namespace tape {
namespace server {
namespace tapeserver {
namespace daemon {
/**
* A class managing the communications with the tape server's client.
* The client address will have been received from the VDQM by the main
......@@ -160,3 +161,4 @@ namespace server {
}
}
}
}
......@@ -30,7 +30,11 @@
#include "castor/tape/tapegateway/Volume.hpp"
#include "castor/tape/tapegateway/EndNotificationErrorReport.hpp"
using namespace castor::tape::server;
namespace castor {
namespace tape {
namespace tapeserver {
namespace daemon {
using namespace castor::tape;
ClientSimulator::ClientSimulator(uint32_t volReqId, const std::string & vid,
......@@ -102,3 +106,8 @@ throw () {
err.setErrorMessage(errorMessage);
sock.sendObject(err);
}
}
}
}
}
......@@ -28,7 +28,8 @@
namespace castor {
namespace tape {
namespace server {
namespace tapeserver {
namespace daemon {
/**
* A class, reusing code of TpcpCommand which simulates the tapebridge
* part of the client communication with the server. The constructor
......@@ -110,3 +111,4 @@ namespace server {
}
}
}
}
......@@ -35,14 +35,14 @@
using namespace castor::tape;
using namespace castor::log;
castor::tape::server::MountSession::MountSession(
castor::tape::tapeserver::daemon::MountSession::MountSession(
const legacymsg::RtcpJobRqstMsgBody& clientRequest,
castor::log::Logger& logger, System::virtualWrapper & sysWrapper,
const utils::TpconfigLines & tpConfig):
m_request(clientRequest), m_logger(logger), m_clientIf(clientRequest),
m_sysWrapper(sysWrapper), m_tpConfig(tpConfig) {}
void castor::tape::server::MountSession::execute()
void castor::tape::tapeserver::daemon::MountSession::execute()
throw (castor::tape::Exception) {
// 1) Prepare the logging environment
LogContext lc(m_logger);
......@@ -109,7 +109,7 @@ throw (castor::tape::Exception) {
}
}
void castor::tape::server::MountSession::executeRead(LogContext & lc) {
void castor::tape::tapeserver::daemon::MountSession::executeRead(LogContext & lc) {
// We are ready to start the session. In case of read there is no interest in
// creating the machinery before getting the tape mounted, so do it now.
// 1) Get hold of the drive and check it.
......@@ -138,10 +138,10 @@ void castor::tape::server::MountSession::executeRead(LogContext & lc) {
}
}
void castor::tape::server::MountSession::executeWrite(LogContext & lc) {
void castor::tape::tapeserver::daemon::MountSession::executeWrite(LogContext & lc) {
}
void castor::tape::server::MountSession::executeDump(LogContext & lc) {
void castor::tape::tapeserver::daemon::MountSession::executeDump(LogContext & lc) {
// We are ready to start the session. In case of read there is no interest in
// creating the machinery before getting the tape mounted, so do it now.
// 1) Get hold of the drive and check it.
......
......@@ -36,7 +36,8 @@ using namespace castor::log;
namespace castor {
namespace tape {
namespace server {
namespace tapeserver {
namespace daemon {
/**
* The main class handling a tape session. This is the main container started
* by the master process. It will drive a separate process. Only the sub
......@@ -69,3 +70,4 @@ namespace server {
}
}
}
}
......@@ -31,7 +31,7 @@
#include "../system/Wrapper.hpp"
#include "Ctape.h"
using namespace castor::tape::server;
using namespace castor::tape::tapeserver::daemon;
namespace unitTest {
......
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