Support IPv6 access address for Openstack
We still prefer the IPv4 address, but if there is an IPv6 address and no IPv4 address, use IPv6.
This commit is contained in:
parent
d8b048662f
commit
27dd2aa30f
|
@ -19,6 +19,9 @@ func SSHAddress(csp gophercloud.CloudServersProvider, port int) func(multistep.S
|
|||
if s.AccessIPv4 != "" {
|
||||
return fmt.Sprintf("%s:%d", s.AccessIPv4, port), nil
|
||||
}
|
||||
if s.AccessIPv6 != "" {
|
||||
return fmt.Sprintf("[%s]:%d", s.AccessIPv6, port), nil
|
||||
}
|
||||
serverState, err := csp.ServerById(s.Id)
|
||||
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue