# [Unresolved] What is the proper syntax for using the "resubmit" (Nicira Extension) action in XML and JSON formats?

UPDATE 4: We never did get a working XML equivalent for the JSON provided, but the JSON provided does work in Lithium. We haven't tested it in Helium, though. In any case, we accept the answer as having given valid JSON, but note that the XML given is not necessarily valid as we never got it to work. As a result, this question is still technically Unresolved.

Hello.

As the question implies, I am having trouble converting the Nicira extension action "resubmit" into XML and JSON. I've searched around and most sites that come up have people using "go-to-table" and claiming it is equivalent. It is not equivalent since "go-to-table" is an instruction while "resubmit " is an action. I am trying to write the action into a Group, so I can only use actions; therefore, resubmit is necessary, otherwise I'd have used go-to-table. Would anyone be kind enough to provide the proper syntax for importing/using resubmit? It seems to be listed under "urn:opendaylight:openflowplugin:extension:nicira:action" or "urn:opendaylight:openflowjava:nx:action" as nx-resubmit, but I can't seem to get the syntax correct for invoking it.

EDIT for clarification: Simply putting nx-resubmit in the appropriate location is insufficient. The line starting with "group xmlns=..." sets the remainder of the script to look in that location for the specified schema nodes. As posted above, resubmit is not within flow:inventory, it's in another location and as such cannot be found. What I need is a way to tell the parser/loader where to find nx-resubmit for that specific invocation of it.

UPDATE: I think I'm either using the wrong namespace or something more serious is at work. I've edited the code to include the relevant namespace spec which has been missing before.

UPDATE 2: I have changed the namespaces specified earlier in the question and updated the code to reflect this. However, both namespaces still yield the same error and so this question is still unsolved. I also thought it would be helpful to give the valid and successfully executable ovs-ofctl equivalent of the command I am attempting to translate, where s1 is the name of the target switch:

sudo ovs-ofctl -O OpenFlow13 add-group s1
group_id=1,type=ff,bucket=watch_port:21,actions=output:21,bucket=watch_port:10,resubmit$$,1$$


The xml version script I'm trying to add resubmit to is given below. The code gives me an error stating:

error-type : application

error-tag: unknown-element

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<group xmlns="urn:opendaylight:flow:inventory">
<barrier>false</barrier>
<group-name>failover1->2</group-name>
<group-id>1</group-id>
<group-type>group-ff</group-type>
<buckets>
<bucket>
<action>
<order>0</order>
<output-action>
<output-node-connector>21</output-node-connector>
</output-action>
</action>
<bucket-id>1</bucket-id>
<watch_port>21</watch_port>
</bucket>
<bucket>
<action>
<order>1</order>
<nx-resubmit xmlns="urn:opendaylight:openflowplugin:nicira:extension:action">
<table_id>1</table_id>
</nx-resubmit>
</action>
<bucket-id>2</bucket-id>
<watch_port>10</watch_port>
</bucket>
</buckets>
</group>

edit retag close merge delete

Sort by » oldest newest most voted
{
"group": [
{
"group-type": "group-ff",
"group-id": "1",
"group-name": "failover1->2",
"barrier": "false",
"buckets": {
"bucket": [
{
"bucket-id": "1",
"watch_port": "21",
"action": [
{
"output-action": {
"output-node-connector": "21",
"max-length": "0"
},
"order": "0"
}
]
},
{
"bucket-id": "2",
"watch_port": "10",
"action": [
{
"nx-resubmit": {
"table": "1"
},
"order": "0"
}
]
}
]
}
}
]
}

more

I tried the xml equivalent of that already. It doesn't work. I get error-message: "Schema node \"nx-resubmit\" was not found in module. That is why I listed where it is; it seems that you need to specify the correct module location somehow. It's looking in flow:inventory for nx-resubmit instead.

( 2015-09-09 07:51:08 -0700 )edit

I've edited the original question to reflect what I meant by the above comment. Also, JSON doesn't seem to work for me at all at the moment, even with simple setups; dumping the flows with ovs-ofctl returns nothing for JSON PUT commands, but returns valid entries for XML PUT commands.

( 2015-09-09 07:57:27 -0700 )edit

@DeJuan ,in my case group is getting added to config data but not to operational data. I am trying to understand to it. have you installed feature odl-openflowplugin-nxm-extensions ?

( 2015-09-09 08:19:58 -0700 )edit

@subhash I tried doing a feature:list | grep nxm and came up with nothing, so I assume that since it is not present in the list of features, it is definitely not installed. I checked from karaf which is running in the l2switch directory.

( 2015-09-09 09:05:17 -0700 )edit

@DeJuan could you try to use the openflowplugin repository https://github.com/opendaylight/openflowplugin.

( 2015-09-09 10:14:58 -0700 )edit

UPDATE: We never did get the XML to work, but the JSON given above does work in Lithium, not sure if it works in Helium. Since it is valid JSON, I'll accept the answer that was given, though I'd like a working XML version too....As a result, I'm leaving the title as [Unresolved] due to the answer given not having been tested by us in Helium, and never having gotten a working XML version. I will change the title to Resolved if a working XML equivalent is provided.

I believe I've found the reason as to why my current script does not work. We were working using Helium-SR3. At the time that Helium was forked off, there was a bug involving resubmit. After the fork, there were several bugfixes, one of which included adding resubmit properly so that it could be invoked through the REST interface. Therefore, the error is real in that resubmit simply has not yet been added in the version that I'm working with, even if I specify the proper location. We're going to update to SR4 and I'll post an answer if it works properly with the relevant fixes.

more