Skip to content

Commit

Permalink
add get node taken ports to deployer
Browse files Browse the repository at this point in the history
  • Loading branch information
0oM4R committed Sep 12, 2023
1 parent 1acb664 commit e4a690b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions v2go2tgrid/tfgrid/deployer.v
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,13 @@ pub fn get_user_twin(mnemonics string, substrate_url string) !u32 {

return u32(strconv.parse_uint(res.output, 10, 32)!)
}

pub fn(mut d Deployer) get_taken_ports(node_id u32) !string {
node_twin := d.get_node_twin(node_id)!
res := os.execute("grid-cli rmb-taken-ports --substrate ${d.substrate_url} --mnemonics \"${d.mnemonics}\" --relay ${d.relay_url} --dst ${node_twin} ")
if res.exit_code != 0 {
return error(res.output)
}

return res.output
}

0 comments on commit e4a690b

Please sign in to comment.