Skip to content

GitLab

  • Menu
项目 Groups 代码片段
    • 正在加载...
  • 帮助
    • 帮助
    • 支持
    • 社区论坛
    • 提交反馈
  • 登录/注册
  • P p4-learning
  • Project information
    • Project information
    • 动态
    • 标记
    • 成员
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • 议题 0
    • 议题 0
    • 列表
    • 看板
    • 服务台
    • 里程碑
  • 合并请求 0
    • 合并请求 0
  • CI/CD
    • CI/CD
    • 流水线
    • 作业
    • 计划
  • Deployments
    • Deployments
    • 环境
    • 发布
  • Monitor
    • Monitor
    • 事件
  • 软件包与镜像库
    • 软件包与镜像库
    • 软件包注册表
    • Infrastructure Registry
  • 分析
    • 分析
    • CI/CD
    • 仓库
    • Value stream
  • Wiki
    • Wiki
  • 代码片段
    • 代码片段
  • 动态
  • 分支图
  • 创建新议题
  • 作业
  • 提交
  • 议题看板
收起侧边栏
  • p4git
  • p4-learning
  • Wiki
  • Migrate to the new version

Migrate to the new version · 变更

页面历史
More links to P4-Utils docs 编辑于 9月 20, 2021 作者: Jurij Nota's avatar Jurij Nota
Hide whitespace changes
Inline Side-by-side
Showing with 5 addition and 1 deletion
+5 -1
  • Migrate-to-the-new-version.md Migrate-to-the-new-version.md +5 -1
  • 未找到文件。
Migrate-to-the-new-version.md
查看页面@ b0ed5d21
...@@ -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
克隆仓库

P4-Learning Documentation

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

沪ICP备19002739号