Due to a ransomware attack, the wiki was reverted to a July 2022 version. . We apologize for the lack of a more recent valid backup.
JSON Format
During a flow POST request to the ONOS REST APIs the passed JSON data can contain different objects in the instructions array . This is an example of a JSON document with all the possible instructions with type and subtype combinations. A combination of one or more of these instructions will work in a POST request.
"treatment": { "instructions": [ { "type": "OUTPUT", "port": "CONTROLLER" }, { "type": "TABLE", "tableId": 1 }, { "type": "GROUP", "groupId": 1 }, { "type": "METER", "meterId": 1 }, { "type": "QUEUE", "queueId": 1, "port": 2 }, { "type": "L0MODIFICATION", "subtype": "LAMBDA", "lambda": 1 }, { "type":"L0MODIFICATION", "subtype":"OCH", "gridType": "DWDM", "channelSpacing": 1, "spacingMultiplier": 1, "slotGranularity": 1 }, { "type":"L1MODIFICATION", "subtype":"ODU_SIGID", "oduSignalId":{ "tributaryPortNumber": 1, "tributarySlotLength": 1, "tributarySlotBitmap": <bitmap> } }, { "type":"L2MODIFICATION", "subtype":"VLAN_PUSH" }, { "type":"L2MODIFICATION", "subtype":"VLAN_ID", "vlanId":200 }, { "type":"L2MODIFICATION", "subtype":"VLAN_PCP", "vlanPcp":0 }, { "type":"L2MODIFICATION", "subtype":"ETH_SRC", "mac":"00:00:00:00:01" } { "type":"L2MODIFICATION", "subtype":"ETH_DST", "mac":"00:00:00:00:01" }, { "type":"L2MODIFICATION", "subtype":"MPLS_LABEL", "label":1 }, { "type":"L2MODIFICATION", "subtype":"MPLS_PUSH", "ethernetType":1 }, { "type":"L2MODIFICATION", "subtype":"TUNNEL_ID", "tunnelId":1 }, { "type":"L3MODIFICATION", "subtype":"IPV6_DST", "ip":"1111::2222" }, { "type":"L3MODIFICATION", "subtype":"IPV6_FLABEL", "flowLabel":1 }, { "type":"L4MODIFICATION", "subtype":"TCP_SRC", "tcpPort":1 }, { "type":"L4MODIFICATION", "subtype":"UDP_SRC", "udpPort":1 } ] }