mirror of https://github.com/vacp2p/wakurtosis.git
Updated gennet documentation
This commit is contained in:
parent
6322d54b2a
commit
4b7e5d90ce
|
@ -1,10 +1,44 @@
|
|||
This repo contains scripts to generate network models (in JSON) and waku configuration files (in TOMLs) for wakukurtosis runs.
|
||||
Module to generate network models (in JSON) and waku configuration files (in TOMLs) for wakurtosis runs.
|
||||
|
||||
|
||||
## generate_network.py
|
||||
generate_network.py generates one network and per-node configuration files. The tool is configurable with specified number of nodes, topics, network types, node types and number of subnets. Use with Python3. Comment out the `#draw(fname, H)` line to visualise the generated graph.
|
||||
generate_network.py generates one network and per-node configuration files. The tool is configurable with specified number of nodes, topics, network types, node types and number of subnets.
|
||||
|
||||
```commandline
|
||||
> python gennet.py --help
|
||||
|
||||
Usage: gennet.py [OPTIONS]
|
||||
|
||||
Options:
|
||||
--output-dir TEXT [default: topology_generated]
|
||||
--num-nodes INTEGER [default: 4]
|
||||
--num-topics INTEGER [default: 1]
|
||||
--network-type [configmodel|scalefree|newmanwattsstrogatz|barbell|balancedtree|star]
|
||||
[default: newmanwattsstrogatz]
|
||||
--node-type [desktop|mobile] [default: desktop]
|
||||
--num-subnets INTEGER [default: -1]
|
||||
--num-partitions INTEGER [default: 1]
|
||||
--config-file TEXT
|
||||
--help Show this message and exit.
|
||||
```
|
||||
|
||||
CLI arguments have precedence from configuration file.
|
||||
|
||||
Example of configuration file:
|
||||
|
||||
```json
|
||||
{
|
||||
"gennet": {
|
||||
"num_nodes": 3,
|
||||
"num_topics": 1,
|
||||
"node_type": "desktop",
|
||||
"network_type": "scalefree",
|
||||
"num_partitions": 1,
|
||||
"num_subnets": 1
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> usage: $./generate_network --help
|
||||
|
||||
## batch_gen.sh
|
||||
batch_gen.sh can generate given number of Waku networks and outputs them to a directory. Please make sure that the output directory does NOT exist; both relative and absolute paths work. The Wakunode parameters are generated at random; edit the MIN and MAX for finer control. The script requires bc & /dev/urandom.<br>
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"gennet": {
|
||||
"num_nodes": 3,
|
||||
"num_topics": 1,
|
||||
"node_type": "desktop",
|
||||
"network_type": "scalefree",
|
||||
"num_partitions": 1,
|
||||
"num_subnets": 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
general:
|
||||
|
||||
num_nodes : 3
|
||||
num_topics : 1
|
||||
node_type : "desktop"
|
||||
network_type : "scalefree"
|
||||
num_partitions : 1
|
||||
num_subnets : 1
|
||||
|
Loading…
Reference in New Issue