EXPOSE 8074
WORKDIR /opt/adml
+#ENV TZ=Europe/Madrid
+
ENTRYPOINT ["sh", "/var/starter.sh"]
CMD []
if(my_app.getOperatedHost()->logEnabled()) {
anna::diameter::comm::Server *usedServer = my_app.getOperatedEntity()->getLastUsedResource();
anna::diameter::comm::ClientSession *usedClientSession = usedServer ? usedServer->getLastUsedResource() : NULL;
- std::string detail = usedClientSession ? usedClientSession->asString() : "<null client session>"; // shouldn't happen
+ std::string detail = usedClientSession ? usedClientSession->asString() : "[null client session]"; // shouldn't happen
my_app.getOperatedHost()->writeLogFile(codecMsg, (success ? "sent2e" : "send2eError"), detail);
}
// Detailed log:
if(my_app.getOperatedHost()->logEnabled()) {
anna::diameter::comm::ServerSession *usedServerSession = my_app.getOperatedServer()->getLastUsedResource();
- std::string detail = usedServerSession ? usedServerSession->asString() : "<null server session>"; // shouldn't happen
+ std::string detail = usedServerSession ? usedServerSession->asString() : "[null server session]"; // shouldn't happen
my_app.getOperatedHost()->writeLogFile(codecMsg, (success ? "sent2c" : "send2cError"), detail);
}
if (amount > -2) {
testManager.setInProgressLimit(amount);
response = "New in-progress limit: ";
- response += (amount != -1) ? anna::functions::asString(amount) : "<no limit>";
+ response += (amount != -1) ? anna::functions::asString(amount) : "[no limit]";
}
else {
response = "In-progress limit amount: ";
int limit = testManager.getInProgressLimit();
- response += (limit != -1) ? anna::functions::asString(limit) : "<no limit>";
+ response += (limit != -1) ? anna::functions::asString(limit) : "[no limit]";
response += "; currently there are ";
response += anna::functions::asString(testManager.getInProgressCount());
response += " test cases running";
if(getOperatedHost()->logEnabled()) {
anna::diameter::comm::Server *usedServer = getOperatedEntity()->getLastUsedResource();
anna::diameter::comm::ClientSession *usedClientSession = usedServer ? usedServer->getLastUsedResource() : NULL;
- std::string detail = usedClientSession ? usedClientSession->asString() : "<null client session>"; // shouldn't happen
+ std::string detail = usedClientSession ? usedClientSession->asString() : "[null client session]"; // shouldn't happen
getOperatedHost()->writeLogFile(codecMsg, (success ? "sent2e" : "send2eError"), detail);
}
} else if((opType == "sendxml2c") || (opType == "sendhex2c")) {
// Detailed log:
if(getOperatedHost()->logEnabled()) {
anna::diameter::comm::ServerSession *usedServerSession = getOperatedServer()->getLastUsedResource();
- std::string detail = usedServerSession ? usedServerSession->asString() : "<null server session>"; // shouldn't happen
+ std::string detail = usedServerSession ? usedServerSession->asString() : "[null server session]"; // shouldn't happen
getOperatedHost()->writeLogFile(codecMsg, (success ? "sent2c" : "send2cError"), detail);
}
} else if(opType == "answerxml2e") {
limit = atoi(param2.c_str());
testManager.setInProgressLimit(limit);
opt_response = "new in-progress limit: ";
- opt_response += (limit != UINT_MAX) ? anna::functions::asString(limit) : "<no limit>";
+ opt_response += (limit != UINT_MAX) ? anna::functions::asString(limit) : "[no limit]";
}
else {
opt_response = "in-progress limit amount: ";
limit = testManager.getInProgressLimit();
- opt_response += (limit != UINT_MAX) ? anna::functions::asString(limit) : "<no limit>";
+ opt_response += (limit != UINT_MAX) ? anna::functions::asString(limit) : "[no limit]";
opt_response += "; currently there are ";
opt_response += anna::functions::asString(testManager.getInProgressCount());
opt_response += " test cases running";
// Detailed log:
if(my_node->logEnabled()) {
anna::diameter::comm::ServerSession *usedServerSession = localServer->getLastUsedResource();
- std::string detail = usedServerSession ? usedServerSession->asString() : "<null server session>"; // esto no deberia ocurrir
+ std::string detail = usedServerSession ? usedServerSession->asString() : "[null server session]"; // esto no deberia ocurrir
my_node->writeLogFile(message, (success ? "fwd2c" : "fwd2cError"), detail);
}
} catch(anna::RuntimeException &ex) {
// Detailed log:
anna::diameter::comm::ServerSession *usedServerSession = my_node->getCommEngine()->findServerSession(request->getRequestServerSessionKey());
- std::string detail = usedServerSession ? usedServerSession->asString() : "<null server session>"; // esto no deberia ocurrir
+ std::string detail = usedServerSession ? usedServerSession->asString() : "[null server session]"; // esto no deberia ocurrir
if(my_node->logEnabled()) {
my_node->writeLogFile(*message, (success ? "fwd2c" : "fwd2cError"), detail);
if(my_node->logEnabled()) {
anna::diameter::comm::Server *usedServer = entity->getLastUsedResource();
anna::diameter::comm::ClientSession *usedClientSession = usedServer ? usedServer->getLastUsedResource() : NULL;
- std::string detail = usedClientSession ? usedClientSession->asString() : "<null client session>"; // esto no deberia ocurrir
+ std::string detail = usedClientSession ? usedClientSession->asString() : "[null client session]"; // esto no deberia ocurrir
my_node->writeLogFile(message, (success ? "fwd2e" : "fwd2eError"), detail); // forwarded
}
anna::diameter::comm::ClientSession *usedClientSession = my_node->getCommEngine()->findClientSession(request->getRequestClientSessionKey());
std::string detail;
- if(my_node->logEnabled()) detail = usedClientSession ? usedClientSession->asString() : "<null client session>"; // this should not happen
+ if(my_node->logEnabled()) detail = usedClientSession ? usedClientSession->asString() : "[null client session]"; // this should not happen
anna::diameter::comm::Message *msg;
try {
bool apply() const throw() {
// http://stackoverflow.com/questions/5873029/questions-about-putenv-and-setenv
if(unsetTZ()) {
- unsetenv("TZ");
- }
- else {
- setenv("TZ", a_value.c_str(), 1 /* overwrite */);
+ unsetenv("TZ");
+ }
+ else {
+ setenv("TZ", a_value.c_str(), 1 /* overwrite */);
/*
// If TZ has an invalid setting, tzset() uses GMT0:
if (!success) std::cerr << "Invalid TZ '" << a_value << "'. Probably GMT0 is going to be used instead !" << std::endl;
return success;
*/
- }
+ }
return true;
}
std::string asString() const throw() {
std::string result = getValue();
- if (unsetTZ()) return "<TZ unset>";
- if (result == "") return "<TZ empty>";
+ if (unsetTZ()) return "[TZ unset]";
+ if (result == "") return "[TZ empty]";
return result;
}
};
if(a_device != NULL)
a_device->asAttribute(result);
else
- result->createAttribute("Device", "<null>");
+ result->createAttribute("Device", "[null]");
result->createAttribute("Port", a_port);
return result;
//throw() {
// static const char* text [] = { "Undefined", "Bind", "ApplicationMessage" };
// string result("ClassCode: ");
-// return result += (v >= Min && v < Max) ? text [v] : "<null>";
+// return result += (v >= Min && v < Max) ? text [v] : "[null]";
//}
string anna::diameter::comm::ClassCode::asText(const ClassCode::_v v)
throw() {
static const char* text [] = { "Undefined", "Bind", "ApplicationMessage" };
- return string((v >= Min && v < Max) ? text [v] : "<null>");
+ return string((v >= Min && v < Max) ? text [v] : "[null]");
}
std::string originHost = a_engine->getOriginHostName();
result += "Parent Engine Origin-Realm: ";
- result += (originRealm != "") ? originRealm:"<not configured>";
+ result += (originRealm != "") ? originRealm:"[not configured]";
result += " | Parent Engine Origin-Host: ";
- result += (originHost != "") ? originHost:"<not configured>";
+ result += (originHost != "") ? originHost:"[not configured]";
result += " | Category: ";
result += anna::functions::asString(a_category);
if(logEnabled()) {
anna::diameter::comm::Server *usedServer = a_entity->getLastUsedResource();
anna::diameter::comm::ClientSession *usedClientSession = usedServer ? usedServer->getLastUsedResource() : NULL;
- std::string detail = usedClientSession ? usedClientSession->asString() : "<null client session>"; // esto no deberia ocurrir
+ std::string detail = usedClientSession ? usedClientSession->asString() : "[null client session]"; // esto no deberia ocurrir
writeLogFile(msg->getBody(), (result ? "sent2e" : "send2eError"), detail); // el del nodo de trabajo
}
result += "\nFixMode: ";
result += asText(a_fixMode);
result += "\nActivated Dictionary: ";
- result += a_dictionary ? (a_dictionary->getName()) : "<null>";
+ result += a_dictionary ? (a_dictionary->getName()) : "[null]";
return result;
}
result->createAttribute("PoolCycle", a_poolCycle);
a_statSummary.asXML(result);
if (a_inProgressLimit == UINT_MAX)
- result->createAttribute("InProgressLimit", "<no limit>");
+ result->createAttribute("InProgressLimit", "[no limit]");
else
result->createAttribute("InProgressLimit", a_inProgressLimit);
result->createAttribute("DumpInitializedReports", (a_dumpInitializedReports ? "yes":"no"));
// Message
if (TestManager::instantiate().getDumpHex()) {
if (a_message.isEmpty()) {
- msg = "<empty>";
+ msg = "[empty]";
}
else {
msg = "\n"; msg += a_message.asString(); msg += "\n";
xmlmsg += "\n";
}
else {
- xmlmsg = "<unable to decode, check traces>";
+ xmlmsg = "[unable to decode, check traces]";
}
if (msg != "") result->createAttribute("Message", msg);
// Detailed log:
if(a_originHost->logEnabled()) {
if (decodeMessage(true /* trust */)) {
- std::string detail = usedClientSession ? usedClientSession->asString() : "<null client session>"; // shouldn't happen
+ std::string detail = usedClientSession ? usedClientSession->asString() : "[null client session]"; // shouldn't happen
a_originHost->writeLogFile(*a_messageCodec, (success ? "sent2e" : "send2eError"), detail);
}
}
// Detailed log:
if(a_originHost->logEnabled()) {
if (decodeMessage(true /* trust */)) {
- std::string detail = usedServerSession ? usedServerSession->asString() : "<null server session>"; // shouldn't happen
+ std::string detail = usedServerSession ? usedServerSession->asString() : "[null server session]"; // shouldn't happen
a_originHost->writeLogFile(*a_messageCodec, (success ? "sent2c" : "send2cError"), detail);
}
}
// Message
if (TestManager::instantiate().getDumpHex()) {
if (a_message.isEmpty()) {
- msg = "<empty>";
+ msg = "[empty]";
}
else {
msg = "\n"; msg += a_message.asString(); msg += "\n";
}
if (a_message.isEmpty()) {
- xmlmsg = "<empty>";
+ xmlmsg = "[empty]";
}
else {
if (decodeMessage()) {
xmlmsg += "\n";
}
else {
- xmlmsg = "<unable to decode, check traces>";
+ xmlmsg = "[unable to decode, check traces]";
}
}
anna::xml::Node* result = TestStep::asXML(parent);
//parent->createChild("TestStepCmd");
- result->createAttribute("Script", (a_script != "") ? a_script:"<no script>");
+ result->createAttribute("Script", (a_script != "") ? a_script:"[no script]");
if (a_errorMsg != "") result->createAttribute("ErrorMessage", a_errorMsg);
if (a_threadRunning) {
if (a_childPid != -1)
anna::xml::Node* TestStepIpLimit::asXML(anna::xml::Node* parent)
throw() {
anna::xml::Node* result = TestStep::asXML(parent);
- std::string limit = (a_ipLimit != UINT_MAX) ? anna::functions::asString(a_ipLimit) : "<no limit>";
+ std::string limit = (a_ipLimit != UINT_MAX) ? anna::functions::asString(a_ipLimit) : "[no limit]";
result->createAttribute("IpLimit", limit);
return result;
void TestStepIpLimit::do_complete() throw() {
if (TestManager::instantiate().getDumpStdout()) {
- std::string limit = (a_ipLimit != UINT_MAX) ? anna::functions::asString(a_ipLimit) : "<no limit>";
+ std::string limit = (a_ipLimit != UINT_MAX) ? anna::functions::asString(a_ipLimit) : "[no limit]";
std::cout << "Executed IpLimit Test Step (value = " << limit << ")" << std::endl;
}
}