Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

0

Action string for forwarding to table 1

asked 2015-01-27 05:49:36 -0800

anonymous user

Anonymous

updated 2015-01-27 09:32:04 -0800

Moderators

Hi,

I am trying to write an XML for actions being going to table1

What is the Output action for going to table 1

Please let me know

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
    <strict>false</strict>
    <instructions>
        <instruction>
            <order>0</order>
            <apply-actions>
                <action>
                    <order>0</order>
         <output-action>
                        <output-node-connector>TABLE</output-node-connector>
                        <max-length>60</max-length>
                    </output-action>
                </action>
            </apply-actions>
        </instruction>
    </instructions>
    <table_id>0</table_id>
    <id>1</id>
    <cookie_mask>255</cookie_mask>
    <installHw>false</installHw>
    <match>
        <ethernet-match>
            <ethernet-type>
                <type>2048</type>
            </ethernet-type>
          </ethernet-match>
        <in-port>1</in-port>
    </match>
    <hard-timeout>1200</hard-timeout>
    <cookie>4</cookie>
    <idle-timeout>3400</idle-timeout>
    <flow-name>Flow1</flow-name>
    <priority>2</priority>
    <barrier>false</barrier>
</flow>
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-01-30 01:41:47 -0800

mawil gravatar image

To install a flow with id 1 and a "go-to-table 1" instruction via REST you can use the following example:

REST Call (PUT) to http://yourip:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <flow xmlns="urn:opendaylight:flow:inventory">
        <strict>false</strict>
        <instructions>
            <instruction>
                <order>0</order>
                <go-to-table>
                    <table_id>1</table_id>
                </go-to-table>
            </instruction>
        </instructions>
        <table_id>0</table_id>
        <id>1</id>
        <cookie_mask>10</cookie_mask>
        <installHw>false</installHw>
           <match>
            <ethernet-match>
                <ethernet-type>
                    <type>2048</type>
                </ethernet-type>
              <ethernet-destination>
                    <address>00:1b:21:8b:85:d3</address>
                </ethernet-destination>
                <ethernet-source>
                    <address>00:1b:21:8b:83:93</address>
                </ethernet-source>
            </ethernet-match>
        </match>
        <hard-timeout>1800</hard-timeout>
        <cookie>10</cookie>
        <idle-timeout>1800</idle-timeout>
        <flow-name>flow-instruction-go-to-table</flow-name>
        <priority>2</priority>
        <barrier>false</barrier>
    </flow>

There are other examples in the Openflowplugin repository. You can clone the repository with the command below. The examples are used for Openflowplugin test-scripts and located in "test-scripts" -> "xmls".

git clone https://git.opendaylight.org/gerrit/p/openflowplugin.git
edit flag offensive delete publish link more

Comments

Hi there, are there JSON examples anywhere? (And any material on how the instruction object behaves would be useful too!)

B.Cogan ( 2015-02-19 09:51:15 -0800 )edit

MAWIL, this is incredibly helpful. Thank you!

runamuck ( 2015-06-30 07:35:18 -0800 )edit

Sorry but which is the function of the "go-to-table" instruction? Thanks!

Edu ( 2015-07-02 00:49:25 -0800 )edit

Huge thanks, mawill! Saved me a lot of time!

Cesar ( 2017-02-15 03:59:33 -0800 )edit
Login/Signup to Answer

Stats

Asked: 2015-01-27 05:49:36 -0800

Seen: 740 times

Last updated: Jan 30 '15