&& cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/Tencent/rapidjson.git \
&& cd rapidjson && mkdir build && cd build && cmake .. && make install && ldconfig \
&& cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/oktal/pistache.git\
- && cd pistache && mkdir build && cd build && cmake .. && make install && ldconfig\
+ && cd pistache && git submodule update --init && mkdir build && cd build && cmake .. && make install && ldconfig\
&& cd /opt/e2/RIC-E2-TERMINATION/3rdparty \
&& wget --content-disposition https://github.com/cgreen-devs/cgreen/releases/download/1.2.0/cgreen_1.2.0_amd64.deb \
&& dpkg -i cgreen_1.2.0_amd64.deb \
// define the file name in the tmp directory under the volume
strcat(tmpLogFilespec,"/tmp/E2Term_%Y-%m-%d_%H-%M-%S.%N.tmpStr");
+// std::string localIP = conf.getStringValue("local-ip");
+// if (localIP.length() == 0) {
+// mdclog_write(MDCLOG_ERR, "illigal local-ip. environment variable");
+// exit(-1);
+// }
+
+ //sctpParams.myIP.assign(getenv(localIP.c_str()));
sctpParams.myIP = conf.getStringValue("local-ip");
if (sctpParams.myIP.length() == 0) {
mdclog_write(MDCLOG_ERR, "illigal local-ip.");
exit(-1);
}
+ std::string pod = conf.getStringValue("pod_name");
+ if (pod.length() == 0) {
+ mdclog_write(MDCLOG_ERR, "illigal pod_name");
+ exit(-1);
+ }
+ sctpParams.podName.assign(getenv(sctpParams.podName.c_str()));
+ if (sctpParams.podName.length() == 0) {
+ mdclog_write(MDCLOG_ERR, "illigal pod_name");
+ exit(-1);
+ }
+
tmpStr = conf.getStringValue("trace");
transform(tmpStr.begin(), tmpStr.end(), tmpStr.begin(), ::tolower);
if ((tmpStr.compare("start")) == 0) {
}
mdclog_mdc_clean();
sctpParams.ka_message_length = snprintf(sctpParams.ka_message, 4096, "{\"address\": \"%s:%d\","
- "\"fqdn\": \"%s\"}",
+ "\"fqdn\": \"%s\","
+ "\"pod_name\": \"%s\"}",
(const char *)sctpParams.myIP.c_str(),
sctpParams.rmrPort,
- sctpParams.fqdn.c_str());
+ sctpParams.fqdn.c_str(),
+ sctpParams.podName.c_str());
// Files written to the current working directory
}
case E2_TERM_KEEP_ALIVE_REQ: {
// send message back
- if (mdclog_level_get() >= MDCLOG_INFO) {
- mdclog_write(MDCLOG_INFO, "Got Keep Alive Request send : %s", rmrMessageBuffer.ka_message);
- }
rmr_bytes2payload(rmrMessageBuffer.sendMessage,
(unsigned char *)rmrMessageBuffer.ka_message,
rmrMessageBuffer.ka_message_len);
rmrMessageBuffer.sendMessage = rmr_alloc_msg(rmrMessageBuffer.rmrCtx, RECEIVE_XAPP_BUFFER_SIZE);
mdclog_write(MDCLOG_ERR, "Failed to send E2_TERM_KEEP_ALIVE_RESP");
} else if (rmrMessageBuffer.sendMessage->state != 0) {
- mdclog_write(MDCLOG_ERR, "Failed to send E2_TERM_KEEP_ALIVE_RESP");
+ mdclog_write(MDCLOG_ERR, "Failed to send E2_TERM_KEEP_ALIVE_RESP, on RMR state = %d", rmrMessageBuffer.sendMessage->state);
+ } else if (mdclog_level_get() >= MDCLOG_INFO) {
+ mdclog_write(MDCLOG_INFO, "Got Keep Alive Request send : %s", rmrMessageBuffer.ka_message);
}
+
break;
}
default: