feat(region,host-deployer): ipv6 only guest support (#22897)

This commit is contained in:
wanyaoqi
2025-07-15 16:21:49 +08:00
committed by GitHub
parent a071cd2287
commit 42e58b4996
24 changed files with 503 additions and 133 deletions
@@ -23,6 +23,7 @@ const (
ErrServerTypeIsNotMatch = `server type is not match`
ErrExitIsNotMatch = `exit is not match`
ErrWireIsNotMatch = `wire is not match`
ErrNotSupportIpv6 = `not support ipv6`
ErrNoPorts = `no ports`
ErrNotOwner = `not owner`
@@ -186,6 +186,12 @@ func IsNetworkAvailable(
exit := req.Exit
wire := req.Wire
if req.RequireIPv6 && !n.IsSupportIPv6() {
return FailReason{
Reason: fmt.Sprintf("%v(%v): %s", n.Name, n.Id, ErrNotSupportIpv6),
}
}
isMatchServerType := func(network *models.SNetwork) bool {
return computeapi.IsInNetworkTypes(network.ServerType, netTypes)
}