X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FLauncher.cpp;h=45f51a9630d5feeaf2f1d9d9f6ca881010fcc7d3;hb=983eaadca6cfae987be3453853d75bb9bce04487;hp=041e7a934d4a1d4c810d1acbbd3d21e622dc471d;hpb=e3f60b6b4a178c63ebd6f8915431bfa485a2e601;p=anna.git diff --git a/example/diameter/launcher/Launcher.cpp b/example/diameter/launcher/Launcher.cpp index 041e7a9..45f51a9 100644 --- a/example/diameter/launcher/Launcher.cpp +++ b/example/diameter/launcher/Launcher.cpp @@ -15,7 +15,9 @@ // Project #include #include +#include #include +#include #include #include #include @@ -35,7 +37,6 @@ #define SIGUSR2_TASKS_OUTPUT_FILENAME "./sigusr2.out" - const char *ServicesDTD = "\ \n\ \n\ @@ -43,22 +44,27 @@ const char *ServicesDTD = "\ \n\ \n\ \n\ -\n\ +\n\ \n\ \n\ \n\ -\n\ +\n\ "; - result += "\n "; + result += "\n "; result += "\n"; result += "\n"; result += "\nServer configuration:"; @@ -837,7 +907,7 @@ std::string Launcher::help() const throw() { result += "\n "; result += "\n"; result += "\n "; - result += "\n "; + result += "\n "; result += "\n"; result += "\n"; result += "\nIf you act as a proxy or a translation agent, you need to combine both former setups, and probably"; @@ -854,8 +924,8 @@ std::string Launcher::help() const throw() { result += "\n "; result += "\n"; result += "\n "; - result += "\n "; - result += "\n "; + result += "\n "; + result += "\n "; result += "\n"; result += "\n"; result += "\n"; @@ -875,11 +945,24 @@ std::string Launcher::help() const throw() { result += "\n"; result += "\nhelp This help."; result += "\n"; - result += "\n---------------------------------------------------------------------------------------- Node selection"; - result += "\n"; - result += "\nnode[|] Select current working node by mean the registered name."; - result += "\n All the subsequent operations will be referred to this node."; - result += "\n Without argument, the current node information is retrieved."; + result += "\n--------------------------------------------------------------------------------------- Node management"; + result += "\n"; + result += "\nnode[|] Selects a context working node by mean a registered name."; + result += "\n All the subsequent operations will be forced to work with"; + result += "\n this node, which makes possible some rare scenarios like"; + result += "\n sending unexpected messages on remote peers. This is also"; + result += "\n useful for some operations in order to restrict the scope"; + result += "\n of action (statistics, communication visibility, etc.)."; + result += "\n Empty parameter will show the current configuration."; + result += "\n"; + result += "\nnode_auto Returns to the default behaviour (smart node selection)."; + result += "\n Depending on the operation, this could imply a global"; + result += "\n action scope, affecting to all the registered realms."; + result += "\n This should be the normal configuration. Take into"; + result += "\n account that if you fix the working node, this could"; + result += "\n affect to things like test programming: communication"; + result += "\n resources will override those which would be inferred"; + result += "\n from programmed messages Origin-Realm avps."; result += "\n"; result += "\n------------------------------------------------------------------------------------ Parsing operations"; result += "\n"; @@ -890,12 +973,14 @@ std::string Launcher::help() const throw() { result += "\n------------------------------------------------------------------------------------------- Hot changes"; result += "\n"; result += "\nservices[|source file] Adds and starts the services specified in the xml file provided."; - result += "\n (if missing, the file 'services.xml' will be used)."; - result += "\n The last loaded realm node will be automatically the new current"; - result += "\n working node. This is used to load new nodes once the ADML is"; - result += "\n started, regardless if '--services' command line parameter was"; - result += "\n used or not. Those services which are not correctly loaded, will"; - result += "\n be ignored, keeping the process alive."; + result += "\n (if missing, the file 'services.xml' will be used). This is used"; + result += "\n to load new nodes once the ADML is started, regardless if command"; + result += "\n line '--services' parameter was used or not. Those services which"; + result += "\n are not correctly loaded will be ignored to keep the process alive."; + result += "\n If you need to load services as deltas, you must firstly load the"; + result += "\n diameter base dictionary with stack id 0, because all the realms"; + result += "\n will use this dictionary to encode/decode base protocol messages"; + result += "\n managed by the communication engine."; result += "\n"; result += "\ndiameterServerSessions| Updates the maximum number of accepted connections to diameter"; result += "\n server socket."; @@ -904,9 +989,15 @@ std::string Launcher::help() const throw() { result += "\n default '/var/tmp/anna.context.' will be used."; result += "\ncollect Reset statistics and counters to start a new test stage of"; result += "\n performance measurement. Context data can be written at"; - result += "\n '/var/tmp/anna.context.' by mean 'kill -10 '"; + result += "\n '/var/tmp/anna.context.' by mean 'kill -10 '."; result += "\n or sending operation 'context|[target file]'."; + result += "\n This operation applies over all the registered realm nodes"; + result += "\n except if one specific working node has been set."; result += "\nforceCountersRecord Forces dump to file the current counters of the process."; + result += "\nshow-oam Dumps current counters of the process. This is also done at"; + result += "\n process context dump."; + result += "\nshow-stats Dumps statistics of the process. This is also done at process"; + result += "\n context dump."; result += "\n"; result += "\n[|
:][|socket id]"; result += "\n"; @@ -924,20 +1015,18 @@ std::string Launcher::help() const throw() { result += "\n"; result += "\nsendxml2e| Sends xml source file (pathfile) through configured entity."; result += "\nsendxml2c| Sends xml source file (pathfile) to client."; - result += "\nsendxml| Same as 'sendxml2e'."; result += "\nanswerxml2e[|source_file] Answer xml source file (pathfile) for incoming request with same code from entity."; result += "\n The answer is stored in a FIFO queue for a specific message code, then there are"; result += "\n as many queues as different message codes have been programmed."; result += "\nanswerxml2c[|source_file] Answer xml source file (pathfile) for incoming request with same code from client."; result += "\n The answer is stored in a FIFO queue for a specific message code, then there are"; result += "\n as many queues as different message codes have been programmed."; - result += "\nanswerxml[|source_file] Same as 'answerxml2c'."; - result += "\nanswerxml(2e/2c) List programmed answers (to entity/client) if no parameter provided."; - result += "\nanswerxml(2e/2c)|dump Write programmed answers (to entity/client) to file 'programmed_answer..',"; + result += "\nanswerxml<2e/2c> List programmed answers (to entity/client) if no parameter provided."; + result += "\nanswerxml<2e/2c>|dump Write programmed answers (to entity/client) to file 'programmed_answer..',"; result += "\n where 'sequence' is the order of the answer in each FIFO code-queue of programmed answers."; - result += "\nanswerxml(2e/2c)|clear Clear programmed answers (to entity/client)."; - result += "\nanswerxml(2e/2c)|exhaust Disable the corresponding queue rotation, which is the default behaviour."; - result += "\nanswerxml(2e/2c)|rotate Enable the corresponding queue rotation, useful in performance tests."; + result += "\nanswerxml<2e/2c>|clear Clear programmed answers (to entity/client)."; + result += "\nanswerxml<2e/2c>|exhaust Disable the corresponding queue rotation, which is the default behaviour."; + result += "\nanswerxml<2e/2c>|rotate Enable the corresponding queue rotation, useful in performance tests."; result += "\n Rotation consists in add again to the queue, each element retrieved for answering."; result += "\n"; result += "\nSend operations are available using hexadecimal content (hex formatted files) which also allow to test"; @@ -945,13 +1034,12 @@ std::string Launcher::help() const throw() { result += "\n"; result += "\nsendhex2e| Sends hex source file (pathfile) through configured entity."; result += "\nsendhex2c| Sends hex source file (pathfile) to client."; - result += "\nsendhex| Same as 'sendhex2e'."; result += "\n"; result += "\nAnswer programming in hexadecimal is not really neccessary (you could use send primitives) and also"; result += "\n is intended to be used with decoded messages in order to replace things like hop by hop, end to end,"; result += "\n subscriber id, session id, etc. Anyway you could use 'decode' operation and then program the xml created."; result += "\n"; - result += "\nIf a request is received, answer map (built with 'answerxml<[2c] or 2e>' operations) will be"; + result += "\nIf a request is received, answer map (built with 'answerxml<2e/2c>' operations) will be"; result += "\n checked to find a corresponding programmed answer to be replied(*). If no ocurrence is found,"; result += "\n or answer message was received, the message is forwarded to the other side (entity or client),"; result += "\n or nothing but trace when no peer at that side is configured. Answer to client have sense when"; @@ -964,7 +1052,7 @@ std::string Launcher::help() const throw() { result += "\n"; result += "\n(*) sequence values (hop-by-hop and end-to-end), Session-Id and Subscription-Id avps, are mirrored"; result += "\n to the peer which sent the request. If user wants to test a specific answer without changing it,"; - result += "\n use sendxml/sendhex operations better than programming."; + result += "\n use sendxml<2e/2c>/sendhex<2e/2c> operations better than programming."; result += "\n"; result += "\nBalance ('--balance' command line parameter) could be used to forward server socket receptions through"; result += "\n entity servers by mean a round-robin algorithm. Both diameter server socket and entity targets should"; @@ -992,6 +1080,12 @@ std::string Launcher::help() const throw() { result += "\n"; result += "\n------------------------------------------------------------------------------------------- Burst tests"; result += "\n"; + result += "\nIn order to simplify user experience, burst category operations are only allowed in single realm node"; + result += "\n configuration. Indeed, you could send messages with incorrect Origin-Realm, and no warning is shown."; + result += "\nAll the operations are performed through the unique realm: if you need to use more interfaces, you may"; + result += "\n launch different ADML instances. Is nonsense to allow burst in a multi-realm configured ADML, because"; + result += "\n this feature is not able to coordinate the messages."; + result += "\n"; result += "\nburst|[|parameter] Used for performance testing, we first program diameter requests"; result += "\n messages in order to launch them from client side to the configured"; result += "\n diameter entity. We could start the burst with an initial load"; @@ -1030,7 +1124,9 @@ std::string Launcher::help() const throw() { result += "\n Adds a new step to the test case with provided identifier. If provided identifier"; result += "\n is not registered yet, a new test case will be created with that value and the"; result += "\n step will be added as the first. For a specific 'id', the steps are stored in"; - result += "\n order as they are programmed"; + result += "\n order as they are programmed. Check possible runtime exceptions when adding a"; + result += "\n new step because those which fail, will be ignored/skipped during test case"; + result += "\n programming giving an incomplete sequence invalid for the testing purpose."; result += "\n"; result += "\n : integer number, normally monotonically increased for each test case. Some external"; result += "\n script/procedure shall clone a test case template in order to build a collection"; @@ -1067,17 +1163,35 @@ std::string Launcher::help() const throw() { result += "\n"; result += "\n delay| Blocking step until the time lapse expires. Useful to give "; result += "\n some cadence control and time schedule for a specific case."; + result += "\n A value of 0 could be used as a dummy step."; result += "\n wait| Blocking step until condition is fulfilled. The message could"; result += "\n received from entity (waitfe) or from client (waitfc)."; result += "\n"; result += "\n wait-regexp|"; - result += "\n Wait condition, from entity (waitfe-regexp) or client (waitfc-regexp)"; + result += "\n Wait condition, from entity (waitfe-regexp) or client (waitfc-regexp)"; result += "\n to match the serialized xml content for received messages. CPU cost"; result += "\n is bigger than the former ones because the whole message must be"; result += "\n decoded and converted to xml instead of doing a direct hexadecimal"; result += "\n buffer search. The main advantage is the great flexibility to identify"; result += "\n any content with a regular expression."; result += "\n"; + result += "\n sh-command|