sam dcebf15bb3 Add Phase 4: gNMI streaming telemetry and traffic generator
- gNMI integration: NETCONF script to enable gRPC on all 9 routers,
  Telegraf container with gnmi input plugin, InfluxDB for time-series
  storage, 3 Grafana telemetry dashboards (utilization, errors, combined)
- Traffic generator: Scapy-based dual-mode container (sender/responder)
  with Flask API, RFC 2544 test suite (throughput, latency, frame-loss,
  back-to-back), Vue 3 web UI with flow builder, test runner, real-time
  stats monitor, and results export
- docker-compose.yml updated with influxdb, telegraf, traffic-gen,
  traffic-gen-ui services
- Full documentation in DOCS.md sections 15-16

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:29:44 -07:00

76 lines
2.0 KiB
Python

"""
Built-in test presets for the traffic generator.
"""
PRESETS = {
'quick_icmp': {
'description': 'Quick ICMP ping test to verify connectivity',
'flow': {
'protocol': 'icmp',
'frame_size': 64,
'rate_pps': 10,
'duration': 10,
},
},
'udp_flood_small': {
'description': 'UDP flood with 64-byte frames at 1000 pps',
'flow': {
'protocol': 'udp',
'dst_port': 5001,
'frame_size': 64,
'rate_pps': 1000,
'duration': 30,
},
},
'udp_flood_large': {
'description': 'UDP flood with 1518-byte frames at 500 pps',
'flow': {
'protocol': 'udp',
'dst_port': 5001,
'frame_size': 1518,
'rate_pps': 500,
'duration': 30,
},
},
'rfc2544_throughput': {
'description': 'RFC 2544 throughput test across standard frame sizes',
'flow': {
'protocol': 'udp',
'dst_port': 5001,
'frame_size': 64,
'rate_pps': 10000,
'duration': 60,
},
'test': {
'type': 'throughput',
'frame_sizes': [64, 128, 256, 512, 1024, 1280, 1518],
'trial_duration': 60,
'acceptable_loss_pct': 0.0,
},
},
'rfc2544_latency': {
'description': 'RFC 2544 latency test at moderate rate',
'flow': {
'protocol': 'icmp',
'frame_size': 64,
'rate_pps': 100,
'duration': 30,
},
'test': {
'type': 'latency',
'frame_sizes': [64, 512, 1518],
'trial_duration': 30,
},
},
'tcp_session': {
'description': 'TCP SYN flood at 100 pps (for testing ACL/firewall)',
'flow': {
'protocol': 'tcp',
'dst_port': 80,
'frame_size': 64,
'rate_pps': 100,
'duration': 30,
},
},
}