Skip to content

Commit 13a29a2

Browse files
committed
use command ctx in isZos4Node
1 parent 62c9478 commit 13a29a2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

grid-cli/cmd/deploy_vm.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import (
1414
"github.com/threefoldtech/tfgrid-sdk-go/grid-cli/internal/config"
1515
"github.com/threefoldtech/tfgrid-sdk-go/grid-cli/internal/filters"
1616
"github.com/threefoldtech/tfgrid-sdk-go/grid-client/deployer"
17+
client "github.com/threefoldtech/tfgrid-sdk-go/grid-client/node"
18+
"github.com/threefoldtech/tfgrid-sdk-go/grid-client/subi"
1719
"github.com/threefoldtech/tfgrid-sdk-go/grid-client/workloads"
1820
"github.com/threefoldtech/tfgrid-sdk-go/grid-client/zos"
1921
)
@@ -134,7 +136,7 @@ var deployVMCmd = &cobra.Command{
134136
isLight := !ipv4 && !ipv6 && !ygg
135137

136138
if node != 0 {
137-
isLight, err = isZos4Node(context.Background(), t, node)
139+
isLight, err = isZos4Node(cmd.Context(), t.NcPool, t.SubstrateConn, node)
138140
if err != nil {
139141
log.Fatal().Err(err).Send()
140142
}
@@ -332,8 +334,8 @@ func executeVMLight(
332334
return nil
333335
}
334336

335-
func isZos4Node(ctx context.Context, tf deployer.TFPluginClient, node uint32) (isLight bool, err error) {
336-
cli, err := tf.NcPool.GetNodeClient(tf.SubstrateConn, node)
337+
func isZos4Node(ctx context.Context, client client.NodeClientGetter, sub subi.SubstrateExt, node uint32) (isLight bool, err error) {
338+
cli, err := client.GetNodeClient(sub, node)
337339
if err != nil {
338340
return
339341
}

0 commit comments

Comments
 (0)