Browse Source

fix drivers GetUrl to build propper IPv6 addr

Signed-off-by: Vladimir Varankin <nek.narqo+git@gmail.com>
Vladimir Varankin 3 years ago
parent
commit
04b3fd1146
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      drivers/openstack/openstack.go

+ 2
- 1
drivers/openstack/openstack.go View File

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

Loading…
Cancel
Save