-
Notifications
You must be signed in to change notification settings - Fork 66
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
Refactor CIDR manipulation code from globalnet to cidr module #3212
Conversation
🤖 Created branch: z_pr3212/tpantelis/refactor_gn_cidr |
6db5d91
to
f39a8e0
Compare
...for reuse. Signed-off-by: Tom Pantelis <[email protected]>
f39a8e0
to
1c0d40e
Compare
Signed-off-by: Tom Pantelis <[email protected]>
1c0d40e
to
e8ef513
Compare
binary.BigEndian.PutUint32(netIP, ip) | ||
|
||
return netIP | ||
return cidr.Allocate(&globalnetInfo.Info) //nolint:wrapcheck // No need to wrap | ||
} | ||
|
||
func GetValidClusterSize(cidrRange string, clusterSize uint) (uint, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can also move to cidr/cidr.go as this will also get reused in clusersetip. But I can do that as part of my changes to add clustersetip code. I'd rather have this merged first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't move this b/c I didn't think we were going to make cluster/allocation size configurable for clustersetip.
🤖 Closed branches: [z_pr3212/tpantelis/refactor_gn_cidr] |
...for reuse with the clusterset IP functionality.