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

Revision history [back]

click to hide/show revision 1
initial version

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