From bb132ca4e156f4ee6cadeab6807bb621dd7d10a7 Mon Sep 17 00:00:00 2001 From: mariobassem Date: Sun, 22 Dec 2024 19:23:51 +0200 Subject: [PATCH] upgrade tfgrid sdk go version --- griddriver/go.mod | 17 ++++++++++------- griddriver/go.sum | 34 ++++++++++++++++++---------------- griddriver/network.go | 14 ++++++++------ 3 files changed, 36 insertions(+), 29 deletions(-) diff --git a/griddriver/go.mod b/griddriver/go.mod index ff48df57b..fa6e6ac41 100644 --- a/griddriver/go.mod +++ b/griddriver/go.mod @@ -6,9 +6,9 @@ toolchain go1.21.0 require ( github.com/pkg/errors v0.9.1 - github.com/threefoldtech/tfchain/clients/tfchain-client-go v0.0.0-20240916164555-1c787e1918a2 - github.com/threefoldtech/tfgrid-sdk-go/grid-client v0.15.17 - github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.15.17 + github.com/threefoldtech/tfchain/clients/tfchain-client-go v0.0.0-20241127100051-77e684bcb1b2 + github.com/threefoldtech/tfgrid-sdk-go/grid-client v0.16.0 + github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.0 github.com/threefoldtech/zos v0.5.6-0.20240902110349-172a0a29a6ee github.com/urfave/cli v1.22.14 golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 @@ -18,6 +18,7 @@ require ( require ( github.com/cenkalti/backoff/v3 v3.2.2 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/gomodule/redigo v2.0.0+incompatible // indirect @@ -25,10 +26,11 @@ require ( github.com/gorilla/schema v1.4.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/threefoldtech/tfgrid-sdk-go/grid-proxy v0.15.16 // indirect + github.com/threefoldtech/tfgrid-sdk-go/grid-proxy v0.15.18 // indirect + github.com/threefoldtech/zos4 v0.5.6-0.20241008102757-02d898c580c4 // indirect github.com/vedhavyas/go-subkey v1.0.3 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect - golang.org/x/sync v0.8.0 // indirect + golang.org/x/sync v0.10.0 // indirect gonum.org/v1/gonum v0.15.0 // indirect google.golang.org/protobuf v1.34.1 // indirect ) @@ -55,7 +57,8 @@ require ( github.com/rs/cors v1.11.0 // indirect github.com/rs/zerolog v1.33.0 github.com/russross/blackfriday/v2 v2.1.0 // indirect - golang.org/x/crypto v0.26.0 // indirect - golang.org/x/sys v0.23.0 // indirect + golang.org/x/crypto v0.31.0 // indirect + golang.org/x/sys v0.28.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect ) + diff --git a/griddriver/go.sum b/griddriver/go.sum index b71075735..e0eef36f7 100644 --- a/griddriver/go.sum +++ b/griddriver/go.sum @@ -12,6 +12,8 @@ github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEe github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M= github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.12 h1:DCYWIBOalB0mKKfUg2HhtGgIkBbMA1fnlnkZp7fHB18= github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.12/go.mod h1:5g1oM4Zu3BOaLpsKQ+O8PAv2kNuq+kPcA1VzFbsSqxE= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -100,18 +102,18 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threefoldtech/tfchain/clients/tfchain-client-go v0.0.0-20240916164555-1c787e1918a2 h1:uxuWRpihkMvAAfmM6tiDxQP0hraeVOzd3kkV2Gnxou8= -github.com/threefoldtech/tfchain/clients/tfchain-client-go v0.0.0-20240916164555-1c787e1918a2/go.mod h1:cOL5YgHUmDG5SAXrsZxFjUECRQQuAqOoqvXhZG5sEUw= -github.com/threefoldtech/tfgrid-sdk-go/grid-client v0.15.17 h1:JwjhOz4mSV0qL0/oF+fdLYtE+l0s7fFjObunzTairYA= -github.com/threefoldtech/tfgrid-sdk-go/grid-client v0.15.17/go.mod h1:MwKEEeKN7qApCdabKRBTs18lrJ6JzA2Xx5Hd2/zb4o0= -github.com/threefoldtech/tfgrid-sdk-go/grid-proxy v0.15.16 h1:Bnt9POje9hc9nv1YwAu13ABnl63DBMH0qL4SeVhNsIQ= -github.com/threefoldtech/tfgrid-sdk-go/grid-proxy v0.15.16/go.mod h1:2Z7uJYHeilN7bASpmkcDxtl+3AT8tim6iIvqZ08pwCg= -github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.15.17 h1:0pdPsy5KekfzlNbHj6y3suxM8jk4R41s0mUcC3aT1N4= -github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.15.17/go.mod h1:cDTivSsUl4r1jN+H8/W6yDqByOOliY8HEGuVuL3ixV8= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/threefoldtech/tfchain/clients/tfchain-client-go v0.0.0-20241127100051-77e684bcb1b2 h1:VW2J36F8g/kJn4IkY0JiRFmb1gFcdjiOyltfJLJ0mYU= +github.com/threefoldtech/tfchain/clients/tfchain-client-go v0.0.0-20241127100051-77e684bcb1b2/go.mod h1:cOL5YgHUmDG5SAXrsZxFjUECRQQuAqOoqvXhZG5sEUw= +github.com/threefoldtech/tfgrid-sdk-go/grid-proxy v0.15.18 h1:KW9pxM20y9Bp814GsPyNYR7F8ax+h6MgAmTyScrJz2c= +github.com/threefoldtech/tfgrid-sdk-go/grid-proxy v0.15.18/go.mod h1:2Z7uJYHeilN7bASpmkcDxtl+3AT8tim6iIvqZ08pwCg= +github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.0 h1:3wqyjYnFVCbEy/wD9IKljrGKMxH/svlL4jTlZ8lnxbY= +github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.0/go.mod h1:TIx20W2b+tTpYWTH/f4AGsiE1i959tFYAYDUVClYzAY= github.com/threefoldtech/zos v0.5.6-0.20240902110349-172a0a29a6ee h1:pqpYVM0qkXujplHNfH6w5GDqcY5sLJAgOc4/hlR6+Xw= github.com/threefoldtech/zos v0.5.6-0.20240902110349-172a0a29a6ee/go.mod h1:lut72yYMJhgK0QRvF0Wd/mB3+OfIoXWz04DQuXck3Sw= +github.com/threefoldtech/zos4 v0.5.6-0.20241008102757-02d898c580c4 h1:JCExxpPL32G7evO/+gHwlZLfAX1+l9QN9t55tnPDCp0= +github.com/threefoldtech/zos4 v0.5.6-0.20241008102757-02d898c580c4/go.mod h1:7KFtZaCcEFwQ1/cz/+hkYK616Ww04ISZgmMqLWHz6To= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -124,21 +126,21 @@ github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFi github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6 h1:CawjfCvYQH2OU3/TnxLx97WDSUDRABfT18pCOYwc2GE= golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6/go.mod h1:3rxYc4HtVcSG9gVaTs2GEBdehh+sYPOwKtyUWEOTb80= diff --git a/griddriver/network.go b/griddriver/network.go index 50edbc98b..b4dc84518 100644 --- a/griddriver/network.go +++ b/griddriver/network.go @@ -10,7 +10,7 @@ import ( "github.com/pkg/errors" "github.com/threefoldtech/tfgrid-sdk-go/grid-client/deployer" "github.com/threefoldtech/tfgrid-sdk-go/grid-client/workloads" - "github.com/threefoldtech/zos/pkg/gridtypes" + "github.com/threefoldtech/tfgrid-sdk-go/grid-client/zos" "github.com/urfave/cli" "golang.zx2c4.com/wireguard/wgctrl/wgtypes" ) @@ -47,7 +47,7 @@ func deployVM() cli.ActionFunc { mounts := []workloads.Disk{} vm.NetworkName = networkName - dl := workloads.NewDeployment(vm.Name, node, solutionType, nil, networkName, mounts, nil, []workloads.VM{vm}, nil, nil) + dl := workloads.NewDeployment(vm.Name, node, solutionType, nil, networkName, mounts, nil, []workloads.VM{vm}, nil, nil, nil) c, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() @@ -77,10 +77,12 @@ func buildNetwork(name, solutionType string, nodes []uint32) workloads.ZNet { return workloads.ZNet{ Name: name, Nodes: nodes, - IPRange: gridtypes.NewIPNet(net.IPNet{ - IP: net.IPv4(10, 20, 0, 0), - Mask: net.CIDRMask(16, 32), - }), + IPRange: zos.IPNet{ + IPNet: net.IPNet{ + IP: net.IPv4(10, 20, 0, 0), + Mask: net.CIDRMask(16, 32), + }, + }, SolutionType: solutionType, } }