... | @@ -23,7 +23,7 @@ Consider that `obj` is the main object contained in the JSON network configurati |
... | @@ -23,7 +23,7 @@ Consider that `obj` is the main object contained in the JSON network configurati |
|
|:---------:|:---------:|:----------|:----------------|:------------:|
|
|
|:---------:|:---------:|:----------|:----------------|:------------:|
|
|
|`obj["program"]`|`obj["p4_src"]`|Path to the default program for all the P4 switches.|If not specified, then switches are initialized with empty P4 source.|string|
|
|
|`obj["program"]`|`obj["p4_src"]`|Path to the default program for all the P4 switches.|If not specified, then switches are initialized with empty P4 source.|string|
|
|
|`obj["switch"]`|*removed*|Default switch binary to use. Now the switch binary configuration relies on the Python `Switch` class passed to *P4-Utils*.| |string|
|
|
|`obj["switch"]`|*removed*|Default switch binary to use. Now the switch binary configuration relies on the Python `Switch` class passed to *P4-Utils*.| |string|
|
|
|`obj["compiler"]`|*removed*|Default compiler binary to use. Now the compiler binary configuration relies on the Python compiler class passed to *P4-Utils*. By default, now class [`P4C`](https://github.com/nsg-ethz/p4-utils/blob/master/p4utils/utils/compiler.py) (a Python wrapper around P4C) is used as compiler.| |string|
|
|
|`obj["compiler"]`|*removed*|Default compiler binary to use. Now the compiler binary configuration relies on the Python compiler class passed to *P4-Utils*. By default, now class [`P4C`](https://nsg-ethz.github.io/p4-utils/p4utils.utils.compiler.html#p4utils.utils.compiler.P4C) (a Python wrapper around P4C) is used as compiler.| |string|
|
|
|`obj["options"]`|`obj["compiler_module"]["options"]`|Options to pass to the compiler.| |string|
|
|
|`obj["options"]`|`obj["compiler_module"]["options"]`|Options to pass to the compiler.| |string|
|
|
|`obj["switch_cli"]`|*removed*|Default *Thrift* client binary to configure the switches.| |string|
|
|
|`obj["switch_cli"]`|*removed*|Default *Thrift* client binary to configure the switches.| |string|
|
|
|*not present*|`obj["tasks_file"]`|Path to the file that contains all the tasks to execute in the nodes.|If not specified, no task file is considered.|string|
|
|
|*not present*|`obj["tasks_file"]`|Path to the file that contains all the tasks to execute in the nodes.|If not specified, no task file is considered.|string|
|
... | @@ -95,6 +95,8 @@ net.enableLogAll() |
... | @@ -95,6 +95,8 @@ net.enableLogAll() |
|
net.startNetwork()
|
|
net.startNetwork()
|
|
```
|
|
```
|
|
|
|
|
|
|
|
> You can read more about the `NetworkAPI` in the [**official *P4-Utils* documentation**](https://nsg-ethz.github.io/p4-utils/usage.html#python)
|
|
|
|
|
|
The Python script shown above is equivalent to the following JSON network configuration file. Indeed, both snippets define the same network topology.
|
|
The Python script shown above is equivalent to the following JSON network configuration file. Indeed, both snippets define the same network topology.
|
|
|
|
|
|
```json
|
|
```json
|
... | @@ -137,3 +139,5 @@ The Python script shown above is equivalent to the following JSON network config |
... | @@ -137,3 +139,5 @@ The Python script shown above is equivalent to the following JSON network config |
|
}
|
|
}
|
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
> You can read more about the JSON network configuration file in the
|
|
|
|
> [**official *P4-Utils* documentation**](https://nsg-ethz.github.io/p4-utils/usage.html#json) |
|
|
|
\ No newline at end of file |