kytos-ng / sdntrace_cp

MIT License
1 stars 6 forks source link

Fix /traces endpoint in bulk mode #58

Closed gretelliz closed 1 year ago

gretelliz commented 1 year ago

Fix #57

Now, it is ok. See this example:

Request:

[
  {
    "trace": {
      "switch": {
        "dpid": "00:00:00:00:00:00:00:01",
        "in_port": 2
      },
      "eth": {
        "dl_vlan": 100
      }
    }
  },
  {
    "trace": {
      "switch": {
        "dpid": "00:00:00:00:00:00:00:01",
        "in_port": 2
      },
      "eth": {
        "dl_vlan": 101
      }
    }
  }
]

Result:

{
    "00:00:00:00:00:00:00:01": [
        [
            {
                "dpid": "00:00:00:00:00:00:00:01",
                "port": 2,
                "time": "2022-12-22 16:10:23.329829",
                "type": "starting",
                "vlan": 100
            }
        ],
        [
            {
                "dpid": "00:00:00:00:00:00:00:01",
                "port": 2,
                "time": "2022-12-22 16:10:23.329881",
                "type": "starting",
                "vlan": 101
            }
        ]
    ]
}