From 2f2cc741b21502b2bd37060a1059084a54cb8b6e Mon Sep 17 00:00:00 2001 From: "Eduardo Ramos Testillano (eramedu)" Date: Mon, 27 Apr 2020 02:13:57 +0200 Subject: [PATCH] Add deployment for ADML agent with http interface Reuse ADML agent for aots-setup through symlink. Centralize stacks with stacks examples. Some modifications needed in legacy scripts to reference new dictionary names. Eval is needed in new start script in order to integrate the httpServer calculation. * Upgrade compiler to C++14 (to use std::quoted from iomanip) * Improve HTTP handler to answer a json body with result (true/false) and data (description for the operation): { "result": "true", "data": "Success" } * Fix core dump due to uninitialized 'sessionBasedModelsTypeEnum' * New 'state' operation to now the state in real time for a test id. --- CMakeLists.txt | 4 +- example/diameter/launcher/Launcher.cpp | 89 +- example/diameter/launcher/Launcher.hpp | 2 +- example/diameter/launcher/MyHandler.cpp | 26 +- example/diameter/launcher/deploy-aots-adml.sh | 116 ++ example/diameter/launcher/deploy-aots.sh | 18 +- example/diameter/launcher/deploy-setups.sh | 4 +- .../agents/ADML => aots-adml}/ACTIONS.md | 0 .../{aots/agents/ADML => aots-adml}/HINTS.md | 0 .../{aots/agents/ADML => aots-adml}/args.ft | 0 .../{aots/agents/ADML => aots-adml}/args.st | 0 .../ADML => aots-adml}/services.xml.example | 0 .../launcher/deployments/aots-adml/stacks | 1 + .../{aots/agents/ADML => aots-adml}/start.sh | 2 +- .../{aots/agents/ADML => aots-adml}/stop.sh | 0 .../{aots => aots-setup}/README.md | 0 .../deployments/aots-setup/agents/ADML | 1 + .../agents/HTTPMOCK/ACTIONS.md | 0 .../agents/HTTPMOCK/Provision.sh | 0 .../agents/KAFKA/ACTIONS.md | 0 .../agents/KAFKA/Admin.py | 0 .../agents/KAFKA/Consumer.py | 0 .../agents/KAFKA/Producer.py | 0 .../{aots => aots-setup}/launcher.py | 0 .../{aots => aots-setup}/loader.py | 0 .../tests.example/agents.yml | 0 .../ts01-general/ch01-ipv4/1.Initial.yml | 0 .../ts01-general/ch01-ipv4/2.Initial2.yml | 0 .../ts01-general/ch01-ipv4/AAA.xml | 0 .../ts01-general/ch01-ipv4/AAR.xml | 0 .../ts01-general/ch01-ipv4/AAR2.xml | 0 .../ch01-ipv4/expected.json.template | 0 .../ts01-general/ch02-ipv6/1.Initial.yml | 0 .../ts01-general/ch02-ipv6/2.Initial2.yml | 0 .../ts01-general/ch02-ipv6/3.Initial3.yml | 0 .../ts01-general/ch02-ipv6/AAA.xml | 0 .../ts01-general/ch02-ipv6/AAR-ipv6.xml | 0 .../ch01-protocolErrors/1.MissingRealm.yml | 0 .../ch01-protocolErrors/AAA-bad.xml | 0 .../ch01-protocolErrors/AAR-bad.xml | 0 .../launcher/resources/stack_examples/0.xml | 438 ------ .../resources/stack_examples/16777236.xml | 696 --------- .../resources/stack_examples/16777238.xml | 1270 ----------------- .../resources/stack_examples/16777302.xml | 553 ------- .../stack_examples}/DictionaryGx.16777238.xml | 0 .../stack_examples}/DictionaryRx.16777236.xml | 0 .../stack_examples}/DictionarySy.16777302.xml | 0 .../stack_examples}/diameter_base.0.xml | 0 include/anna/testing/TestCase.hpp | 1 + 49 files changed, 218 insertions(+), 3003 deletions(-) create mode 100755 example/diameter/launcher/deploy-aots-adml.sh rename example/diameter/launcher/deployments/{aots/agents/ADML => aots-adml}/ACTIONS.md (100%) rename example/diameter/launcher/deployments/{aots/agents/ADML => aots-adml}/HINTS.md (100%) rename example/diameter/launcher/deployments/{aots/agents/ADML => aots-adml}/args.ft (100%) rename example/diameter/launcher/deployments/{aots/agents/ADML => aots-adml}/args.st (100%) rename example/diameter/launcher/deployments/{aots/agents/ADML => aots-adml}/services.xml.example (100%) create mode 120000 example/diameter/launcher/deployments/aots-adml/stacks rename example/diameter/launcher/deployments/{aots/agents/ADML => aots-adml}/start.sh (94%) rename example/diameter/launcher/deployments/{aots/agents/ADML => aots-adml}/stop.sh (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/README.md (100%) create mode 120000 example/diameter/launcher/deployments/aots-setup/agents/ADML rename example/diameter/launcher/deployments/{aots => aots-setup}/agents/HTTPMOCK/ACTIONS.md (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/agents/HTTPMOCK/Provision.sh (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/agents/KAFKA/ACTIONS.md (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/agents/KAFKA/Admin.py (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/agents/KAFKA/Consumer.py (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/agents/KAFKA/Producer.py (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/launcher.py (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/loader.py (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/agents.yml (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/ts01-general/ch01-ipv4/1.Initial.yml (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/ts01-general/ch01-ipv4/2.Initial2.yml (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/ts01-general/ch01-ipv4/AAA.xml (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/ts01-general/ch01-ipv4/AAR.xml (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/ts01-general/ch01-ipv4/AAR2.xml (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/ts01-general/ch01-ipv4/expected.json.template (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/ts01-general/ch02-ipv6/1.Initial.yml (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/ts01-general/ch02-ipv6/2.Initial2.yml (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/ts01-general/ch02-ipv6/3.Initial3.yml (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/ts01-general/ch02-ipv6/AAA.xml (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/ts01-general/ch02-ipv6/AAR-ipv6.xml (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/ts02-errors/ch01-protocolErrors/1.MissingRealm.yml (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/ts02-errors/ch01-protocolErrors/AAA-bad.xml (100%) rename example/diameter/launcher/deployments/{aots => aots-setup}/tests.example/ts02-errors/ch01-protocolErrors/AAR-bad.xml (100%) delete mode 100644 example/diameter/launcher/resources/stack_examples/0.xml delete mode 100644 example/diameter/launcher/resources/stack_examples/16777236.xml delete mode 100644 example/diameter/launcher/resources/stack_examples/16777238.xml delete mode 100644 example/diameter/launcher/resources/stack_examples/16777302.xml rename example/diameter/launcher/{deployments/aots/agents/ADML/stacks => resources/stack_examples}/DictionaryGx.16777238.xml (100%) rename example/diameter/launcher/{deployments/aots/agents/ADML/stacks => resources/stack_examples}/DictionaryRx.16777236.xml (100%) rename example/diameter/launcher/{deployments/aots/agents/ADML/stacks => resources/stack_examples}/DictionarySy.16777302.xml (100%) rename example/diameter/launcher/{deployments/aots/agents/ADML/stacks => resources/stack_examples}/diameter_base.0.xml (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0032d57..e35da4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,7 +70,7 @@ message(STATUS "CMAKE_CXX_COMPILER_ID = ${CMAKE_CXX_COMPILER_ID}") if(CMAKE_CXX_COMPILER_ID MATCHES GNU) #execute_process(COMMAND g++ --version >/dev/null 2>/dev/null) set(CMAKE_CXX_COMPILER "/usr/bin/g++") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wno-deprecated -Wwrite-strings -Wno-unknown-pragmas -Wno-sign-compare -Wno-maybe-uninitialized -Wno-unused -Wno-reorder") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wno-deprecated -Wwrite-strings -Wno-unknown-pragmas -Wno-sign-compare -Wno-maybe-uninitialized -Wno-unused -Wno-reorder") set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3") set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG") set(CMAKE_CXX_FLAGS_RELEASE "-O3") @@ -80,7 +80,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES Clang) #execute_process(COMMAND clang++ --version >/dev/null 2>/dev/null) add_definitions(-DIS_CLANG) set(CMAKE_CXX_COMPILER "/usr/bin/clang++") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wno-deprecated -Wwrite-strings -Wno-unknown-pragmas -Wno-sign-compare -Wno-maybe-uninitialized -Wno-unused -Wno-reorder -Wno-parentheses-equality") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wno-deprecated -Wwrite-strings -Wno-unknown-pragmas -Wno-sign-compare -Wno-maybe-uninitialized -Wno-unused -Wno-reorder -Wno-parentheses-equality") set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3") set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG") set(CMAKE_CXX_FLAGS_RELEASE "-O3") diff --git a/example/diameter/launcher/Launcher.cpp b/example/diameter/launcher/Launcher.cpp index 2175263..420a498 100644 --- a/example/diameter/launcher/Launcher.cpp +++ b/example/diameter/launcher/Launcher.cpp @@ -330,7 +330,7 @@ void Launcher::servicesFromXML(const anna::xml::Node* servicesNode, bool eventOp // Checking command line parameters std::string sessionBasedModelsType; - anna::diameter::comm::Entity::SessionBasedModelsType::_v sessionBasedModelsTypeEnum; + anna::diameter::comm::Entity::SessionBasedModelsType::_v sessionBasedModelsTypeEnum = anna::diameter::comm::Entity::SessionBasedModelsType::SessionIdLowPart; if(sessionBasedModelsClientSocketSelection) { sessionBasedModelsType = sessionBasedModelsClientSocketSelection->getValue(); if (sessionBasedModelsType == "RoundRobin") { @@ -1463,6 +1463,8 @@ std::string Launcher::help() const throw() { result += "\n Test cases reports are not dumped on process context (too many information in general)."; result += "\n The report contains context information in every moment: this operation acts as a snapshot."; result += "\n"; + result += "\n test|state[|id] Get test case state for id provided, current 'in-process' test case when missing."; + result += "\n"; result += "\n test|interact|amount[|id] Makes interactive a specific test case id. The amount is the margin of execution steps"; result += "\n to be done. Normally, we will execute 'test|interact|0[|]', which means that"; result += "\n the test case is selected to be interactive, but no step is executed. Then you have to"; @@ -1567,7 +1569,7 @@ std::string Launcher::help() const throw() { result += "\n"; result += "\nThe alternative using SIGUSR2 signal requires the creation of the task(s) file which will be read at"; result += "\n signal event:"; - result += "\n echo \"<\" > "; result += getSignalUSR2InputFile(); + result += "\n echo \"\" > "; result += getSignalUSR2InputFile(); result += "\n then"; result += "\n kill -12 "; result += "\n or"; @@ -1619,9 +1621,12 @@ void Launcher::logStatisticsSamples(const std::string &conceptsList) throw() { } -void Launcher::eventOperation(const std::string &operation, std::string &response_content) throw(anna::RuntimeException) { +bool Launcher::eventOperation(const std::string &operation, std::string &response_content) throw(anna::RuntimeException) { + + bool result = true; + LOGMETHOD(anna::TraceMethod tm("Launcher", "eventOperation", ANNA_FILE_LOCATION)); - if (operation == "") return; // ignore + if (operation == "") return result; // ignore LOGDEBUG(anna::Logger::debug(anna::functions::asString("Operation: %s", operation.c_str()), ANNA_FILE_LOCATION)); // Default response: @@ -1651,15 +1656,15 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons catch(anna::RuntimeException &ex) { ex.trace(); response_content = ex.asString(); - return; + return false; } - return; + return true; // OK } // Help: if(operation == "help") { response_content = help(); - return; + return true; // OK } // Reset performance data: @@ -1667,26 +1672,26 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons resetCounters(); resetStatistics(); response_content = "All process counters & statistic information have been reset"; - return; + return true; // OK } // Counters dump on demand: if(operation == "forceCountersRecord") { forceCountersRecord(); response_content = "Current counters have been dump to disk"; - return; + return true; // OK } // OAM & statistics: if(operation == "show-oam") { anna::xml::Node root("root"); response_content = anna::xml::Compiler().apply(oamAsXML(&root)); - return; + return true; // OK } if(operation == "show-stats") { anna::xml::Node root("root"); response_content = anna::xml::Compiler().apply(statsAsXML(&root)); - return; + return true; // OK } /////////////////////////////////////////////////////////////////// @@ -1761,25 +1766,27 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons std::string contextFile = ((numParams == 1) ? param1 : anna::functions::asString("/var/tmp/anna.context.%05d", getPid())); writeContext(contextFile); response_content = anna::functions::asString("Context dumped on file '%s'", contextFile.c_str()); - return; + return true; // OK } if(opType == "log-statistics-samples") { logStatisticsSamples(param1); response_content = anna::functions::asString("Log statistics samples for '%s' concepts", param1.c_str()); - return; + return true; // OK } // Change execution directory: if(opType == "change-dir") { if (param1 == "") param1 = a_initialWorkingDirectory; - if (chdir(param1.c_str()) == 0) + result = (chdir(param1.c_str()) == 0); + + if (result) response_content = "New execution directory configured: "; else response_content = "Cannot assign provided execution directory: "; response_content += param1; - return; + return result; } if(opType == "services") { @@ -1790,10 +1797,10 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons catch(anna::RuntimeException &ex) { ex.trace(); response_content = anna::functions::asString("Loaded services from file '%s' with errors", servicesFile.c_str()); - return; + return false; } response_content = anna::functions::asString("Loaded services from file '%s'", servicesFile.c_str()); - return; + return true; // OK } // Host switch: @@ -1810,12 +1817,12 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons response_content = "Working node is automatic"; } } - return; + return true; // OK } if(opType == "node_auto") { a_workingNode = NULL; response_content = "Working node has been set to automatic"; - return; + return true; // OK } // Operated host from possible forced-working node: @@ -2159,9 +2166,33 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons if (testCase) { response_content = testCase->asXMLString(); - return; + return true; // OK + } + else { + result = false; + if (id == -1) { + opt_response_content = "no current test case detected (testing started ?)"; + } + else { + opt_response_content = "cannot found test id ("; + opt_response_content += anna::functions::asString(id); + opt_response_content += ")"; + } + } + } + else if(param1 == "state") { + if (numParams > 2) + throw anna::RuntimeException("Wrong body content format on HTTP Request. Use 'help' management command to see more information.", ANNA_FILE_LOCATION); + + int id = ((param2 != "") ? atoi(param2.c_str()) : -1); + anna::testing::TestCase *testCase = testManager.findTestCase(id); + + if (testCase) { + response_content = anna::testing::TestCase::asText(testCase->getState()); + return testCase->isSuccess(); } else { + result = false; if (id == -1) { opt_response_content = "no current test case detected (testing started ?)"; } @@ -2198,6 +2229,7 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons opt_response_content += anna::functions::asString(id); } else { + result = false; opt_response_content = "cannot found test id ("; opt_response_content += anna::functions::asString(id); opt_response_content += ")"; @@ -2228,6 +2260,7 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons opt_response_content = param2; opt_response_content += " reset have been sent to all programmed tests: "; opt_response_content += anyReset ? "some/all have been reset" : "nothing was reset"; } else { + result = false; opt_response_content = "cannot found test id ("; opt_response_content += anna::functions::asString(id); opt_response_content += ")"; @@ -2269,19 +2302,19 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons } else if(param1 == "junit") { response_content = testManager.junitAsXMLString(); - return; + return true; // OK } else if(param1 == "summary-counts") { response_content = testManager.summaryCounts(); - return; + return true; // OK } else if(param1 == "summary-states") { response_content = testManager.summaryStates(); - return; + return true; // OK } else if(param1 == "summary") { response_content = testManager.asXMLString(); - return; + return true; // OK } else { int id = atoi(param1.c_str()); @@ -2488,7 +2521,7 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons } else if(opType == "loadxml") { codecMsg.loadXML(param1); response_content = codecMsg.asXMLString(); - return; + return true; // OK } else if(opType == "diameterServerSessions") { int diameterServerSessions = atoi(param1.c_str()); getOperatedServer()->setMaxConnections(diameterServerSessions); @@ -2496,7 +2529,7 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons } else if(opType == "answerxml2c") { if(param1 == "") { // programmed answers FIFO's to stdout response_content = getOperatedServer()->getReactingAnswers()->asString("ANSWERS TO CLIENT"); - return; + return true; // OK } else if (param1 == "rotate") { getOperatedServer()->getReactingAnswers()->rotate(true); } else if (param1 == "exhaust") { @@ -2522,7 +2555,7 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons if(param1 == "") { // programmed answers FIFO's to stdout response_content = getOperatedEntity()->getReactingAnswers()->asString("ANSWERS TO ENTITY"); - return; + return true; // OK } else if (param1 == "rotate") { getOperatedEntity()->getReactingAnswers()->rotate(true); } else if (param1 == "exhaust") { @@ -2554,6 +2587,8 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons response_content += " => "; response_content += opt_response_content; } + + return result; } anna::xml::Node* Launcher::asXML(anna::xml::Node* parent) const diff --git a/example/diameter/launcher/Launcher.hpp b/example/diameter/launcher/Launcher.hpp index c97fe7b..a74ef39 100644 --- a/example/diameter/launcher/Launcher.hpp +++ b/example/diameter/launcher/Launcher.hpp @@ -104,7 +104,7 @@ public: MyCommunicator *getCommunicator() throw() { return a_communicator; } - void eventOperation(const std::string &, std::string &) throw(anna::RuntimeException); + bool eventOperation(const std::string &, std::string &) throw(anna::RuntimeException); // returns success/failed void forceCountersRecord() throw(anna::RuntimeException) { if (a_counterRecorderClock) a_counterRecorderClock->tick(); } void logStatisticsSamples(const std::string &conceptsList) throw(); diff --git a/example/diameter/launcher/MyHandler.cpp b/example/diameter/launcher/MyHandler.cpp index 9f893a7..9ac1c44 100644 --- a/example/diameter/launcher/MyHandler.cpp +++ b/example/diameter/launcher/MyHandler.cpp @@ -8,6 +8,8 @@ // Standard #include +#include +#include // Project #include @@ -34,18 +36,20 @@ throw(anna::RuntimeException) { // Operation: std::string response_content; + bool opOk{}; + try { Launcher& my_app = static_cast (anna::app::functions::getApp()); - my_app.eventOperation(body_content, response_content); + opOk = my_app.eventOperation(body_content, response_content); } catch(RuntimeException &ex) { ex.trace(); + opOk = false; } anna::http::Response* response = allocateResponse(); response->setStatusCode(200); // http://en.wikipedia.org/wiki/List_of_HTTP_status_codes - anna::DataBlock db_content(true); - db_content = response_content; - response->setBody(db_content); + +// EXAMPLES TO SET HEADERS: // response->find(anna::http::Header::Type::Date)->setValue("Mon, 30 Jan 2006 14:36:18 GMT"); // anna::http::Header* keepAlive = response->find("Keep-Alive"); // @@ -54,6 +58,20 @@ throw(anna::RuntimeException) { // // keepAlive->setValue("Verificacion del cambio 1.0.7"); + // Content-Type header: + anna::http::Header* contentType = response->find("Content-Type"); + if (contentType == NULL) + contentType = response->createHeader("Content-Type"); + contentType->setValue("application/json"); + + // Json Body for response: + std::stringstream ss; + + ss << R"({ "result":")" << (opOk ? "true":"false") << R"(", "data": )" << std::quoted(response_content) << R"( })"; + anna::DataBlock db_content(true); + db_content = ss.str(); + response->setBody(db_content); + try { clientSocket.send(*response); } catch(Exception& ex) { diff --git a/example/diameter/launcher/deploy-aots-adml.sh b/example/diameter/launcher/deploy-aots-adml.sh new file mode 100755 index 0000000..4dc5aa6 --- /dev/null +++ b/example/diameter/launcher/deploy-aots-adml.sh @@ -0,0 +1,116 @@ +#!/bin/bash + +############# +# VARIABLES # +############# +SCR_DIR=`readlink -f $0 | xargs dirname` +PROJECT_ROOT=$(readlink -f $SCR_DIR/../../..) + +############# +# FUNCTIONS # +############# +_exit () { + local msg="$1" + local rc=$2 + [ -z "$rc" ] && rc=1 + + # Exit message: + [ -n "$msg" ] && echo -e "\n${msg}\n" + + exit $rc +} + +############# +# EXECUTION # +############# + +echo +echo "------------------------------------------------------" +echo " AOTS ADML Agent installation " +echo "------------------------------------------------------" +echo +[ -d $PROJECT_ROOT/build/Release ] && VARIANT=Release +[ -d $PROJECT_ROOT/build/Debug ] && VARIANT=Debug +[ -z "$VARIANT" ] && _exit "Cannot locate neither 'Release' nor 'Debug' variant !" +build_type_letter=$(echo $VARIANT | cut -c1 | tr '[:upper:]' '[:lower:]') + +version__dflt=v"`date +'%y'`.`date +'%m'`.`date +'%d'`$build_type_letter" +INSTALL__dflt=$HOME/3rdParty/anna-aots-adml-builds/v"`date +'%y'`.`date +'%m'`.`date +'%d'`$build_type_letter" + +echo "Choose the target path for installation [$INSTALL__dflt]:" +echo " (enter a non-existent directory)" +read INSTALL +[ -z "$INSTALL" ] && INSTALL=$INSTALL__dflt +INSTALL=`readlink -m $INSTALL` +[ -d $INSTALL ] && _exit "The target installation directory ($INSTALL) already exists ! (if you want to reinstall, remove it first)" + +echo +echo "Stage 1: Deploying resources ......................" +echo +mkdir -p $INSTALL +cp -rL $SCR_DIR/deployments/aots-adml/* $INSTALL + +# VARIABLES ###################################### +# Sources: +LDIR=${PROJECT_ROOT}/example/diameter/launcher +BIN_DIR=${PROJECT_ROOT}/build/$VARIANT/bin +LIB_DIR=${PROJECT_ROOT}/build/$VARIANT/lib + +# Targets: +ADML=${INSTALL} +DTDs=${ADML}/DTDs +DYNLIBS=${ADML}/dynlibs +################################################## + +echo +echo "Variant: $VARIANT" +echo + +# Empty directories: +mkdir -p ${ADML}/counters +mkdir -p ${ADML}/test-reports + +# Scripts: +cp ${PROJECT_ROOT}/example/diameter/launcher/resources/scripts/operation_curl.sh ${ADML}/operation.sh + +# Templates: +mkdir $DTDs +cp ${PROJECT_ROOT}/include/anna/diameter/codec/message.dtd ${DTDs} +cp ${PROJECT_ROOT}/include/anna/diameter/stack/dictionary.dtd ${DTDs} +cp ${PROJECT_ROOT}/example/diameter/launcher/resources/services_examples/services.dtd ${DTDs} + +# Main Launcher and dynamic libraries: +cp ${BIN_DIR}/anna_diameter_launcher ${ADML}/ADML +cp -r $LIB_DIR/dynamic/launcher ${DYNLIBS} +cp $LIB_DIR/libanna_testing_shared.so ${DYNLIBS} + +# Get stuff from leaf directories: +cd $LIB_DIR/dynamic/launcher +leafs=( $(find . -type d -links 2) ) +cd - >/dev/null + +cd ${PROJECT_ROOT}/dynamic/launcher +for dir in ${leafs[@]} +do + cp $dir/*.xml ${DYNLIBS}/$dir 2>/dev/null + cp $dir/dynamic.suffix ${DYNLIBS}/$dir 2>/dev/null + cp -r $dir/services ${DYNLIBS}/$dir 2>/dev/null +done +cd - >/dev/null + +# ADML dynamic libs selection script: +cp ${LDIR}/resources/scripts/select_dynlib.sh ${DYNLIBS}/select.sh + +# Default dynamic library: +cd ${DYNLIBS} +ln -sf default/libanna_launcher_procedure_default_shared.so +cd - >/dev/null + +# ADML Agent shall use http server: +httpOpt="--httpServer \`grep -v ^# .httpServer\`" +echo "${httpOpt}" >> ${ADML}/args.ft +echo "${httpOpt}" >> ${ADML}/args.st +echo "localhost:8000" > ${ADML}/.httpServer + +_exit "Done!" 0 + diff --git a/example/diameter/launcher/deploy-aots.sh b/example/diameter/launcher/deploy-aots.sh index 8a7f8b7..1e7f471 100755 --- a/example/diameter/launcher/deploy-aots.sh +++ b/example/diameter/launcher/deploy-aots.sh @@ -35,20 +35,20 @@ echo build_type_letter=$(echo $VARIANT | cut -c1 | tr '[:upper:]' '[:lower:]') version__dflt=v"`date +'%y'`.`date +'%m'`.`date +'%d'`$build_type_letter" -INSTALL_AOTS__dflt=$HOME/3rdParty/anna-aots-builds/v"`date +'%y'`.`date +'%m'`.`date +'%d'`$build_type_letter" +INSTALL__dflt=$HOME/3rdParty/anna-aots-builds/v"`date +'%y'`.`date +'%m'`.`date +'%d'`$build_type_letter" -echo "Choose the target path for installation [$INSTALL_AOTS__dflt]:" +echo "Choose the target path for installation [$INSTALL__dflt]:" echo " (enter a non-existent directory)" -read INSTALL_AOTS -[ -z "$INSTALL_AOTS" ] && INSTALL_AOTS=$INSTALL_AOTS__dflt -INSTALL_AOTS=`readlink -m $INSTALL_AOTS` -[ -d $INSTALL_AOTS ] && _exit "The target installation directory ($INSTALL_AOTS) already exists ! (if you want to reinstall, remove it first)" +read INSTALL +[ -z "$INSTALL" ] && INSTALL=$INSTALL__dflt +INSTALL=`readlink -m $INSTALL` +[ -d $INSTALL ] && _exit "The target installation directory ($INSTALL) already exists ! (if you want to reinstall, remove it first)" echo echo "Stage 1: Deploying resources ......................" echo -mkdir -p $INSTALL_AOTS -cp -r $SCR_DIR/deployments/aots/* $INSTALL_AOTS +mkdir -p $INSTALL +cp -rL $SCR_DIR/deployments/aots-setup/* $INSTALL # VARIABLES ###################################### # Sources: @@ -57,7 +57,7 @@ BIN_DIR=${PROJECT_ROOT}/build/$VARIANT/bin LIB_DIR=${PROJECT_ROOT}/build/$VARIANT/lib # Targets: -ADML=${INSTALL_AOTS}/agents/ADML +ADML=${INSTALL}/agents/ADML DTDs=${ADML}/DTDs DYNLIBS=${ADML}/dynlibs ################################################## diff --git a/example/diameter/launcher/deploy-setups.sh b/example/diameter/launcher/deploy-setups.sh index bdc5bd9..3c8b47b 100755 --- a/example/diameter/launcher/deploy-setups.sh +++ b/example/diameter/launcher/deploy-setups.sh @@ -109,12 +109,12 @@ case $type in echo s | ./configure.sh >/dev/null sed -i 's/3868/3869/' services.xml # Gx dictionary: - ln -sf stack_examples/other/16777238.xml dictionary.xml + ln -sf stack_examples/other/DictionaryGx.16777238.xml dictionary.xml cd - >/dev/null cd $target/ADML-serverRx echo s | ./configure.sh >/dev/null # Rx dictionary: - ln -sf stack_examples/other/16777236.xml dictionary.xml + ln -sf stack_examples/other/DictionaryRx.16777236.xml dictionary.xml cd - >/dev/null ;; diff --git a/example/diameter/launcher/deployments/aots/agents/ADML/ACTIONS.md b/example/diameter/launcher/deployments/aots-adml/ACTIONS.md similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/ADML/ACTIONS.md rename to example/diameter/launcher/deployments/aots-adml/ACTIONS.md diff --git a/example/diameter/launcher/deployments/aots/agents/ADML/HINTS.md b/example/diameter/launcher/deployments/aots-adml/HINTS.md similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/ADML/HINTS.md rename to example/diameter/launcher/deployments/aots-adml/HINTS.md diff --git a/example/diameter/launcher/deployments/aots/agents/ADML/args.ft b/example/diameter/launcher/deployments/aots-adml/args.ft similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/ADML/args.ft rename to example/diameter/launcher/deployments/aots-adml/args.ft diff --git a/example/diameter/launcher/deployments/aots/agents/ADML/args.st b/example/diameter/launcher/deployments/aots-adml/args.st similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/ADML/args.st rename to example/diameter/launcher/deployments/aots-adml/args.st diff --git a/example/diameter/launcher/deployments/aots/agents/ADML/services.xml.example b/example/diameter/launcher/deployments/aots-adml/services.xml.example similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/ADML/services.xml.example rename to example/diameter/launcher/deployments/aots-adml/services.xml.example diff --git a/example/diameter/launcher/deployments/aots-adml/stacks b/example/diameter/launcher/deployments/aots-adml/stacks new file mode 120000 index 0000000..b2773bc --- /dev/null +++ b/example/diameter/launcher/deployments/aots-adml/stacks @@ -0,0 +1 @@ +../../resources/stack_examples \ No newline at end of file diff --git a/example/diameter/launcher/deployments/aots/agents/ADML/start.sh b/example/diameter/launcher/deployments/aots-adml/start.sh similarity index 94% rename from example/diameter/launcher/deployments/aots/agents/ADML/start.sh rename to example/diameter/launcher/deployments/aots-adml/start.sh index 213a8e0..d2b371e 100755 --- a/example/diameter/launcher/deployments/aots/agents/ADML/start.sh +++ b/example/diameter/launcher/deployments/aots-adml/start.sh @@ -15,7 +15,7 @@ for file in `ls *.launcher.log 2>/dev/null`; do 0> $file; done mkdir -p counters test-reports rm -f counters/* test-reports/* *.csv export LD_LIBRARY_PATH=$PWD/dynlibs -./ADML `grep -v ^# $ARGS` & +eval ./ADML `grep -v ^# $ARGS` & echo $! > .pid echo "Done !" diff --git a/example/diameter/launcher/deployments/aots/agents/ADML/stop.sh b/example/diameter/launcher/deployments/aots-adml/stop.sh similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/ADML/stop.sh rename to example/diameter/launcher/deployments/aots-adml/stop.sh diff --git a/example/diameter/launcher/deployments/aots/README.md b/example/diameter/launcher/deployments/aots-setup/README.md similarity index 100% rename from example/diameter/launcher/deployments/aots/README.md rename to example/diameter/launcher/deployments/aots-setup/README.md diff --git a/example/diameter/launcher/deployments/aots-setup/agents/ADML b/example/diameter/launcher/deployments/aots-setup/agents/ADML new file mode 120000 index 0000000..703e402 --- /dev/null +++ b/example/diameter/launcher/deployments/aots-setup/agents/ADML @@ -0,0 +1 @@ +../../aots-adml \ No newline at end of file diff --git a/example/diameter/launcher/deployments/aots/agents/HTTPMOCK/ACTIONS.md b/example/diameter/launcher/deployments/aots-setup/agents/HTTPMOCK/ACTIONS.md similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/HTTPMOCK/ACTIONS.md rename to example/diameter/launcher/deployments/aots-setup/agents/HTTPMOCK/ACTIONS.md diff --git a/example/diameter/launcher/deployments/aots/agents/HTTPMOCK/Provision.sh b/example/diameter/launcher/deployments/aots-setup/agents/HTTPMOCK/Provision.sh similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/HTTPMOCK/Provision.sh rename to example/diameter/launcher/deployments/aots-setup/agents/HTTPMOCK/Provision.sh diff --git a/example/diameter/launcher/deployments/aots/agents/KAFKA/ACTIONS.md b/example/diameter/launcher/deployments/aots-setup/agents/KAFKA/ACTIONS.md similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/KAFKA/ACTIONS.md rename to example/diameter/launcher/deployments/aots-setup/agents/KAFKA/ACTIONS.md diff --git a/example/diameter/launcher/deployments/aots/agents/KAFKA/Admin.py b/example/diameter/launcher/deployments/aots-setup/agents/KAFKA/Admin.py similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/KAFKA/Admin.py rename to example/diameter/launcher/deployments/aots-setup/agents/KAFKA/Admin.py diff --git a/example/diameter/launcher/deployments/aots/agents/KAFKA/Consumer.py b/example/diameter/launcher/deployments/aots-setup/agents/KAFKA/Consumer.py similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/KAFKA/Consumer.py rename to example/diameter/launcher/deployments/aots-setup/agents/KAFKA/Consumer.py diff --git a/example/diameter/launcher/deployments/aots/agents/KAFKA/Producer.py b/example/diameter/launcher/deployments/aots-setup/agents/KAFKA/Producer.py similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/KAFKA/Producer.py rename to example/diameter/launcher/deployments/aots-setup/agents/KAFKA/Producer.py diff --git a/example/diameter/launcher/deployments/aots/launcher.py b/example/diameter/launcher/deployments/aots-setup/launcher.py similarity index 100% rename from example/diameter/launcher/deployments/aots/launcher.py rename to example/diameter/launcher/deployments/aots-setup/launcher.py diff --git a/example/diameter/launcher/deployments/aots/loader.py b/example/diameter/launcher/deployments/aots-setup/loader.py similarity index 100% rename from example/diameter/launcher/deployments/aots/loader.py rename to example/diameter/launcher/deployments/aots-setup/loader.py diff --git a/example/diameter/launcher/deployments/aots/tests.example/agents.yml b/example/diameter/launcher/deployments/aots-setup/tests.example/agents.yml similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/agents.yml rename to example/diameter/launcher/deployments/aots-setup/tests.example/agents.yml diff --git a/example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch01-ipv4/1.Initial.yml b/example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch01-ipv4/1.Initial.yml similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch01-ipv4/1.Initial.yml rename to example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch01-ipv4/1.Initial.yml diff --git a/example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch01-ipv4/2.Initial2.yml b/example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch01-ipv4/2.Initial2.yml similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch01-ipv4/2.Initial2.yml rename to example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch01-ipv4/2.Initial2.yml diff --git a/example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch01-ipv4/AAA.xml b/example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch01-ipv4/AAA.xml similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch01-ipv4/AAA.xml rename to example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch01-ipv4/AAA.xml diff --git a/example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch01-ipv4/AAR.xml b/example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch01-ipv4/AAR.xml similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch01-ipv4/AAR.xml rename to example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch01-ipv4/AAR.xml diff --git a/example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch01-ipv4/AAR2.xml b/example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch01-ipv4/AAR2.xml similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch01-ipv4/AAR2.xml rename to example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch01-ipv4/AAR2.xml diff --git a/example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch01-ipv4/expected.json.template b/example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch01-ipv4/expected.json.template similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch01-ipv4/expected.json.template rename to example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch01-ipv4/expected.json.template diff --git a/example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch02-ipv6/1.Initial.yml b/example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch02-ipv6/1.Initial.yml similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch02-ipv6/1.Initial.yml rename to example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch02-ipv6/1.Initial.yml diff --git a/example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch02-ipv6/2.Initial2.yml b/example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch02-ipv6/2.Initial2.yml similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch02-ipv6/2.Initial2.yml rename to example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch02-ipv6/2.Initial2.yml diff --git a/example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch02-ipv6/3.Initial3.yml b/example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch02-ipv6/3.Initial3.yml similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch02-ipv6/3.Initial3.yml rename to example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch02-ipv6/3.Initial3.yml diff --git a/example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch02-ipv6/AAA.xml b/example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch02-ipv6/AAA.xml similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch02-ipv6/AAA.xml rename to example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch02-ipv6/AAA.xml diff --git a/example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch02-ipv6/AAR-ipv6.xml b/example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch02-ipv6/AAR-ipv6.xml similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/ts01-general/ch02-ipv6/AAR-ipv6.xml rename to example/diameter/launcher/deployments/aots-setup/tests.example/ts01-general/ch02-ipv6/AAR-ipv6.xml diff --git a/example/diameter/launcher/deployments/aots/tests.example/ts02-errors/ch01-protocolErrors/1.MissingRealm.yml b/example/diameter/launcher/deployments/aots-setup/tests.example/ts02-errors/ch01-protocolErrors/1.MissingRealm.yml similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/ts02-errors/ch01-protocolErrors/1.MissingRealm.yml rename to example/diameter/launcher/deployments/aots-setup/tests.example/ts02-errors/ch01-protocolErrors/1.MissingRealm.yml diff --git a/example/diameter/launcher/deployments/aots/tests.example/ts02-errors/ch01-protocolErrors/AAA-bad.xml b/example/diameter/launcher/deployments/aots-setup/tests.example/ts02-errors/ch01-protocolErrors/AAA-bad.xml similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/ts02-errors/ch01-protocolErrors/AAA-bad.xml rename to example/diameter/launcher/deployments/aots-setup/tests.example/ts02-errors/ch01-protocolErrors/AAA-bad.xml diff --git a/example/diameter/launcher/deployments/aots/tests.example/ts02-errors/ch01-protocolErrors/AAR-bad.xml b/example/diameter/launcher/deployments/aots-setup/tests.example/ts02-errors/ch01-protocolErrors/AAR-bad.xml similarity index 100% rename from example/diameter/launcher/deployments/aots/tests.example/ts02-errors/ch01-protocolErrors/AAR-bad.xml rename to example/diameter/launcher/deployments/aots-setup/tests.example/ts02-errors/ch01-protocolErrors/AAR-bad.xml diff --git a/example/diameter/launcher/resources/stack_examples/0.xml b/example/diameter/launcher/resources/stack_examples/0.xml deleted file mode 100644 index c1e23cc..0000000 --- a/example/diameter/launcher/resources/stack_examples/0.xml +++ /dev/null @@ -1,438 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/diameter/launcher/resources/stack_examples/16777236.xml b/example/diameter/launcher/resources/stack_examples/16777236.xml deleted file mode 100644 index a0d53e3..0000000 --- a/example/diameter/launcher/resources/stack_examples/16777236.xml +++ /dev/null @@ -1,696 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/diameter/launcher/resources/stack_examples/16777238.xml b/example/diameter/launcher/resources/stack_examples/16777238.xml deleted file mode 100644 index efc5acd..0000000 --- a/example/diameter/launcher/resources/stack_examples/16777238.xml +++ /dev/null @@ -1,1270 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/diameter/launcher/resources/stack_examples/16777302.xml b/example/diameter/launcher/resources/stack_examples/16777302.xml deleted file mode 100644 index ce4e22d..0000000 --- a/example/diameter/launcher/resources/stack_examples/16777302.xml +++ /dev/null @@ -1,553 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/diameter/launcher/deployments/aots/agents/ADML/stacks/DictionaryGx.16777238.xml b/example/diameter/launcher/resources/stack_examples/DictionaryGx.16777238.xml similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/ADML/stacks/DictionaryGx.16777238.xml rename to example/diameter/launcher/resources/stack_examples/DictionaryGx.16777238.xml diff --git a/example/diameter/launcher/deployments/aots/agents/ADML/stacks/DictionaryRx.16777236.xml b/example/diameter/launcher/resources/stack_examples/DictionaryRx.16777236.xml similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/ADML/stacks/DictionaryRx.16777236.xml rename to example/diameter/launcher/resources/stack_examples/DictionaryRx.16777236.xml diff --git a/example/diameter/launcher/deployments/aots/agents/ADML/stacks/DictionarySy.16777302.xml b/example/diameter/launcher/resources/stack_examples/DictionarySy.16777302.xml similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/ADML/stacks/DictionarySy.16777302.xml rename to example/diameter/launcher/resources/stack_examples/DictionarySy.16777302.xml diff --git a/example/diameter/launcher/deployments/aots/agents/ADML/stacks/diameter_base.0.xml b/example/diameter/launcher/resources/stack_examples/diameter_base.0.xml similarity index 100% rename from example/diameter/launcher/deployments/aots/agents/ADML/stacks/diameter_base.0.xml rename to example/diameter/launcher/resources/stack_examples/diameter_base.0.xml diff --git a/include/anna/testing/TestCase.hpp b/include/anna/testing/TestCase.hpp index 6ec64ad..e87750c 100644 --- a/include/anna/testing/TestCase.hpp +++ b/include/anna/testing/TestCase.hpp @@ -78,6 +78,7 @@ public: bool isFinished() const throw() { return (getState() == State::Failed || getState() == State::Success); } bool inProgress() const throw() { return (getState() == State::InProgress); } bool isFailed() const throw() { return (getState() == State::Failed); } + bool isSuccess() const throw() { return (getState() == State::Success); } bool hasSameCondition(const TestDiameterCondition &condition) const throw(); const DebugSummary & getDebugSummary() const throw() { return a_debugSummary; } -- 2.20.1