Examples of flow/group parameter JSON files.
Add VLAN Flow
{
"flow": {
"strict": "false",
"table_id": "10",
"id": "1",
"cookie_mask": "255",
"match": {
"vlan-match": {
"vlan-id": {
"vlan-id": "10",
"vlan-id-present": "true"
}
},
"in-port": "1"
},
"instructions": {
"instruction": {
"order": "0",
"go-to-table": { "table_id": "20" }
}
},
"hard-timeout": "0",
"cookie": "1",
"idle-timeout": "0",
"flow-name": "Vlanflow_1",
"priority": "2"
}
Add L2 Interface Group
{
"group": {
"group-type": "group-indirect",
"buckets": {
"bucket": {
"action": {
"output-action": {
"max-length": "60",
"output-node-connector": "5"
},
"order": "0"
},
"bucket-id": "0",
"watch_group": "12",
"watch_port": "1234"
}
},
"group-name": "L2_Interface_b0005",
"group-id": "720901"
}
}
Add Termination MAC Flow
{
"flow": {
"strict": "false",
"match": {
"vlan-match": {
"vlan-id": {
"vlan-id": "10",
"vlan-id-present": "true"
}
},
"ethernet-match": {
"ethernet-type": { "type": "2048" },
"ethernet-destination": { "address": "00:01:02:03:04:05/ff:ff:ff:ff:ff:ff" }
}
},
"instructions": {
"instruction": {
"order": "0",
"go-to-table": { "table_id": "30" }
}
},
"table_id": "20",
"id": "1",
"cookie_mask": "255",
"hard-timeout": "0",
"cookie": "1",
"idle-timeout": "0",
"flow-name": "Term_mac",
"priority": "1"
}
}
Add L3 Unicast Group
{
"group": {
"group-type": "group-indirect",
"buckets": {
"bucket": {
"action": [
{
"set-dl-src-action": { "address": "00:01:02:03:04:05/ff:ff:ff:ff:ff:ff" },
"order": "0"
},
{
"set-dl-dst-action": { "address": "00:00:00:00:00:05/ff:ff:ff:ff:ff:ff" },
"order": "1"
},
{
"set-vlan-id-action": { "vlan-id": "11" },
"order": "2"
},
{
"group-action": {
"group": "L2_Interface_b0005",
"group-id": "720901"
},
"order": "3"
}
],
"bucket-id": "1",
"watch_group": "14",
"watch_port": "1234"
}
},
"group-name": "L3_Ucast_20000001",
"group-id": "536870913"
}
}
Add L3 ECMP Group
{
"group": {
"group-type": "group-select",
"buckets": {
"bucket": [
{
"action": {
"group-action": {
"group": "L3_Unicast_1",
"group-id": "536870913"
},
"order": "0"
},
"bucket-id": "0",
"weight": "0",
"watch_group": "14",
"watch_port": "1234"
},
{
"action": {
"group-action": {
"group": "L3_Unicast_2",
"group-id": "536870914"
},
"order": "1"
},
"bucket-id": "1",
"weight": "1",
"watch_group": "14",
"watch_port": "1234"
}
]
},
"group-name": "ECMP",
"group-id": "1879048193"
}
}
Add Unicast Routing Flow
{
"flow": {
"strict": "false",
"match": {
"ethernet-match": {
"ethernet-type": { "type": "2048" }
},
"ipv4-destination": "10.1.1.0/24"
},
"instructions": {
"instruction": [
{
"order": "0",
"go-to-table": { "table_id": "60" }
},
{
"order": "1",
"write-actions": {
"action": {
"order": "0",
"group-action": {
"group": "ECMP_group",
"group-id": "1879048193"
}
}
}
}
]
},
"table_id": "30",
"id": "1",
"cookie_mask": "255",
"hard-timeout": "0",
"cookie": "1",
"idle-timeout": "0",
"flow-name": "Unicast_Routing",
"priority": "2"
}
}
Add Policy ACL Flow
{
"flow": {
"strict": "false",
"table_id": "60",
"id": "1",
"cookie_mask": "255",
"match": {
"ethernet-match": {
"ethernet-type": { "type": "2048" },
"ethernet-destination": { "address": "00:01:02:03:04:05" },
"ethernet-source": { "address": "00:00:00:00:00:00" }
},
"vlan-match": {
"vlan-id": {
"vlan-id": "10",
"vlan-id-present": "true"
}
},
"ip-match": { "ip-protocol": "6" },
"ipv4-destination": "10.1.1.2/32",
"ipv4-source": "0.0.0.0",
"tcp-source-port": "9999",
"tcp-destination-port": "0"
},
"instructions": {
"instruction": {
"order": "0",
"write-actions": {
"action": {
"order": "0",
"group-action": {
"group": "L3_Unicast",
"group-id": "536870916"
}
}
}
}
},
"hard-timeout": "0",
"cookie": "1",
"idle-timeout": "0",
"flow-name": "PolicyAcl",
"priority": "2"
}
}