@@ -0,0 +1,1285 @@
+#!/usr/bin/env python%0A%0Aimport argparse%0Aimport os%0Aimport sys%0A%0Asys.path.append(os.path.join(os.path.dirname(__file__), %22..%22))%0Aimport sts.replay_event as replay_events%0Afrom sts.dataplane_traces.trace import Trace%0Afrom sts.input_traces.input_logger import InputLogger%0Afrom sts.log_processing.superlog_parser import parse%0A%0Aparser = argparse.ArgumentParser()%0Aparser.add_argument('input', metavar=%22INPUT%22,%0A                    help='The input json file to be printed')%0Aparser.add_argument('-d', '--dp-trace-path', dest=%22dp_trace_path%22, default=None,%0A                    help='''Optional path to the dataplane trace file. '''%0A                         ''' Default: %60dirname%60/dataplane.trace ''')%0Aargs = parser.parse_args()%0A%0Adef main(args):%0A  if args.dp_trace_path is None:%0A    args.dp_trace_path = os.path.dirname(args.input) + %22/dataplane.trace%22%0A%0A  dp_trace = Trace(args.dp_trace_path).dataplane_trace%0A%0A  event_logger = InputLogger(output_path=%22/tmp/events.trace%22)%0A  event_logger.open()%0A%0A  with open(args.input) as input_file:%0A    trace = parse(input_file)%0A    for event in trace:%0A      if type(event) == replay_events.TrafficInjection:%0A        event.dp_event = dp_trace.pop(0)%0A      event_logger.log_input_event(event)%0A%0A    event_logger.output.close()%0A%0Aif __name__ == '__main__':%0A  main(args)%0A

Add tool for removing need for TrafficInjection backwards compatibility