Closed gretelliz closed 1 year ago
Closes #64
Add v1 on /trace and /traces.
v1
/trace
/traces
I made sure that GET /traces and GET /trace work well:
GET /traces
GET /trace
curl -H 'Content-type: application/json' -X PUT http://127.0.0.1:8181/api/amlight/sdntrace_cp/v1/trace -d '{"trace": {"switch": {"dpid": "00:00:00:00:00:00:00:01","in_port": 1}}}'
{"result":[{"dpid":"00:00:00:00:00:00:00:01","port":1,"time":"2023-04-11 19:16:42.264349","type":"starting"},{"dpid":"00:00:00:00:00:00:00:02","out":null,"port":2,"time":"2023-04-11 19:16:42.264406","type":"incomplete"}]}
curl -H 'Content-type: application/json' -X PUT http://127.0.0.1:8181/api/amlight/sdntrace_cp/v1/traces -d '[{"trace": {"switch": {"dpid": "00:00:00:00:00:00:00:01","in_port": 1}}}]'
{"result":[[{"dpid":"00:00:00:00:00:00:00:01","port":1,"time":"2023-04-11 19:17:02.650791","type":"starting"},{"dpid":"00:00:00:00:00:00:00:02","out":null,"port":2,"time":"2023-04-11 19:17:02.650848","type":"incomplete"}]]}
Refactoring ...
@viniarck, Thank you.
Closes #64
Summary
Add
v1
on/trace
and/traces
.Local Tests
I made sure that
GET /traces
andGET /trace
work well:End-to-End Tests
Refactoring ...