Ask Your Question
0

Yang UI API / Postman API

asked 2016-03-22 18:02:23 -0700

luis999 gravatar image

Hi,

i have create a custom topology in mininet and have install opendaylight. on my opendaylight, i have install 'old-dlux-all' and 'odl-l2switch-switch-ui'.

i have no knowledge about API and Yang UI, i just started researching about it.

my question are

1) is there features do i still need to install on opendaylight to use Yang UI?

2) Which application(Yang UI, Postman, curl) should a novice use for configuring?

3) How do i import Yang UI API to postman?

4) is there any tutorial/guide about YANG UI API/Postman for novice like me?

many thanks in advance. :)

edit retag flag offensive close merge delete

Comments

What version of opendaylight? Could you elaborate a little for Yang UI? Do you mean YangIDE or Dlux

gzhao ( 2016-03-24 14:35:33 -0700 )edit

i use opendaylight lithium, the Yang UI in the dlux. i don't understand parameter given in sal-flow(add-flow)

luis999 ( 2016-03-27 17:17:23 -0700 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-03-24 15:53:45 -0700

sterdnotshaken gravatar image

updated 2016-03-24 15:58:37 -0700

Hey luis999,

See inline below:

1) is there features do i still need to install on opendaylight to use Yang UI? These are some of the common ones I install:

feature:install odl-mdsal-all odl-dlux-all odl-openflowplugin-all odl-netconf-all odl-config-all odl-netconf-connector-all odl-alto-basic odl-restconf

2) Which application(Yang UI, Postman, curl) should a novice use for configuring?

I personally think curl is potentually the simplest initially, but Postman isn't to much more work to get up and running and is a WAY better platform for adding/seeing/deleting/etc flows.

3) How do i import Yang UI API to postman?

Not sure what you mean by this question. To my understanding, Yang UI is more of a alternate to Postman... I don't believe their inter-dependant...

4) is there any tutorial/guide about YANG UI API/Postman for novice like me?

Preaching to the choir with this point... The opensource community (at least in regarding this facet) is, in my opinion, highly limited with good documentation and tutorials.

To get Postman up and running, do the following:

1 - Install Postman

2 - Ensure you don't have a firewall or anything that may be limit Postman on your desktop to talk to your ODL controller (for tcp port 8181)

Assuming your trying to install flows that are XML formatted, the next thing you'll want to do is:

Go into Postman and add a new "Collection" on the left Under the "Builder" section (main section of window) you will need to do the following:

Click on the "Authorization" tab and select the auth type your using with ODL (mine is set to Basic Auth) and fill in the ODL credentials

Now click on the "Headers" tab and click on the "key" field where you would enter: Accept Then click on the "value" field to the right of the "key" field and enter: application/xml

You then need one more:

Click on the "Headers" tab and click on the "key" field where you would enter: Content-Type Then click on the "value" field to the right of the "key" field and enter: application/xml (same as before)

Now ahead and click the "save" button up and to the right and then assign the request to the Collection you created before

Then click on the "Body" tab and ensure "raw" is selected and the far right field shows "XML (application/xml)

Now your pretty much ready to add a flow so go ahead and paste one in the body below, something like this for example (this is just an example flow, nothing more):

<flow xmlns="urn:opendaylight:flow:inventory"> <id>1</id> <priority>2</priority> <match> <in-port>openflow:this needs to be your switch openflow id found under "nodes" on your controller:this needs to be your interface id, found also via nodes\node connectors</in-port> <ethernet-match> <ethernet-type> <type>2048</type> </ethernet-type> </ethernet-match> <ipv4-source>10.0.0.10/32</ipv4-source> <ipv4-destination>10.0.0.20/32</ipv4-destination> </match>
<instructions> <instruction> <order>0</order> <apply-actions> <action> <order>2 ...
(more)

edit flag offensive delete publish link more

Comments

thank you very much for guide, is opendaylight able to add-flow in mininet?

luis999 ( 2016-03-27 18:01:15 -0700 )edit

Great question! I've never used mininet before, so I'm not sure. :)

sterdnotshaken ( 2016-03-29 09:36:44 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2016-03-22 18:02:23 -0700

Seen: 1,042 times

Last updated: Mar 24 '16