Ask Your Question
0

What format is required for a JSON encoded OpenFlow rule in opendaylight lithium ?

asked 2015-11-09 06:27:58 -0700

ryandahp gravatar image

Hello,

In opendaylight hydrogen, if i want to install flow it used application/json. but in opendaylight helium, it used application/xml. if i want use application/json for install the flow, what must should i change?

I want to make script like in this link, but it used opendaylight hydrogen edition and now i want to implement that in opendaylight lithium. And is this the right url : http://{controller_IP}:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/id/flow/id for add flow in opendaylight lithium ?

Thank you

Regards Ryanda

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2015-11-11 14:23:02 -0700

I am not sure how to answer this question, but one thing you could look into is Yang UI. You can build requests with a web browser.

edit flag offensive delete publish link more

Comments

Thank you sir, below i have update my question

ryandahp ( 2015-11-11 23:22:16 -0700 )edit
0

answered 2015-11-11 22:44:30 -0700

jamoluhrsen gravatar image

updated 2015-11-11 22:45:00 -0700

this link may help as well.

edit flag offensive delete publish link more

Comments

thank you sir, but is it able to use application/json for lithium? below i have update my question

ryandahp ( 2015-11-11 23:23:09 -0700 )edit
0

answered 2015-11-11 23:15:57 -0700

ryandahp gravatar image

Hello,

im very thank you for the answer,

so i want to add flow like on that link, that is from javascript not from yang ui.

the script in that link is used opendaylight hydrogen version, so now i want to use in lithium version. i want to make sure what script must i change?

  1. var flowprogrammer = 'http://127.0.0.1:8080/controller/nb/v2/flowprogrammer/default/node/OF/ to be var flowprogrammer = 'http://<controller IP>:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1

  2. function setOpenFlow(bridge,name,spec) { http(flowprogrammer+bridge+'/staticFlow/'+name,'put','application/json', JSON.stringify(spec),user,password);} i see in the lithium, they always use application/xml, is it possible if i use application/json ?

  3. setOpenFlow(bridge,name,{installInHw:true,name:name,node:{id:bridge, type:'OF'},priority:'11',etherType:'0x0800',nwSrc: address, actions:['DROP']}); i think the used of which application/json or application/xml is for that script, so what should i change if use with opendaylight lithium?

Thank you

Regards Ryanda

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Follow
1 follower

Stats

Asked: 2015-11-09 06:27:58 -0700

Seen: 119 times

Last updated: Nov 11 '15