Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


It is possible to add a flow by with curl by http://localhost:8080/controller/nb/v2/flowprogrammer/default/node/...

asked 2015-06-12 07:49:44 -0700

Edu gravatar image

In the Hidrogen release it was possible to add a flow by this way:

controller> curl -u admin:admin -H 'Content-type: application/json' -X PUT -d '{"installInHw":"true", "name":"flow1", "node": {"id":"00:00:00:00:00:00:00:02", "type":"OF"}, "ingressPort":"2", "etherType": "0x800", "protocol": "6", "tpDst": "80", "priority":"65535","actions":["DROP"]}' 'http://localhost:8080/controller/nb/v2/flowprogrammer/default/node/OF/00:00:00:00:00:00:00:02/staticFlow/flow1'

I cannot get it with helium release. If it is possible, which bundles I have to download?

Thank you very much.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-06-12 13:26:23 -0700

jpete2477 gravatar image

Helium changes how the API's work. Check out the documentation here:

You also have to enable the right feature using karaf. Here's a link on using karaf:

You'll want to do the following from the karaf console:

feature:install odl-restconf-all

edit flag offensive delete publish link more

answered 2015-06-30 04:12:46 -0700

Edu gravatar image

updated 2015-06-30 04:45:15 -0700

Thanks for your answer! But anyway I cannot get my purpose. I was installing by a Java code some flows in the previous release of ODL. For example this one:


I was installing it by a script like that that creates a JSON:

public static void main(String[] args) throws JSONException {
    JSONObject postData = new JSONObject();
    postData.put("name", "FlowInsert1");
    postData.put("installInHw", "true");postData.put("priority", "999");
    postData.put("ingressPort", "2");
    JSONArray accio = new JSONArray();
    postData.put("actions", accio.put("OUTPUT=1"));
    JSONObject node = new JSONObject();
    node.put("id", "00:00:00:00:00:00:00:01");
    node.put("type", "OF");
    postData.put("node", node);
    RestInterfaceSender.installFlow("00:00:00:00:00:00:00:01", "FlowInsert1", postData);

And then another script that just creates the conexion with:

I would really like to install the same flow with the new REST interface for helium but I don't get it. I'm trying to install this flow by POSTMAN before to try it by a JAVA app, but doesn't work:

here the image of the flow that I don't know how to put a JSON code in this foro:

It installs the flow but is like OF didn't saw it.

Any suggestions? Thank you! Edu

edit flag offensive delete publish link more


hi edu, have you able to do that? i want to do it too. thank you edu

ryandahp ( 2015-11-12 18:24:48 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-06-12 07:49:44 -0700

Seen: 1,069 times

Last updated: Jun 30 '15