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

Improve port code readability #431

Merged
merged 1 commit into from
Nov 17, 2023
Merged

Conversation

PlagueCZ
Copy link
Contributor

@PlagueCZ PlagueCZ commented Nov 15, 2023

Refactoring to improve port-related code readability:

  1. Renamed port getters to use in and out everywhere.
  2. Moved the MAC addresses out of the old vm field
  3. Renamed all places that used vm to use iface
  4. Renamed info to cfg

I think this should be squashed at the end, but for review it is best to go commit-by commit, otherwise it gets messy.

I also renamed a few fields and function in NAT to reflect the gRPC naming, i.e. VIP/NAT, whereas the code often uses "nat" and "netnat". This change is not perfect and maybe there are more changes that you can suggest, I just did not want to make a PR that touches thousands of lines.

@PlagueCZ PlagueCZ marked this pull request as draft November 15, 2023 16:24
@github-actions github-actions bot added enhancement New feature or request size/L labels Nov 15, 2023
@PlagueCZ PlagueCZ changed the title Feature/improve port code readability Improve port code readability Nov 15, 2023
@PlagueCZ PlagueCZ force-pushed the feature/improve_port_code_readability branch from ec30bf5 to a7e25db Compare November 16, 2023 14:48
@github-actions github-actions bot added size/XL and removed size/L labels Nov 16, 2023
@PlagueCZ PlagueCZ force-pushed the feature/improve_port_code_readability branch from dfa3afc to a047dc0 Compare November 16, 2023 16:24
@PlagueCZ PlagueCZ force-pushed the feature/improve_port_code_readability branch from 22da27c to 3a31bc3 Compare November 17, 2023 11:42
@PlagueCZ PlagueCZ marked this pull request as ready for review November 17, 2023 11:42
Copy link
Collaborator

@guvenc guvenc left a comment

Choose a reason for hiding this comment

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

Thanks. This looks good to me.
Changing the name "vm" in the codebase to "interface" was long due.

@guvenc
Copy link
Collaborator

guvenc commented Nov 17, 2023

@PlagueCZ
Could you please squash so that I can merge ?

@PlagueCZ PlagueCZ closed this Nov 17, 2023
@PlagueCZ PlagueCZ force-pushed the feature/improve_port_code_readability branch from 3a31bc3 to bb98604 Compare November 17, 2023 14:09
@github-actions github-actions bot added size/XS and removed size/XL labels Nov 17, 2023
@PlagueCZ PlagueCZ reopened this Nov 17, 2023
@github-actions github-actions bot added size/XL and removed size/XS labels Nov 17, 2023
@guvenc guvenc merged commit 0edfa8e into main Nov 17, 2023
13 checks passed
@guvenc guvenc deleted the feature/improve_port_code_readability branch November 17, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants