IPPool: fix missing support for CIDR #2982
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of this PR
Examples of user facing changes:
Which issue(s) this PR fixes:
Fixes #(issue-number)
WHAT
🤖 Generated by Copilot at 0558014
This pull request adds new features and tests for the IPPool and QoS functionalities of the kube-ovn project. It also improves the
ipam
package and theframework
package with new methods, functions, and imports. It updates some existing method calls and test cases to match the new changes. The affected files arepkg/internal/big_int.go
,pkg/ipam/ip_range_list.go
,pkg/ipam/ip_range.go
,test/e2e/framework/deployment.go
,test/e2e/framework/util.go
,test/e2e/kube-ovn/ipam/ipam.go
,test/unittest/ipam/ip_range_list.go
,test/unittest/ipam/ip_range.go
,pkg/ipam/ip.go
,test/e2e/framework/ippool.go
,test/e2e/framework/namespace.go
,test/e2e/framework/pod.go
,test/e2e/kube-ovn/qos/qos.go
, andtest/unittest/ipam/ip.go
.🤖 Generated by Copilot at 0558014
HOW
🤖 Generated by Copilot at 0558014
BigInt
type in theinternal
package to compare withint64
values and implement thefmt.Stringer
interface (link,link)NewIPRangeFromCIDR
to theipam
package to create anIPRange
value from a CIDR notation (link,link)NewIPRangeListFrom
in theipam
package to support CIDR notation and single IP addresses as inputs (link,link,link)Clone
to theIP
type in theipam
package to create a copy of theIP
value (link)Patch
andPatchSync
to theDeploymentClient
type in theframework
package to patch a deployment object using a merge patch and wait for its rollout status (link,link,link,link,link)RolloutStatus
to theDeploymentClient
type in theframework
package to wait for a deployment to be rolled out and get the updated deployment object (link)IPPoolClient
and its methods to theframework
package to create, update, delete, and validateIPPool
objects (link)NamespaceClient
and its methods to theframework
package to create, update, delete, and validateNamespace
objects (link)PatchPod
of thePodClient
type in theframework
package toPatch
to improve the naming consistency of the framework methods (link)RandomIPPool
in theframework
package to use a set instead of a slice for deduplication and randomization of the IP addresses (link,link)ipam
package in thetest/e2e/kube-ovn/ipam/ipam.go
file to test the IPPool feature of the kube-ovn project (link,link,link,link,link,link)qos
package in thetest/e2e/kube-ovn/qos/qos.go
file to use the new name of thePatch
method of thePodClient
type (link)ipv4ToUint32
to theipam
package in thetest/unittest/ipam/ip.go
file to convert IPv4 addresses touint32
values (link)ipam
package in thetest/unittest/ipam/ip_range.go
file to test theNewIPRangeFromCIDR
function with IPv4 and IPv6 addresses (link,link,link)ipam
package in thetest/unittest/ipam/ip_range_list.go
file to support the CIDR notation as an input and use the-
separator for IP ranges (link,link,link,link)