create_diameter_packets_from_log_file.py

This script reads Diameter Gateway packet log entries from a log file and creates a Python script that resends the Diameter packets to MATRIXX Engine. It also creates a script that verifies that the Diameter Gateway responses are the same as those in the input log file. This script is useful for verifying that diameter packets are processed correctly or for recreating an issue with processing.

Syntax

create_diameter_packets_from_log_file.py -h | -a | -d | -i input_log_file | -o outfile | -s skip_list | -u

Options

-h
Displays help information for this script.
-a, --answers_only
If specified, only Diameter Answer packets are processed. The default is to process all packets.
-d
Runs the script in debug mode. If this option is specified, more messages are returned to assist in debugging.
-i input_log_file
Identifies the log file that has the Diameter Gateway packet log entries.
-o outfile, --outfile=outfile
Specifies the output Python filename. For example, create_test_packets.py. The default is create_and_send_packets.py.
-r, --requests_only
If specified, only Diameter Request packets are processed. The default is that all packets are processed.
-s skip_list, --skip_list=skip_list
Specifies a list of comma-separated numeric values (Diameter command values) to skip. For example, to skip the Device-Watchdog packets, then enter 280. To skip the Capabilities-Exchange packets, then enter 257. To skip both, enter "280, 257".
-u, --unit_test
If specified, the output is formatted to be able to be copied into a unit test script which can verify the results from a Diameter Request matches the Diameter Answer in the log.