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

Added request to install flows by switch #205

Closed Alopalao closed 1 month ago

Alopalao commented 1 month ago

Closes #202

Summary

This is a draft, implementation may change

Local Tests

Tried with these request:

{
    "00:00:00:00:00:00:00:03": {
        "flows": [{"match": {"in_port": 3, "dl_vlan": 1}, "cookie": 12297829382473034410, "actions": [{"action_type": "set_vlan", "vlan_id": 1}, {"action_type": "output", "port": 2}], "owner": "mef_eline", "table_group": "evpl", "table_id": 0, "priority": 20000}, {"match": {"in_port": 2, "dl_vlan": 1}, "cookie": 12297829382473034410, "actions": [{"action_type": "set_vlan", "vlan_id": 1}, {"action_type": "output", "port": 3}], "owner": "mef_eline", "table_group": "evpl", "table_id": 0, "priority": 20000}],
        "force": true
    },
    "00:00:00:00:00:00:00:02": {
        "flows": [{"match": {"in_port": 3, "dl_vlan": 1}, "cookie": 12297829382473034410, "actions": [{"action_type": "set_vlan", "vlan_id": 1}, {"action_type": "output", "port": 2}], "owner": "mef_eline", "table_group": "evpl", "table_id": 0, "priority": 20000}, {"match": {"in_port": 2, "dl_vlan": 1}, "cookie": 12297829382473034410, "actions": [{"action_type": "set_vlan", "vlan_id": 1}, {"action_type": "output", "port": 3}], "owner": "mef_eline", "table_group": "evpl", "table_id": 0, "priority": 20000}],
        "force": true
    },
    "00:00:00:00:00:00:00:04": {
        "flows": [{"match": {"in_port": 1, "dl_vlan": 123}, "cookie": 12297829382473034410, "actions": [{"action_type": "push_vlan", "tag_type": "s"}, {"action_type": "set_vlan", "vlan_id": 1}, {"action_type": "output", "port": 2}], "owner": "mef_eline", "table_group": "evpl", "table_id": 0, "priority": 20000}, {"match": {"in_port": 2, "dl_vlan": 1}, "cookie": 12297829382473034410, "actions": [{"action_type": "pop_vlan"}, {"action_type": "output", "port": 1}], "owner": "mef_eline", "table_group": "evpl", "table_id": 0, "priority": 20000}],
        "force": true
    },
    "00:00:00:00:00:00:00:01": {
        "flows": [{"match": {"in_port": 1, "dl_vlan": 123}, "cookie": 12297829382473034410, "actions": [{"action_type": "push_vlan", "tag_type": "s"}, {"action_type": "set_vlan", "vlan_id": 1}, {"action_type": "output", "port": 3}], "owner": "mef_eline", "table_group": "evpl", "table_id": 0, "priority": 20000}, {"match": {"in_port": 3, "dl_vlan": 1}, "cookie": 12297829382473034410, "actions": [{"action_type": "pop_vlan"}, {"action_type": "output", "port": 1}], "owner": "mef_eline", "table_group": "evpl", "table_id": 0, "priority": 20000}],
        "force": true
    }
}

End-to-End Tests

TBA

Alopalao commented 1 month ago

Creating another PR covering this.