首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Opendaylight REST -创建流

Opendaylight REST -创建流
EN

Stack Overflow用户
提问于 2020-04-08 17:42:55
回答 1查看 201关注 0票数 0

我正在使用opendaylight镁,并试图控制一对北向网络Zodiac FX SDN交换机。到目前为止,我已经成功地使用了几个REST查询:

代码语言:javascript
复制
To get all Nodes

curl -X GET -u admin:admin -f -4 http://192.168.107.22:8181/restconf/operational/opendaylight-inventory:nodes/ -H 'Content-Type: application/xml' -H 'Accept: application/xml'

Get the info for one node

curl -X GET -u admin:admin -f -4 http://192.168.107.22:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:123917682136241 -H 'Content-Type: application/xml' -H 'Accept: application/xml'

curl -X GET -u admin:admin -f -4 http://192.168.107.22:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:123917682136222 -H 'Content-Type: application/xml' -H 'Accept: application/xml'

如果有人能帮我写一个REST查询来创建一个简单的流程,我将不胜感激。例如,“对于进入端口1的所有数据包,退出端口3和端口4。”或“发往MAC_ADDRESS出口端口3的所有数据包”

如果我知道所有的字段名称和期望值是什么,我就可以编写自己的字段名称,但我不知道从哪里获得这些信息。这是我从ask.opendaylight.org中提取的查询。写这篇文章的人知道如何格式化value和其他所有字段。我不知道在哪里可以找到所有可用的匹配过滤器和操作参数。

代码语言:javascript
复制
curl --noproxy 10.19.10.225 -u admin:admin -H 'Content-Type: application/yang.data+xml' -X PUT -d ' <flow xmlns="urn:opendaylight:flow:inventory"> <priority>14865</priority> <flow-name>sampleFlow</flow-name> <idle-timeout>12000</idle-timeout> <match> <ethernet-match> <ethernet-type> <type>2048</type> </ethernet-type> </ethernet-match> </match> <id>9</id> <table_id>0</table_id> <instructions> <instruction> <order>6555</order> </instruction> <instruction> <order>0</order> <apply-actions> <action> <order>0</order> <output-action> <output-node-connector>1</output-node-connector> </output-action> </action> </apply-actions> </instruction> </instructions> </flow>' 'http://10.19.10.225:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:510715245500041/table/0/flow/9'

任何帮助都是最好的。我搞不懂opendaylight文档方法。我一直在挖掘karaf中的帮助,但它也不是很全面。

作为一个额外的推动者,他们取消了图形用户界面,并取消了layer2学习开关功能。所以,生活是有点棘手的。

非常感谢,

格雷格

EN

回答 1

Stack Overflow用户

发布于 2020-04-09 07:31:26

看看这篇end-to-end flows指南是否有帮助。我认为您会想要在上创建一个匹配,然后您可以使用output to physical port -node-output to physical port操作进行输出。

如果你还是想不通,请告诉我。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61097726

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档