Skip to content
Snippets Groups Projects
Commit cfdd5c02 authored by Steven Murray's avatar Steven Murray
Browse files

Added dummy RequestMessage::processOPENW() method

parent 014341c8
No related branches found
No related tags found
No related merge requests found
......@@ -289,6 +289,9 @@ void RequestMessage::process(const cta::xrd::Request &request, cta::xrd::Respons
switch(request.notification().wf().event()) {
using namespace cta::eos;
case Workflow::OPENW:
processOPENW (request.notification(), response);
break;
case Workflow::CLOSEW:
processCLOSEW (request.notification(), response);
break;
......@@ -319,6 +322,32 @@ void RequestMessage::process(const cta::xrd::Request &request, cta::xrd::Respons
// EOS Workflow commands
void RequestMessage::processOPENW(const cta::eos::Notification &notification, cta::xrd::Response &response)
{
// Unpack message
cta::common::dataStructures::UserIdentity originator;
originator.name = notification.cli().user().username();
originator.group = notification.cli().user().groupname();
cta::utils::Timer t;
const std::string storageClass = notification.file().xattr().at("CTA_StorageClass");
// uint64_t archiveFileId = m_catalogue.checkAndGetNextArchiveFileId(m_cliIdentity.username, storageClass, originator);
// Create a log entry
cta::log::ScopedParamContainer params(m_lc);
//params.add("fileId", archiveFileId).add("catalogueTime", t.secs());
m_lc.log(cta::log::INFO, "In processOPENW(): getting new archive file ID.");
// response.mutable_xattr()->insert(google::protobuf::MapPair<std::string,std::string>("CTA_ArchiveFileId", std::to_string(archiveFileId)));
// Set response type
response.set_type(cta::xrd::Response::RSP_SUCCESS);
}
void RequestMessage::processCLOSEW(const cta::eos::Notification &notification, cta::xrd::Response &response)
{
// Unpack message
......
......@@ -63,6 +63,7 @@ private:
*/
typedef void notification_event_t(const cta::eos::Notification &notification, cta::xrd::Response &response);
notification_event_t processOPENW; //!< New archive file ID event
notification_event_t processCLOSEW; //!< Archive file event
notification_event_t processPREPARE; //!< Retrieve file event
notification_event_t processDELETE; //!< Delete file event
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment