0
votes

I am using opendaylight magnesium and am trying to control a pair Northbound Networks Zodiac FX SDN switch. So far, here are a couple REST queries that I have been successful with:

To get all Nodes

curl -X GET -u admin:admin -f -4 http://192.168.107.22:8181/restconf/operational/opendaylight-inventory:nodes/ -H 'Content-Type: application/xml' -H 'Accept: application/xml'

Get the info for one node

curl -X GET -u admin:admin -f -4 http://192.168.107.22:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:123917682136241 -H 'Content-Type: application/xml' -H 'Accept: application/xml'

curl -X GET -u admin:admin -f -4 http://192.168.107.22:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:123917682136222 -H 'Content-Type: application/xml' -H 'Accept: application/xml'

If someone could help me write one REST query to create a simple flow I would be very appreciative. Something like, "For all packets that enter on port 1, exit port 3 and port 4." or "All packets destined for MAC_ADDRESS exit port 3"

If I knew what all the field names and expected values were I could write my own, but I don't know where to get this information. Here is a query that I pulled from ask.opendaylight.org. The person writing this knew how to format value , and all the rest of the fields. I don't know where to find all available match filters and action parameters.

curl --noproxy 10.19.10.225 -u admin:admin -H 'Content-Type: application/yang.data+xml' -X PUT -d ' <flow xmlns="urn:opendaylight:flow:inventory"> <priority>14865</priority> <flow-name>sampleFlow</flow-name> <idle-timeout>12000</idle-timeout> <match> <ethernet-match> <ethernet-type> <type>2048</type> </ethernet-type> </ethernet-match> </match> <id>9</id> <table_id>0</table_id> <instructions> <instruction> <order>6555</order> </instruction> <instruction> <order>0</order> <apply-actions> <action> <order>0</order> <output-action> <output-node-connector>1</output-node-connector> </output-action> </action> </apply-actions> </instruction> </instructions> </flow>' 'http://10.19.10.225:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:510715245500041/table/0/flow/9'

Any help would be great. I can't figure out the opendaylight documentation methodology. I've been digging through the help in karaf, but it isn't very comprehensive either.

As an extra kicker, in Magnesium, they did away with the GUI and they did away with the layer2 learning switch functionality. So, life is a bit tricky.

Thank you so much,

Greg

1

1 Answers

0
votes

See if this end-to-end flows guide helps. I think you will want to create a match on and then you can output to physical port with an action of output-node-connector.

let me know if you still can't figure it out.