Merge pull request #2451 from monsterzz/b-openstack-ipv6-ssh-support
Fix handling IPv6 when ssh_interface set (openstack builder)
This commit is contained in:
commit
5cd6e19467
|
@ -105,11 +105,15 @@ func sshAddrFromPool(s *servers.Server, desired string) string {
|
|||
if address["OS-EXT-IPS:type"] == "floating" {
|
||||
addr = address["addr"].(string)
|
||||
} else {
|
||||
if address["version"].(float64) == 4 {
|
||||
if address["version"].(float64) == 6 {
|
||||
addr = fmt.Sprintf("[%s]", address["addr"].(string))
|
||||
} else {
|
||||
addr = address["addr"].(string)
|
||||
}
|
||||
}
|
||||
|
||||
if addr != "" {
|
||||
log.Printf("[DEBUG] Detected address: %s", addr)
|
||||
return addr
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue