atlanticwave-sdx / kytos-sdx

MIT License
0 stars 3 forks source link

sanitize port name before converting the topology #79

Closed italovalcy closed 1 day ago

italovalcy commented 5 days ago
2024-11-15 08:41:17,002 - ERROR [kytos.napps.kytos/sdx] [main.py:388:post_topology_to_sdxlc] (AnyIO worker thread) Failed to send topoloty to SDX-LC: {
  "detail": "'MON FOR-LAN-SW02 et-0/0/2 -- F' does not match '^[A-Za-z0-9_.,/-]*$' - 'nodes.0.ports.0.name'",
  "status": 400,
  "title": "Bad Request",
  "type": "about:blank"
}
 - Traceback: Traceback (most recent call last):,   File "//var/lib/kytos/napps/kytos/sdx/main.py", line 384, in post_topology_to_sdxlc,     assert response.status_code == 200, response.text, AssertionError: {,   "detail": "'MON FOR-LAN-SW02 et-0/0/2 -- F' does not match '^[A-Za-z0-9_.,/-]*$' - 'nodes.0.ports.0.name'",,   "status": 400,,   "title": "Bad Request",,   "type": "about:blank", }, ,