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

use go-ipam with ipv6 support #152

Draft
wants to merge 43 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
dbcab7c
use go-ipam with ipv6 support
majst01 Jan 1, 2021
baee168
disable actually unused var
majst01 Jan 1, 2021
adbf0a4
update go-ipam
majst01 Jan 1, 2021
c7a1b4b
Adopt to latest available prefix calculation in go-ipam
majst01 Jan 6, 2021
f91ebb0
Some simple ipv6 tests
majst01 Jan 6, 2021
cd215e3
Update go-ipam
majst01 Jan 12, 2021
fe5a998
Adopt spec
majst01 Jan 12, 2021
0d61326
update to latest go-ipam ipv6 branch
majst01 Jan 13, 2021
a4e5ac0
Merge branch 'master' of https://github.com/metal-stack/metal-api int…
majst01 Jan 14, 2021
1ba03f0
fixate to tagged go-ipam
majst01 Jan 14, 2021
d00a27a
calculate network usage again
majst01 Jan 15, 2021
7bf550f
Merge master
majst01 Jan 21, 2021
7c4c91f
make child prefix acquire work for ipv6
majst01 Jan 21, 2021
19c163e
make child prefix acquire work for ipv6
majst01 Jan 21, 2021
16e8a11
debug usage
majst01 Jan 21, 2021
f4dd5cb
debug usage
majst01 Jan 21, 2021
68d3bdc
Debug usage
majst01 Jan 21, 2021
5cf6fd5
Fix prefix usage
majst01 Jan 22, 2021
6fe14d8
Fix prefix usage
majst01 Jan 22, 2021
c6e4cae
Forgot to add one struct member
majst01 Jan 22, 2021
ab72e96
Keep rest-api compatible with existing metalctl versions
majst01 Jan 27, 2021
1945032
Move childprefixlength to the privatesuper network
majst01 Jan 27, 2021
db5a43c
Merge branch 'master' of https://github.com/metal-stack/metal-api int…
majst01 Jan 27, 2021
ab0a080
migrate partition.privatenetworklength to network.childprefixlength
majst01 Jan 27, 2021
fd5da95
all prefixes must be of the same addressfamily and childprefixlenth m…
majst01 Jan 27, 2021
92d11e6
Set childprefixlength
majst01 Jan 27, 2021
a51faad
updates
majst01 Jan 27, 2021
50b0bb7
Better migration
majst01 Jan 27, 2021
5a1bcbe
Allow two supernetworks with distinct addressfamilies per partition, …
majst01 Jan 28, 2021
5158c5c
allow child prefix length to be specified during network allocate
majst01 Jan 28, 2021
4a204d5
childprefix is optional and must be greater than prefix length
majst01 Jan 28, 2021
2fed155
cannot cast strings to a addressfamily
majst01 Jan 28, 2021
56c6ddf
Debug
majst01 Jan 28, 2021
078ea3b
ensure supernetwork has childprefixlength specified
majst01 Jan 28, 2021
bd93719
typo
majst01 Jan 28, 2021
25271f7
Merge branch 'master' of https://github.com/metal-stack/metal-api int…
majst01 Jan 29, 2021
5d4d3ba
update go-ipam
majst01 Feb 1, 2021
f7d9121
Use go-ipam v1.8.1
majst01 Feb 1, 2021
40e8997
Merge branch 'master' of https://github.com/metal-stack/metal-api int…
majst01 Feb 4, 2021
dfd1ffb
More tests
majst01 Feb 5, 2021
6e69d4f
Uuups
majst01 Feb 5, 2021
5bc7f3b
Merge branch 'master' of https://github.com/metal-stack/metal-api int…
majst01 Feb 8, 2021
c230107
Updates
majst01 Feb 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
childprefix is optional and must be greater than prefix length
  • Loading branch information
majst01 committed Jan 28, 2021
commit 4a204d5a118cdc08ae84a37a18e4f491a6875201
4 changes: 2 additions & 2 deletions cmd/metal-api/internal/service/network-service.go
Original file line number Diff line number Diff line change
@@ -416,8 +416,8 @@ func (r networkResource) createNetwork(request *restful.Request, response *restf
return
}
}
if cpl >= ipprefix.Bits {
if checkError(request, response, utils.CurrentFuncName(), fmt.Errorf("given childprefixlength %d is not smaller than prefix length of:%s", cpl, p.String())) {
if cpl <= ipprefix.Bits {
if checkError(request, response, utils.CurrentFuncName(), fmt.Errorf("given childprefixlength %d is not greater than prefix length of:%s", cpl, p.String())) {
return
}
}
2 changes: 1 addition & 1 deletion cmd/metal-api/internal/service/v1/network.go
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ type NetworkImmutable struct {
DestinationPrefixes []string `json:"destinationprefixes" modelDescription:"prefixes that are reachable within this network" description:"the destination prefixes of this network"`
Nat bool `json:"nat" description:"if set to true, packets leaving this network get masqueraded behind interface ip"`
PrivateSuper bool `json:"privatesuper" description:"if set to true, this network will serve as a partition's super network for the internal machine networks,there can only be one privatesuper network per partition"`
ChildPrefixLength *uint8 `json:"childprefixlength" description:"if privatesuper, this defines the bitlen of child prefixes if not nil"`
ChildPrefixLength *uint8 `json:"childprefixlength" description:"if privatesuper, this defines the bitlen of child prefixes if not nil" optional:"true"`
Underlay bool `json:"underlay" description:"if set to true, this network can be used for underlay communication"`
Vrf *uint `json:"vrf" description:"the vrf this network is associated with" optional:"true"`
VrfShared *bool `json:"vrfshared" description:"if set to true, given vrf can be used by multiple networks, which is sometimes useful for network partioning (default: false)" optional:"true"`
2 changes: 0 additions & 2 deletions spec/metal-api.json
Original file line number Diff line number Diff line change
@@ -2115,7 +2115,6 @@
}
},
"required": [
"childprefixlength",
"destinationprefixes",
"id",
"nat",
@@ -2270,7 +2269,6 @@
}
},
"required": [
"childprefixlength",
"destinationprefixes",
"id",
"nat",