Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added mwan apis #7

Merged
merged 14 commits into from
Sep 29, 2023
Merged

feat: added mwan apis #7

merged 14 commits into from
Sep 29, 2023

Conversation

Tbaile
Copy link
Contributor

@Tbaile Tbaile commented Sep 20, 2023

Adding creation APIs for MWAN

@Tbaile
Copy link
Contributor Author

Tbaile commented Sep 20, 2023

Might need additional help here @gsanchietti
Right now the API just automates the creation process of every part of a MWAN (interfaces, members, policy), however there's no validation whatsoever, how much we want to validate the data?

@gsanchietti
Copy link
Member

how much we want to validate the data?

I'd say we should validate all data that can breaks the software.
We can ignore that data that generates and invalid configuration but do not stop the service.

@Tbaile
Copy link
Contributor Author

Tbaile commented Sep 21, 2023

The only thing that breaks everything is when there's a configuration with the same name as something else. This is extremely dangerous with rules and policies.
Then the only validation step that will be added is:

  • roles and policies must have unique names

src/nethsec/mwan/__init__.py Outdated Show resolved Hide resolved
src/nethsec/mwan/__init__.py Outdated Show resolved Hide resolved
src/nethsec/mwan/__init__.py Outdated Show resolved Hide resolved
src/nethsec/mwan/__init__.py Outdated Show resolved Hide resolved
src/nethsec/mwan/__init__.py Outdated Show resolved Hide resolved
src/nethsec/mwan/__init__.py Show resolved Hide resolved
src/nethsec/mwan/__init__.py Outdated Show resolved Hide resolved
src/nethsec/mwan/__init__.py Outdated Show resolved Hide resolved
src/nethsec/mwan/__init__.py Outdated Show resolved Hide resolved
src/nethsec/mwan/__init__.py Outdated Show resolved Hide resolved
@Tbaile Tbaile force-pushed the mwan_api branch 2 times, most recently from 9e5fbd1 to bb6030b Compare September 29, 2023 09:52
@Tbaile Tbaile requested a review from gsanchietti September 29, 2023 09:52
Copy link
Member

@gsanchietti gsanchietti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there!

I do not expect much performance gain, but transforming a call complexity from O(N) to O(1) is always a good thing!

src/nethsec/mwan/__init__.py Outdated Show resolved Hide resolved
src/nethsec/mwan/__init__.py Outdated Show resolved Hide resolved
src/nethsec/mwan/__init__.py Outdated Show resolved Hide resolved
@Tbaile Tbaile merged commit ad43a67 into main Sep 29, 2023
3 checks passed
@gsanchietti gsanchietti deleted the mwan_api branch June 18, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants