0

I try to add flows to the switches via DLUX YangUI (using Beryllium). So, I go to the API opendaylight-iventory rev.2013-08-19 -> config -> nodes -> node ->table -> flow and start to add a flow like this (Preview): http://localhost:8181/restconf/config.. . { "flow": [ { "id": "1", "match": { "in-port": "2", "ethernet-match": { "ethernet-type": { "type": "0x0800" } }, "ip-match": { "ip-dscp": "0x2e" } }, "out port": "1", "flow-name": "mod1", "priority": "30000", "tableid": "2" } ] }

There is no subitem to set actions=ouput or something like that. Everytime I put a flow like that one above the instruction "out_port":"1" is ignored because the action is automatically set to "drop".

How can I set "actions" in the YangUI?

Mohanraj V
  • 31
  • 1
  • 4

1 Answers1

0

Flow actions has to be embedded in below format. Refer this Opendaylight wiki for flow samples with different set of match criteria & actions.

<instructions>
    <instruction>
        <order>0</order>
        <apply-actions>
            <action>
                <order>0</order>
                <output-action>
                    <output-node-connector>1</output-node-connector>
                    <max-length>60</max-length>
                </output-action>
            </action>
        </apply-actions>
    </instruction>
</instructions>
Jayaprakash
  • 703
  • 6
  • 15
  • Thanks. How to set output actions to multiple ports in a flow. ? – Mohanraj V Jul 15 '16 at 06:03
  • A flow can have multiple actions, and to accommodate them repeat the section with corresponding values. – Jayaprakash Jul 15 '16 at 06:15
  • It is not accepting if i give like this. "instruction": { "order": "0", "apply-actions": { "action": { "order": "0", "output-action": { "output-node-connector": "3", "max-length": "60" } } "action": { "order": "0", "output-action": { "output-node-connector": "2", "max-length": "60" } } }. Can you give me the correct template for this ? – Mohanraj V Jul 15 '16 at 06:18
  • Check this out. { "order": 0, "output-action": { "max-length": 65535, "output-node-connector": "openflow:224635992578792:1" }}, { "order": 1, "output-action": { "max-length": 65535, "output-node-connector": "openflow:224635992578792:10" }} – Jayaprakash Jul 15 '16 at 07:05
  • Yes Mohanraj, that's nice to get in touch with you via stackoverflow. – Jayaprakash Jul 15 '16 at 07:07
  • Thanks :) It is working now. The template i used is: "instruction": { "order": "0", "apply-actions": { "action": [ { "order": "0", "output-action": { "output-node-connector": "2", "max-length": "65535" } }, { "order": "1", "output-action": { "output-node-connector": "3", "max-length": "65535" } } ] } } – Mohanraj V Jul 18 '16 at 09:36