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

Unable to set actions

asked 2016-03-11 02:22:37 -0700

dczeratz gravatar image

Hi,

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?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2016-07-14 21:14:09 -0700

msvmohanraj gravatar image

updated 2016-07-18 23:04:54 -0700

You can find the action options under instruction. Underneath you have to choose order id and instruction as apply-actions-case.

Also, You can set action using the third party tool eg. postman . Please refer the below example to set the action in a flow.

{ "flow": { "strict": "false", "flow-name": "0", "id": "0", "cookiemask": "255", "cookie": "103", "tableid": "0", "priority": "2", "hard-timeout": "1200", "idle-timeout": "3400", "installHw": "false", "instructions": { "instruction": { "order": "0", "apply-actions": { "action": { "order": "0", "output-action": { "output-node-connector": "1", "max-length": "60" }
} } } }, "match": { "ethernet-match": { "ethernet-type": { "type": "2048" }, "ethernet-destination": { "address": "ff:ff:29:01:19:61" }, "ethernet-source": { "address": "00:00:00:11:23:ae" } }, "ipv4-source": "17.1.2.3/8", "ipv4-destination": "172.168.5.6/16", "ip-match": { "ip-protocol": "6", "ip-dscp": "2", "ip-ecn": "2" }, "tcp-source-port": "1234", "tcp-destination-port": "9999" } } }

edit flag offensive delete publish link more

Comments

Can you please elaborate on where to find the documentation regaqrding order id and apply-actions case? I cannot understand the different action types and syntax surrounding it and it would be really helpful if i had some documentation, or help.

damarana ( 2016-07-19 14:26:48 -0700 )edit
0

answered 2016-07-19 00:43:30 -0700

karthik330 gravatar image

Hi ,

As msvmohanraj said , Use Postman / RestClient or use Restconf API Doc .

First Go through these Links .It may helpful

link 1

link 2

link 3

Thanks, -Karthik

edit flag offensive delete publish link more

Comments

Hello, I have tried adding a flow via postman and YANGUI, and deleted them using YANGUI, (they dont show up when i GET them) but for some reason, they still exist in my dump-flows command at the switch. I'm using mininet and OF 1.3.

damarana ( 2016-07-19 14:35:44 -0700 )edit

why are you using both Postman/Yangui .Either one is enough. Use postman for add and also for delete.make sure you are deleting the proper one.

karthik330 ( 2016-07-20 03:21:53 -0700 )edit

Thanks.I used YANGUI to know how the models are saved, because with POSTMAN, you need to know the exact path and syntax. Is there a better way to learn this? I deleted all the entries, yet still a few are left behind, and they do not show up when I GET from POSTMAN&YANGUI. How to reset all rules?

damarana ( 2016-07-20 06:41:56 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2016-03-11 02:22:37 -0700

Seen: 310 times

Last updated: Jul 19 '16