kytos-ng / flow_manager

Kytos NApp that manages OpenFlow 1.3 entries
https://kytos-ng.github.io/api/flow_manager.html
MIT License
0 stars 7 forks source link

DB script to fix flows collection `id` and `_id` (`match_id`) #189

Closed viniarck closed 4 months ago

viniarck commented 4 months ago

Summary

See updated changelog file

Local Tests

Before:

rs0 [direct: primary] napps> db.flows.countDocuments({"state": "installed"})
3209

After:

rs0 [direct: primary] napps> db.flows.countDocuments({"state": "installed"})
3209
❯ echo '{ "trace": { "switch": { "dpid": "00:00:00:00:00:00:00:01", "in_port": 1}, "eth": {"dl_type": 2048, "dl_vlan": 1}, "ip": { "nw_proto": 6 } } }' | http PUT http://127.0.0.1:8181/a
pi/amlight/sdntrace_cp/v1/trace 
HTTP/1.1 200 OK
content-length: 248
content-type: application/json
date: Wed, 10 Jul 2024 21:21:35 GMT
server: uvicorn

{
    "result": [
        {
            "dpid": "00:00:00:00:00:00:00:01",
            "port": 1,
            "time": "2024-07-10 18:21:35.948679",
            "type": "starting",
            "vlan": 1
        },
        {
            "dpid": "00:00:00:00:00:00:00:03",
            "out": {
                "port": 1,
                "vlan": 1
            },
            "port": 3,
            "time": "2024-07-10 18:21:35.948716",
            "type": "last",
            "vlan": 6
        }
    ]
}

End-to-End Tests

N/A