2026-05-15 14:23:09 -07:00
|
|
|
const BASE = '/traffic/api'
|
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
|
|
|
|
|
|
|
|
async function req(method, path, body) {
|
|
|
|
|
const opts = { method, headers: { 'Content-Type': 'application/json' } }
|
|
|
|
|
if (body) opts.body = JSON.stringify(body)
|
|
|
|
|
const r = await fetch(BASE + path, opts)
|
|
|
|
|
if (!r.ok) throw new Error(`${method} ${path} -> ${r.status}`)
|
|
|
|
|
return r.json()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const api = {
|
|
|
|
|
health: () => req('GET', '/healthz'),
|
|
|
|
|
interfaces: () => req('GET', '/interfaces'),
|
|
|
|
|
mode: () => req('GET', '/mode'),
|
2026-05-15 14:23:09 -07:00
|
|
|
setMode: (mode) => req('POST', '/mode', { mode }),
|
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
|
|
|
|
|
|
|
|
// Flows
|
|
|
|
|
flows: () => req('GET', '/flows'),
|
|
|
|
|
createFlow: (f) => req('POST', '/flows', f),
|
|
|
|
|
getFlow: (id) => req('GET', `/flows/${id}`),
|
|
|
|
|
updateFlow: (id, f) => req('PUT', `/flows/${id}`, f),
|
|
|
|
|
deleteFlow: (id) => req('DELETE', `/flows/${id}`),
|
|
|
|
|
startFlow: (id) => req('POST', `/flows/${id}/start`),
|
|
|
|
|
stopFlow: (id) => req('POST', `/flows/${id}/stop`),
|
|
|
|
|
flowStats: (id) => req('GET', `/flows/${id}/stats`),
|
|
|
|
|
|
|
|
|
|
// Tests
|
|
|
|
|
tests: () => req('GET', '/tests'),
|
|
|
|
|
createTest: (t) => req('POST', '/tests', t),
|
|
|
|
|
getTest: (id) => req('GET', `/tests/${id}`),
|
|
|
|
|
startTest: (id) => req('POST', `/tests/${id}/start`),
|
|
|
|
|
stopTest: (id) => req('POST', `/tests/${id}/stop`),
|
|
|
|
|
testResults: (id) => req('GET', `/tests/${id}/results`),
|
|
|
|
|
|
|
|
|
|
// Presets
|
|
|
|
|
presets: () => req('GET', '/presets'),
|
|
|
|
|
loadPreset: (name, overrides) => req('POST', `/presets/${name}`, overrides),
|
|
|
|
|
|
|
|
|
|
// Stats
|
|
|
|
|
statsHistory: () => req('GET', '/stats/history'),
|
|
|
|
|
|
2026-05-15 14:23:09 -07:00
|
|
|
// Ping
|
|
|
|
|
ping: (target, count) => req('POST', '/ping', { target, count: count || 5 }),
|
|
|
|
|
|
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
|
|
|
// Responder
|
|
|
|
|
responderStats: () => req('GET', '/responder/stats'),
|
|
|
|
|
responderReset: () => req('POST', '/responder/reset'),
|
|
|
|
|
}
|