fix drivers GetUrl to build propper IPv6 addr

Signed-off-by: Vladimir Varankin <nek.narqo+git@gmail.com>
This commit is contained in:
Vladimir Varankin 2015-11-13 12:52:12 +03:00
parent b153a9c218
commit 04b3fd1146
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package openstack
import (
"fmt"
"io/ioutil"
"net"
"strings"
"time"
@ -269,7 +270,7 @@ func (d *Driver) GetURL() (string, error) {
if ip == "" {
return "", nil
}
return fmt.Sprintf("tcp://%s:2376", ip), nil
return fmt.Sprintf("tcp://%s", net.JoinHostPort(ip, "2376")), nil
}
func (d *Driver) GetIP() (string, error) {