onos控制器通过REST API下发流表
onos控制器REST API地址:http://192.168.43.14:8181/onos/v1/docs/
stream书写格式:
{
"id": "6755400624849469",
"appId": "org.onosproject.fwd",
"groupId": 0,
"priority": 1235,
"timeout": 10,
"isPermanent": false,
"deviceId": "of:0000000000000007",
"state": "ADDED",
"life": 29,
"packets": 29,
"bytes": 2842,
"lastSeen": 1520500907102,
"treatment": {
"instructions": [
{
"type": "OUTPUT",
"port": 2
}
],
"deferred": []
},
"selector": {
"criteria": [
{
"type": "IN_PORT",
"port": 3
},
{
"type": "ETH_SRC",
"mac": "00:00:00:00:00:01"
},
{
"type": "ETH_DST",
"mac": "00:00:00:00:00:03"
}
]
}
}