mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
feat(region,host-deployer): ipv6 only guest support (#22897)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user