kytos-ng / sdntrace_cp

MIT License
1 stars 6 forks source link

Check that empty list of traces is not returned in `PUT /traces` #74

Closed gretelliz closed 1 year ago

gretelliz commented 1 year ago

Currently, PUT /traces can return an empty list of traces per switch. This can lead to errors in cases where it is expected that there will be a default item in the trace list. For example, in mef_eline.

Example with a ring topology:

curl -H 'Content-type: application/json' -X PUT http://127.0.0.1:8181/api/amlight/sdntrace_cp/traces -d '[{"trace": {"switch": {"dpid": "00:00:00:00:00:00:00:01", "in_port": 2}, "eth": {"dl_type": 33024, "dl_vlan": 777}}}]'

Response:

{"00:00:00:00:00:00:00:01":[[]]}