diff --git a/examples/threefold/grid/deploy/holochain_vm.vsh b/examples/threefold/grid/deploy/holochain_vm.vsh index b7472f61..d27bd700 100755 --- a/examples/threefold/grid/deploy/holochain_vm.vsh +++ b/examples/threefold/grid/deploy/holochain_vm.vsh @@ -2,7 +2,7 @@ import freeflowuniverse.herolib.threefold.grid.models import freeflowuniverse.herolib.threefold.grid as tfgrid -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import flag import rand import json diff --git a/examples/threefold/grid/deploy/vm_with_gw_name.vsh b/examples/threefold/grid/deploy/vm_with_gw_name.vsh index 8fc2b7ed..c514ba72 100755 --- a/examples/threefold/grid/deploy/vm_with_gw_name.vsh +++ b/examples/threefold/grid/deploy/vm_with_gw_name.vsh @@ -2,8 +2,8 @@ import freeflowuniverse.herolib.threefold.grid.models import freeflowuniverse.herolib.threefold.grid as tfgrid -import freeflowuniverse.herolib.threefold.gridproxy -import freeflowuniverse.herolib.threefold.gridproxy.model { NodeFilter } +import freeflowuniverse.herolib.threefold.grid3.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy.model { NodeFilter } import rand import log import os diff --git a/examples/threefold/gridproxy/bill.vsh b/examples/threefold/gridproxy/bill.vsh index 0fe36b9c..10572513 100755 --- a/examples/threefold/gridproxy/bill.vsh +++ b/examples/threefold/gridproxy/bill.vsh @@ -1,6 +1,6 @@ #!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.ui.console contract_id := u64(119450) diff --git a/examples/threefold/gridproxy/contract.vsh b/examples/threefold/gridproxy/contract.vsh index e4c15571..58b7e30c 100755 --- a/examples/threefold/gridproxy/contract.vsh +++ b/examples/threefold/gridproxy/contract.vsh @@ -1,7 +1,7 @@ #!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run import freeflowuniverse.herolib.threefold.grid as tfgrid -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.ui.console fn get_contracts_example() ! { diff --git a/examples/threefold/gridproxy/farm.vsh b/examples/threefold/gridproxy/farm.vsh index 1b96e0f8..9287a2ef 100755 --- a/examples/threefold/gridproxy/farm.vsh +++ b/examples/threefold/gridproxy/farm.vsh @@ -1,6 +1,6 @@ #!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.ui.console fn get_farms_example() ! { diff --git a/examples/threefold/gridproxy/gateway.vsh b/examples/threefold/gridproxy/gateway.vsh index 485d5cde..d5427389 100755 --- a/examples/threefold/gridproxy/gateway.vsh +++ b/examples/threefold/gridproxy/gateway.vsh @@ -1,6 +1,6 @@ #!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.ui.console fn get_gateway_nodes_example() ! { diff --git a/examples/threefold/gridproxy/grid.vsh b/examples/threefold/gridproxy/grid.vsh index 383cd103..39535d3a 100755 --- a/examples/threefold/gridproxy/grid.vsh +++ b/examples/threefold/gridproxy/grid.vsh @@ -1,6 +1,6 @@ #!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.ui.console mut gp_client := gridproxy.new(net: .test, cache: true)! diff --git a/examples/threefold/gridproxy/node.vsh b/examples/threefold/gridproxy/node.vsh index caa2ab3a..7c30e4c5 100755 --- a/examples/threefold/gridproxy/node.vsh +++ b/examples/threefold/gridproxy/node.vsh @@ -1,6 +1,6 @@ #!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.ui.console fn get_nodes_example() ! { diff --git a/examples/threefold/gridproxy/stats.vsh b/examples/threefold/gridproxy/stats.vsh index 18432edd..d329b2b1 100755 --- a/examples/threefold/gridproxy/stats.vsh +++ b/examples/threefold/gridproxy/stats.vsh @@ -1,7 +1,7 @@ #!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run -import freeflowuniverse.herolib.threefold.gridproxy -import freeflowuniverse.herolib.threefold.gridproxy.model { NodeStatus } +import freeflowuniverse.herolib.threefold.grid3.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy.model { NodeStatus } import freeflowuniverse.herolib.ui.console fn get_online_grid_stats_example() ! { diff --git a/examples/threefold/gridproxy/twin.vsh b/examples/threefold/gridproxy/twin.vsh index 2300da82..7a798c5e 100755 --- a/examples/threefold/gridproxy/twin.vsh +++ b/examples/threefold/gridproxy/twin.vsh @@ -1,6 +1,6 @@ #!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.ui.console fn get_all_twins_example() ! { diff --git a/examples/threefold/solana/seahorse_vm.vsh b/examples/threefold/solana/seahorse_vm.vsh index 7efcc25e..e844df93 100755 --- a/examples/threefold/solana/seahorse_vm.vsh +++ b/examples/threefold/solana/seahorse_vm.vsh @@ -2,7 +2,7 @@ import freeflowuniverse.herolib.threefold.grid.models import freeflowuniverse.herolib.threefold.grid as tfgrid -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import time import flag import rand diff --git a/examples/threefold/tfgrid3deployer/gw_over_wireguard/gw_over_wireguard.vsh b/examples/threefold/tfgrid3deployer/gw_over_wireguard/gw_over_wireguard.vsh index 5e80887a..0f61eb3d 100755 --- a/examples/threefold/tfgrid3deployer/gw_over_wireguard/gw_over_wireguard.vsh +++ b/examples/threefold/tfgrid3deployer/gw_over_wireguard/gw_over_wireguard.vsh @@ -1,6 +1,6 @@ #!/usr/bin/env -S v -gc none -no-retry-compilation -d use_openssl -enable-globals -cg run -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.threefold.tfgrid3deployer import freeflowuniverse.herolib.installers.threefold.griddriver import os diff --git a/examples/threefold/tfgrid3deployer/hetzner/hetzner.vsh b/examples/threefold/tfgrid3deployer/hetzner/hetzner.vsh index b931274f..4ff742d9 100644 --- a/examples/threefold/tfgrid3deployer/hetzner/hetzner.vsh +++ b/examples/threefold/tfgrid3deployer/hetzner/hetzner.vsh @@ -1,7 +1,7 @@ #!/usr/bin/env -S v -gc none -d use_openssl -enable-globals -cg run //#!/usr/bin/env -S v -gc none -cc tcc -d use_openssl -enable-globals -cg run -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.threefold.tfgrid3deployer import freeflowuniverse.herolib.installers.threefold.griddriver import os diff --git a/examples/threefold/tfgrid3deployer/open_webui_gw/open_webui_gw.vsh b/examples/threefold/tfgrid3deployer/open_webui_gw/open_webui_gw.vsh index 08814a67..0a123581 100755 --- a/examples/threefold/tfgrid3deployer/open_webui_gw/open_webui_gw.vsh +++ b/examples/threefold/tfgrid3deployer/open_webui_gw/open_webui_gw.vsh @@ -1,7 +1,7 @@ #!/usr/bin/env -S v -gc none -no-retry-compilation -d use_openssl -enable-globals -cg run //#!/usr/bin/env -S v -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals -cg run -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.threefold.tfgrid3deployer import freeflowuniverse.herolib.installers.threefold.griddriver import os diff --git a/examples/threefold/tfgrid3deployer/open_webui_gw/readme.md b/examples/threefold/tfgrid3deployer/open_webui_gw/readme.md index 11ab11ea..eae4560d 100644 --- a/examples/threefold/tfgrid3deployer/open_webui_gw/readme.md +++ b/examples/threefold/tfgrid3deployer/open_webui_gw/readme.md @@ -7,7 +7,7 @@ This script automates the deployment of an OpenWebUI instance on the ThreeFold G - V compiler installed - OpenSSL support enabled - herolib dependencies: - - `freeflowuniverse.herolib.threefold.gridproxy` + - `freeflowuniverse.herolib.threefold.grid3.gridproxy` - `freeflowuniverse.herolib.threefold.tfgrid3deployer` - `freeflowuniverse.herolib.installers.threefold.griddriver` diff --git a/examples/threefold/tfgrid3deployer/tfgrid3deployer_example.vsh b/examples/threefold/tfgrid3deployer/tfgrid3deployer_example.vsh index 71d80c23..2167b143 100755 --- a/examples/threefold/tfgrid3deployer/tfgrid3deployer_example.vsh +++ b/examples/threefold/tfgrid3deployer/tfgrid3deployer_example.vsh @@ -1,11 +1,10 @@ #!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.threefold.tfgrid3deployer import freeflowuniverse.herolib.ui.console fn main() { - v := tfgrid3deployer.get()! println('cred: ${v}') deployment_name := 'my_deployment27' diff --git a/examples/threefold/tfgrid3deployer/vm_gw_caddy/delete.vsh b/examples/threefold/tfgrid3deployer/vm_gw_caddy/delete.vsh index a39fb870..8559a81d 100755 --- a/examples/threefold/tfgrid3deployer/vm_gw_caddy/delete.vsh +++ b/examples/threefold/tfgrid3deployer/vm_gw_caddy/delete.vsh @@ -1,6 +1,6 @@ #!/usr/bin/env -S v -gc none -cc tcc -d use_openssl -enable-globals -cg run -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.threefold.tfgrid3deployer import freeflowuniverse.herolib.installers.threefold.griddriver import os diff --git a/examples/threefold/tfgrid3deployer/vm_gw_caddy/vm_gw_caddy.vsh b/examples/threefold/tfgrid3deployer/vm_gw_caddy/vm_gw_caddy.vsh index ed91db1e..8717b69d 100755 --- a/examples/threefold/tfgrid3deployer/vm_gw_caddy/vm_gw_caddy.vsh +++ b/examples/threefold/tfgrid3deployer/vm_gw_caddy/vm_gw_caddy.vsh @@ -1,14 +1,13 @@ #!/usr/bin/env -S v -gc none -d use_openssl -enable-globals -cg run //#!/usr/bin/env -S v -gc none -cc tcc -d use_openssl -enable-globals -cg run -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.threefold.tfgrid3deployer import freeflowuniverse.herolib.installers.threefold.griddriver import os import time - -res2:=tfgrid3deployer.filter_nodes()! +res2 := tfgrid3deployer.filter_nodes()! println(res2) exit(0) diff --git a/lib/threefold/grid3/deployer/contracts.v b/lib/threefold/grid3/deployer/contracts.v index 89b47b36..8e1732f2 100644 --- a/lib/threefold/grid3/deployer/contracts.v +++ b/lib/threefold/grid3/deployer/contracts.v @@ -1,7 +1,7 @@ module deployer -import freeflowuniverse.herolib.threefold.gridproxy -import freeflowuniverse.herolib.threefold.gridproxy.model as proxy_models +import freeflowuniverse.herolib.threefold.grid3.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy.model as proxy_models @[params] pub struct ContractGetArgs { diff --git a/lib/threefold/grid3/deployer/filter.v b/lib/threefold/grid3/deployer/filter.v index bd1f2fbb..17a84127 100644 --- a/lib/threefold/grid3/deployer/filter.v +++ b/lib/threefold/grid3/deployer/filter.v @@ -1,10 +1,9 @@ module deployer -import freeflowuniverse.herolib.threefold.gridproxy -import freeflowuniverse.herolib.threefold.gridproxy.model as gridproxy_models +import freeflowuniverse.herolib.threefold.grid3.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy.model as gridproxy_models - -//TODO: put all code in relation to filtering in file filter.v +// TODO: put all code in relation to filtering in file filter.v @[params] pub struct FilterNodesArgs { gridproxy_models.NodeFilter @@ -33,4 +32,4 @@ pub fn filter_nodes(args FilterNodesArgs) ![]gridproxy_models.Node { // // if we need to iterate over all nodes, maybe we should use multi-threading // panic('Not Implemented') // return [] -// } \ No newline at end of file +// } diff --git a/lib/threefold/grid3/deployer/utils.v b/lib/threefold/grid3/deployer/utils.v index ee82e45c..3deb5e5c 100644 --- a/lib/threefold/grid3/deployer/utils.v +++ b/lib/threefold/grid3/deployer/utils.v @@ -1,9 +1,9 @@ module deployer -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.threefold.grid import freeflowuniverse.herolib.threefold.grid.models as grid_models -import freeflowuniverse.herolib.threefold.gridproxy.model as gridproxy_models +import freeflowuniverse.herolib.threefold.grid3.gridproxy.model as gridproxy_models import rand import freeflowuniverse.herolib.ui.console @@ -36,7 +36,7 @@ fn wireguard_routing_ip(ip string) string { pub fn (mut deployer TFGridDeployer) mycelium_address_create() grid_models.Mycelium { return grid_models.Mycelium{ hex_key: rand.string(32).bytes().hex() - peers: [] + peers: [] } } diff --git a/lib/threefold/grid3/gridproxy/README.md b/lib/threefold/grid3/gridproxy/README.md index 8bc46335..47a1dd71 100644 --- a/lib/threefold/grid3/gridproxy/README.md +++ b/lib/threefold/grid3/gridproxy/README.md @@ -5,7 +5,7 @@ Easily access Threefold grid APIs from vlang. gridproxy is v module include the ### import the client: ```v -import freeflowuniverse.herolib.threefold.gridproxy +import freeflowuniverse.herolib.threefold.grid3.gridproxy // create a client for the testnet, with API cache disabled // you can pass true as second arg to enable cache diff --git a/lib/threefold/grid3/gridproxy/gridproxy_core.v b/lib/threefold/grid3/gridproxy/gridproxy_core.v index 2ff4df4c..426b537c 100644 --- a/lib/threefold/grid3/gridproxy/gridproxy_core.v +++ b/lib/threefold/grid3/gridproxy/gridproxy_core.v @@ -3,7 +3,7 @@ module gridproxy // client library for threefold gridproxy API. import json import math -import freeflowuniverse.herolib.threefold.gridproxy.model { Bill, Contract, ContractFilter, ContractIterator, Farm, FarmFilter, FarmIterator, GridStat, Node, NodeFilter, NodeIterator, NodeStats, Node_, StatFilter, Twin, TwinFilter, TwinIterator } +import freeflowuniverse.herolib.threefold.grid3.gridproxy.model { Bill, Contract, ContractFilter, ContractIterator, Farm, FarmFilter, FarmIterator, GridStat, Node, NodeFilter, NodeIterator, NodeStats, Node_, StatFilter, Twin, TwinFilter, TwinIterator } import freeflowuniverse.herolib.ui.console /* diff --git a/lib/threefold/grid3/gridproxy/gridproxy_factory.v b/lib/threefold/grid3/gridproxy/gridproxy_factory.v index dd5650ef..1f63def7 100644 --- a/lib/threefold/grid3/gridproxy/gridproxy_factory.v +++ b/lib/threefold/grid3/gridproxy/gridproxy_factory.v @@ -1,7 +1,7 @@ module gridproxy import freeflowuniverse.herolib.core.httpconnection -import freeflowuniverse.herolib.threefold.gridproxy.model +import freeflowuniverse.herolib.threefold.grid3.gridproxy.model // import freeflowuniverse.herolib.installers.threefold.griddriver @[heap] diff --git a/lib/threefold/grid3/gridproxy/gridproxy_highlevel.v b/lib/threefold/grid3/gridproxy/gridproxy_highlevel.v index 8f215987..00a1e51c 100644 --- a/lib/threefold/grid3/gridproxy/gridproxy_highlevel.v +++ b/lib/threefold/grid3/gridproxy/gridproxy_highlevel.v @@ -1,6 +1,6 @@ module gridproxy -import freeflowuniverse.herolib.threefold.gridproxy.model { Contract, ContractFilter, Farm, FarmFilter, Node, NodeFilter, ResourceFilter, Twin } +import freeflowuniverse.herolib.threefold.grid3.gridproxy.model { Contract, ContractFilter, Farm, FarmFilter, Node, NodeFilter, ResourceFilter, Twin } // fetch specific twin information by twin id. // diff --git a/lib/threefold/grid3/gridproxy/gridproxy_test.v b/lib/threefold/grid3/gridproxy/gridproxy_test.v index 5de44ad2..2f0997c1 100644 --- a/lib/threefold/grid3/gridproxy/gridproxy_test.v +++ b/lib/threefold/grid3/gridproxy/gridproxy_test.v @@ -1,6 +1,6 @@ module gridproxy -import freeflowuniverse.herolib.threefold.gridproxy.model +import freeflowuniverse.herolib.threefold.grid3.gridproxy.model import time const cache = false