From fbc895e92d2582d9ca7e2d4e1d840be5a9ebe31b Mon Sep 17 00:00:00 2001 From: Christophe Jauffret Date: Sat, 25 Dec 2021 17:24:33 +0100 Subject: [PATCH 1/4] fix subnetFilter --- machine/driver/driver.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/machine/driver/driver.go b/machine/driver/driver.go index 9b18cde..ea2c9f2 100755 --- a/machine/driver/driver.go +++ b/machine/driver/driver.go @@ -6,6 +6,7 @@ import ( "fmt" "io/ioutil" "net" + "net/url" "strings" "time" @@ -131,7 +132,9 @@ func (d *NutanixDriver) Create() error { subnetFilter += "," } - subnetFilter += fmt.Sprintf("name==%s", subnet) + t := &url.URL{Path: subnet} + encodedSubnet := t.String() + subnetFilter += fmt.Sprintf("name==%s", encodedSubnet) } subnets, err := conn.V3.ListAllSubnet(subnetFilter) From fbac06fb815c09d0013527b9687ff8a597f7fa33 Mon Sep 17 00:00:00 2001 From: Christophe Jauffret Date: Sat, 25 Dec 2021 17:30:07 +0100 Subject: [PATCH 2/4] fix imageFilter --- machine/driver/driver.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/machine/driver/driver.go b/machine/driver/driver.go index ea2c9f2..f6694ce 100755 --- a/machine/driver/driver.go +++ b/machine/driver/driver.go @@ -184,7 +184,9 @@ func (d *NutanixDriver) Create() error { } // Search image template - imageFilter := fmt.Sprintf("name==%s", d.Image) + i := &url.URL{Path: d.Image} + encodedImage := i.String() + imageFilter := fmt.Sprintf("name==%s", encodedImage) images, err := conn.V3.ListAllImage(imageFilter) if err != nil { log.Errorf("Error getting images: [%v]", err) From aeffc293cf16deaa2f066e02b6098a45df1325e5 Mon Sep 17 00:00:00 2001 From: Christophe Jauffret Date: Sat, 25 Dec 2021 17:31:13 +0100 Subject: [PATCH 3/4] fix clusterFilter --- machine/driver/driver.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/machine/driver/driver.go b/machine/driver/driver.go index f6694ce..1fbb830 100755 --- a/machine/driver/driver.go +++ b/machine/driver/driver.go @@ -102,7 +102,9 @@ func (d *NutanixDriver) Create() error { } // Search target cluster - clusterFilter := fmt.Sprintf("name==%s", d.Cluster) + c := &url.URL{Path: d.Cluster} + encodedCluster := c.String() + clusterFilter := fmt.Sprintf("name==%s", encodedCluster) clusters, err := conn.V3.ListAllCluster(clusterFilter) if err != nil { log.Errorf("Error getting clusters: [%v]", err) From 52e349b9d9e1cc65fa8424a15c0f42118ae53b2f Mon Sep 17 00:00:00 2001 From: Christophe Jauffret Date: Sat, 25 Dec 2021 17:46:33 +0100 Subject: [PATCH 4/4] update version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 76acda6..e75ac39 100755 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ If you want to use Nutanix Node Driver, you need add it in order to start using 2. Click *Add Node Driver*. 3. Complete the Add Node Driver form. Then click Create. - - *Download URL*: `https://github.com/nutanix/docker-machine/releases/download/v3.0.0/docker-machine-driver-nutanix_v3.0.0_linux` + - *Download URL*: `https://github.com/nutanix/docker-machine/releases/download/v3.0.1/docker-machine-driver-nutanix_v3.0.1_linux` - *Custom UI URL*: `https://nutanix.github.io/rancher-ui-driver/v3.0.0/component.js` - *Whitelist Domains*: `nutanix.github.io`