From fa85e34d49f973def9ade995faf5154d1314585f Mon Sep 17 00:00:00 2001 From: kassem Date: Thu, 14 Sep 2023 16:40:08 +0300 Subject: [PATCH] update deploy fqdn example, --- v2go2tgrid/tfgrid/examples/deploy_gw_fqdn.v | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/v2go2tgrid/tfgrid/examples/deploy_gw_fqdn.v b/v2go2tgrid/tfgrid/examples/deploy_gw_fqdn.v index dff6eb81a..3b909b688 100644 --- a/v2go2tgrid/tfgrid/examples/deploy_gw_fqdn.v +++ b/v2go2tgrid/tfgrid/examples/deploy_gw_fqdn.v @@ -18,11 +18,17 @@ fn main() { gw := tfgrid.GatewayFQDNProxy{ tls_passthrough: false backends: ['http://1.1.1.1:9000'] - fqdn: 'hamada3.3x0.me' + fqdn: 'domaind.gridtesting.xyz' } wl := gw.to_workload(name: 'mywlname') node_id := u32(11) - + logger.info('trying to get node ${node_id} public configuration') + deployer.get_node_pub_config(node_id) or { + logger.error(err.str()) + logger.error('please select another node') + exit(1) + } + logger.info('preparing the deployment..') signature_requirement := tfgrid.SignatureRequirement{ weight_required: 1 requests: [ @@ -38,8 +44,9 @@ fn main() { signature_requirement: signature_requirement ) - - - node_contract_id := deployer.deploy(11, mut deployment, '', 0)! + node_contract_id := deployer.deploy(node_id, mut deployment, '', 0) or { + logger.error(err.str()) + exit(1) + } logger.info('node contract created with id ${node_contract_id}') }