diff --git a/xroot_plugins/GrpcEndpoint.hpp b/xroot_plugins/GrpcEndpoint.hpp index 95fd988f4e8dc002ca9192c23408f5129fdd9ec2..98b2bc64ff4e1369420c1919749f1809e0ac9ebc 100644 --- a/xroot_plugins/GrpcEndpoint.hpp +++ b/xroot_plugins/GrpcEndpoint.hpp @@ -40,11 +40,9 @@ class EndpointMap { public: EndpointMap(NamespaceMap_t nsMap) { -#if 0 for(auto &ns : nsMap) { - m_endpointMap[ns.first] = Endpoint(ns.second); + m_endpointMap.insert(std::make_pair(ns.first, Endpoint(ns.second))); } -#endif } std::string getPath(const std::string &diskInstance, const std::string &diskFileId) const { diff --git a/xroot_plugins/XrdSsiCtaRequestMessage.cpp b/xroot_plugins/XrdSsiCtaRequestMessage.cpp index 31fb41aeb58dd18b915e5f871748520ce87eca69..3de23c34853c22781ab2b7c52be0b064ac72ffaf 100644 --- a/xroot_plugins/XrdSsiCtaRequestMessage.cpp +++ b/xroot_plugins/XrdSsiCtaRequestMessage.cpp @@ -1483,8 +1483,15 @@ void RequestMessage::processTapeFile_Ls(cta::xrd::Response &response, XrdSsiStre { using namespace cta::admin; - // Create a XrdSsi stream object to return the results - stream = new TapeFileLsStream(*this, m_catalogue, m_scheduler, m_namespaceMap); + auto isLookupNamespace = getOptional(OptionBoolean::LOOKUP_NAMESPACE); + + if(isLookupNamespace && isLookupNamespace.value()) { + // Get a stream including filename lookup in the namespace + stream = new TapeFileLsStream(*this, m_catalogue, m_scheduler, m_namespaceMap); + } else { + // Get a stream without namespace lookup + stream = new TapeFileLsStream(*this, m_catalogue, m_scheduler); + } response.set_show_header(HeaderType::TAPEFILE_LS); response.set_type(cta::xrd::Response::RSP_SUCCESS); diff --git a/xroot_plugins/XrdSsiCtaServiceProvider.cpp b/xroot_plugins/XrdSsiCtaServiceProvider.cpp index 03875142baed74a011dc2a64344bcdb0bb8de26d..5b9025c60e12ba07efc86c4d15bf950c9137ff92 100644 --- a/xroot_plugins/XrdSsiCtaServiceProvider.cpp +++ b/xroot_plugins/XrdSsiCtaServiceProvider.cpp @@ -160,7 +160,7 @@ void XrdSsiCtaServiceProvider::ExceptionThrowingInit(XrdSsiLogger *logP, XrdSsiC //m_nsEndpoint = nsEndpointConf.first ? nsEndpointConf.second : ""; auto nsTokenConf = config.getOptionValueStr("cta.ns.token"); //m_nsToken = nsTokenConf.first ? nsTokenConf.second : ""; - //m_namespaceMap["endpoint"] = Namespace(nsEndpointConf.second, nsTokenConf.second); + m_namespaceMap.insert(std::make_pair("endpoint", Namespace(nsEndpointConf.second, nsTokenConf.second))); // Start the heartbeat thread for the agent object. The thread is guaranteed to have started before we call the unique_ptr deleter auto aht = new cta::objectstore::AgentHeartbeatThread(m_backendPopulator->getAgentReference(), *m_backend, *m_log);