-
Bug
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
461
-
Normal
The call fails at checkArgument() below. “inputContainer” is null.
public RpcResult<CompositeNode> invokeRpc(QName rpc, CompositeNode input) {
CompositeNode inputContainer = input.getFirstCompositeByName(QName.create(rpc,"input"));
checkArgument(inputContainer != null, "Rpc payload must contain input element”);
Debugging deeper, I found that MutableCompositeNodeTOImpl could not find “children” in nodeMap. The key “QName" in the NodeMap is different than the key “children” used to lookup.
public List<CompositeNode> getCompositesByName(QName children) {
List<Node<?>> toFilter = getNodeMap().get(children);
The QName sent by remote rpc router looks like:
{
namespace: "urn:opendaylight:flow:service"
localname: "input"
prefix: ""
formattedRevision: null
revision: null
}
While the key for flow service in NodeMap looks like:
{
namespace: "urn:opendaylight:flow:service"
localname: "input"
prefix: "flow"
formattedRevision: "2013-08-19"
revision: "Mon Aug 19 00:00:00 GMT-08:00 2013"
}
My RESTConf payload is:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<priority>5</priority>
<flow-name>Foo</flow-name>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
</ethernet-match>
<ipv4-destination>10.0.10.2/24</ipv4-destination>
</match>
<id>4</id>
<table_id>4</table_id>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
</flow>
The payload that I get in remote rpc router is
<add-flow xmlns="urn:opendaylight:flow:service">
<input>
<transaction-uri>BA-7</transaction-uri>
<table_id>4</table_id>
<priority>5</priority>
<node>
/(urn:opendaylight:inventory?revision=2013-08-19)nodes/(urn:opendaylight:inventory?revision=2013-08-19)node[
]
</node>
<match>
<ipv4-destination>10.0.10.2/24</ipv4-destination>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
</ethernet-match>
</match>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
<flow-table>
/(urn:opendaylight:inventory?revision=2013-08-19)nodes/(urn:opendaylight:inventory?revision=2013-08-19)node[
]/(urn:opendaylight:flow:inventory?revision=2013-08-19)table[
{(urn:opendaylight:flow:inventory?revision=2013-08-19)id=4}]
</flow-table>
<flow-ref>
/(urn:opendaylight:inventory?revision=2013-08-19)nodes/(urn:opendaylight:inventory?revision=2013-08-19)node[
]/(urn:opendaylight:flow:inventory?revision=2013-08-19)table[
{(urn:opendaylight:flow:inventory?revision=2013-08-19)id=4}]/(urn:opendaylight:flow:inventory?revision=2013-08-19)flow[
{(urn:opendaylight:flow:inventory?revision=2013-08-19)id=4}]
</flow-ref>
<flow-name>Foo</flow-name>
</input>
</add-flow>
- blocks
-
CONTROLLER-294 Milestone: Fix and demostrate Remote RPC Broker
- Resolved