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

Merge branch 'master' of https://git.cern.ch/kerberos/CTA

parents db1382b9 754425c5
......@@ -2,7 +2,6 @@ cmake_minimum_required (VERSION 2.6)
set (CLIENT_LIB_SRC_FILES
ArchiveJob.cpp
ClientAPI.cpp
DirectoryEntry.cpp
DirectoryIterator.cpp
Exception.cpp
......@@ -12,10 +11,11 @@ set (CLIENT_LIB_SRC_FILES
FileSystemStorageClass.cpp
FileSystemStorageClasses.cpp
LogicalLibrary.cpp
MiddleTierAdmin.cpp
MigrationRoute.cpp
MigrationRouteId.cpp
MigrationRoutes.cpp
MockClientAPI.cpp
MockMiddleTierAdmin.cpp
SecurityIdentity.cpp
StorageClass.cpp
TapePool.cpp
......
#include "ClientAPI.hpp"
#include "MiddleTierAdmin.hpp"
//------------------------------------------------------------------------------
// destructor
//------------------------------------------------------------------------------
cta::ClientAPI::~ClientAPI() throw() {
cta::MiddleTierAdmin::~MiddleTierAdmin() throw() {
}
......@@ -16,16 +16,15 @@
namespace cta {
/**
* Abstract class that specifies the client API of the CERN Tape Archive
* project.
* Abstract class that defines the administration API of the the middle-tier.
*/
class ClientAPI {
class MiddleTierAdmin {
public:
/**
* Destructor.
*/
virtual ~ClientAPI() throw() = 0;
virtual ~MiddleTierAdmin() throw() = 0;
/**
* Creates the specified administrator.
......@@ -344,6 +343,6 @@ public:
const SecurityIdentity &requester,
const std::string &tapePoolName) = 0;
}; // class ClientAPI
}; // class MiddleTierAdmin
} // namespace cta
This diff is collapsed.
#pragma once
#include "ClientAPI.hpp"
#include "FileSystemNode.hpp"
#include "FileSystemStorageClasses.hpp"
#include "MiddleTierAdmin.hpp"
#include "MigrationRoutes.hpp"
#include "StorageClass.hpp"
......@@ -11,9 +11,9 @@
namespace cta {
/**
* A mock entry point to the client ClientAPI of the CERN Tape Archive project.
* A mock administration API for the CERN Tape Archive project.
*/
class MockClientAPI: public ClientAPI {
class MockMiddleTierAdmin: public MiddleTierAdmin {
public:
/**
......@@ -22,12 +22,12 @@ public:
* Creates the root directory "/" owned by user root and with no file
* attributes or permissions.
*/
MockClientAPI();
MockMiddleTierAdmin();
/**
* Destructor.
*/
~MockClientAPI() throw();
~MockMiddleTierAdmin() throw();
/**
* Creates the specified administrator.
......@@ -577,6 +577,6 @@ protected:
const SecurityIdentity &user,
const FileSystemNode &dstDir);
}; // class MockClientAPI
}; // class MockMiddleTierAdmin
} // namespace cta
#pragma once
#include "MockClientAPI.hpp"
namespace cta {
/**
* Facilitates the unit testing of the MockClientAPI class.
*/
class TestingMockClientAPI: public MockClientAPI {
public:
using MockClientAPI::getEnclosingDirPath;
using MockClientAPI::splitString;
using MockClientAPI::trimSlashes;
}; // class TestingMockClientAPI
} // namespace cta
#pragma once
#include "MockMiddleTierAdmin.hpp"
namespace cta {
/**
* Facilitates the unit testing of the MockMiddleTierAdmin class.
*/
class TestingMockMiddleTierAdmin: public MockMiddleTierAdmin {
public:
using MockMiddleTierAdmin::getEnclosingDirPath;
using MockMiddleTierAdmin::splitString;
using MockMiddleTierAdmin::trimSlashes;
}; // class TestingMockMiddleTierAdmin
} // namespace cta
......@@ -58,7 +58,6 @@ XrdSfsXferSize XrdProFile::read(XrdSfsFileOffset offset, char *buffer, XrdSfsXfe
return m_data.length()-offset;
}
else {
buffer = NULL;
return 0;
}
}
......
......@@ -1176,7 +1176,7 @@ void XrdProFilesystem::EnvInfo(XrdOucEnv *envP)
// constructor
//------------------------------------------------------------------------------
XrdProFilesystem::XrdProFilesystem() {
m_clientAPI = new cta::MockClientAPI();
m_clientAPI = new cta::MockMiddleTierAdmin();
}
//------------------------------------------------------------------------------
......
#pragma once
#include "libs/client/MockClientAPI.hpp"
#include "libs/client/MockMiddleTierAdmin.hpp"
#include "XrdSfs/XrdSfsInterface.hh"
#include "ParsedRequest.hpp"
......@@ -34,7 +34,7 @@ protected:
/**
* Pointer to the client API object
*/
cta::ClientAPI *m_clientAPI;
cta::MiddleTierAdmin *m_clientAPI;
/**
* Parses the query into the request structure
......
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