Commit 19f57f3b by Jozsef Makai

MGM,FST: using constants for encoding attributes from MGM to FST

parent a69cfd38
......@@ -35,5 +35,7 @@ static constexpr auto ARCHIVE_ERROR_ATTR_NAME = "sys.archive.error";
static constexpr auto RETRIEVE_WRITTEN_WORKFLOW_NAME = "retrieve_written";
static constexpr auto RETRIEVE_FAILED_WORKFLOW_NAME = "retrieve_failed";
static constexpr auto ARCHIVE_FAILED_WORKFLOW_NAME = "archive_failed";
static constexpr auto WF_CUSTOM_ATTRIBUTES_TO_FST_EQUALS = "=";
static constexpr auto WF_CUSTOM_ATTRIBUTES_TO_FST_SEPARATOR = ";;;";
EOSCOMMONNAMESPACE_END
\ No newline at end of file
......@@ -22,6 +22,7 @@
************************************************************************/
#define __STDC_FORMAT_MACROS
#include <cinttypes>
#include "common/Constants.hh"
#include "common/Path.hh"
#include "common/http/OwnCloud.hh"
#include "common/StringTokenizer.hh"
......@@ -1920,7 +1921,9 @@ XrdFstOfsFile::close()
std::string decodedAttributes;
eos::common::SymKey::Base64Decode(eventAttributes.c_str(), decodedAttributes);
std::map<std::string, std::string> attributes;
eos::common::StringConversion::GetKeyValueMap(decodedAttributes.c_str(), attributes, "=", ";;;", nullptr);
eos::common::StringConversion::GetKeyValueMap(decodedAttributes.c_str(), attributes,
eos::common::WF_CUSTOM_ATTRIBUTES_TO_FST_EQUALS,
eos::common::WF_CUSTOM_ATTRIBUTES_TO_FST_SEPARATOR, nullptr);
rc = gOFS.CallSynchronousClosew(fMd->mProtoFmd, eventOwner, eventOwnerGroup, eventRequestor, eventRequestorGroup,
eventInstance, capOpaque->Get("mgm.path"), attributes);
......
......@@ -131,8 +131,8 @@ Workflow::getCGICloseW(std::string workflow, const eos::common::Mapping::Virtual
std::ostringstream attrStream;
std::string separator;
for (const auto& attribute : WFE::CollectAttributes(fullPath)) {
attrStream << separator << attribute.first << "=" << attribute.second;
separator = ";;;";
attrStream << separator << attribute.first << eos::common::WF_CUSTOM_ATTRIBUTES_TO_FST_EQUALS << attribute.second;
separator = eos::common::WF_CUSTOM_ATTRIBUTES_TO_FST_SEPARATOR;
}
auto attrStr = attrStream.str();
......
Markdown is supported
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