Skip to content
Snippets Groups Projects
Commit 01e76257 authored by Michael Davis's avatar Michael Davis
Browse files

[cta_frontend] EOS stub reads cta-cli.conf to get host/port

parent 104c596d
Branches
Tags
No related merge requests found
......@@ -40,7 +40,7 @@ find_package(Protobuf3 REQUIRED)
find_package(cryptopp REQUIRED)
include_directories(${PROTOBUF3_INCLUDE_DIRS} ${XROOTD_INCLUDE_DIR} ${XROOTD_INCLUDE_DIR}/private ../xroot_ssi_pb)
add_executable(eoscta_stub EosCtaStub.cpp)
add_executable(eoscta_stub EosCtaStub.cpp Configuration.cpp)
target_link_libraries(eoscta_stub cryptopp XrdCtaMessages XrdSsi-4 XrdSsiLib)
install(TARGETS eoscta_stub DESTINATION usr/bin)
......
......@@ -23,6 +23,7 @@
#include <cryptopp/base64.h>
#include "common/dataStructures/FrontendReturnCode.hpp"
#include "cmdline/Configuration.hpp"
#include "xroot_plugins/messages/CtaFrontendApi.hpp"
#include "XrdSsiPbDebug.hpp"
......@@ -277,9 +278,13 @@ int exceptionThrowingMain(int argc, const char *const *const argv)
XrdSsiPb::OutputJsonString(myout, &notification);
}
// Get socket address of CTA Frontend endpoint
cta::cmdline::Configuration cliConf("/etc/cta/cta-cli.conf");
std::string endpoint = cliConf.getFrontendHostAndPort();
// Obtain a Service Provider
std::string endpoint("localhost:10956");
std::string resource("/ctafrontend");
XrdSsiPbServiceType cta_service(endpoint, resource);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment