Skip to content

Commit

Permalink
Merge pull request #40 from kytos-ng/pacing/delete_owner
Browse files Browse the repository at this point in the history
Included the owner of the flow during delete operations
  • Loading branch information
viniarck authored Sep 5, 2024
2 parents 314fd57 + a1dd88d commit 43686b0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[UNRELEASED] - Under development
********************************

[2024.1.1] - 2024-08-04
***********************

Changed
=======
- Included ``owner`` attribute when deleting flows

[2024.1.0] - 2024-07-23
***********************

Expand Down
2 changes: 1 addition & 1 deletion kytos.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"username": "kytos",
"name": "of_multi_table",
"description": "This NApp implements Oplenflow multi tables",
"version": "2024.1.0",
"version": "2024.1.1",
"napp_dependencies": ["kytos/flow_manager", "kytos/of_core"],
"license": "MIT",
"tags": [],
Expand Down
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def get_flows_to_be_installed(self):
"cookie": flow["flow"].get("cookie"),
"cookie_mask": int(0xFFFFFFFFFFFFFFFF),
"table_id": flow["flow"]["table_id"],
"owner": owner,
}
if flow["flow"].get("match"):
delete["match"] = flow["flow"].get("match")
Expand Down Expand Up @@ -285,6 +286,7 @@ def delete_miss_flows(self, table_ids: Iterable[int]):
"cookie": cookie,
"cookie_mask": int(0xFFFFFFFFFFFFFFFF),
"table_id": table_id,
"owner": "of_multi_table",
}

delete_flows[switch].append(delete)
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,13 @@ async def test_delete_miss_flows(self, mock_send, mock_cookie):
"cookie": 999,
"cookie_mask": int(0xFFFFFFFFFFFFFFFF),
"table_id": 0,
"owner": "of_multi_table",
},
{
"cookie": 999,
"cookie_mask": int(0xFFFFFFFFFFFFFFFF),
"table_id": 2,
"owner": "of_multi_table",
},
]
}
Expand Down

0 comments on commit 43686b0

Please sign in to comment.