Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • P p4-learning
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • p4git
  • p4-learning
  • Wiki
  • Migrate to the new version

Migrate to the new version · Changes

Page history
More links to P4-Utils docs authored Sep 20, 2021 by Jurij Nota's avatar Jurij Nota
Show whitespace changes
Inline Side-by-side
Migrate-to-the-new-version.md
View page @ b0ed5d21
......@@ -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["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["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|
......@@ -95,6 +95,8 @@ net.enableLogAll()
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.
```json
......@@ -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
Clone repository

P4-Learning Documentation

  • Getting Started
  • Migrate to the new version
  • BMv2 Simple Switch
  • Control Plane
  • Debugging and Troubleshooting
  • Scapy
  • FAQ

沪ICP备19002739号