kytos-ng / sdntrace_cp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

gretelliz opened this issue · comments

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":[[]]}