Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: Windows
Platform: PC
-
313
Description
Steps:
1. Create a group on the switch.
2. Perform GET operation on the group using url:
http://localhost:8080/restconf/datastore/opendaylight-inventory:nodes/node/openflow:1/group/1
This results in following exception:
java.lang.IllegalArgumentException
com.google.common.base.Preconditions.checkArgument(Preconditions.java:76)
org.opendaylight.controller.sal.restconf.impl.ControllerContext.addKeyValue(ControllerContext.java:682)
org.opendaylight.controller.sal.restconf.impl.ControllerContext.collectPathArguments(ControllerContext.java:596)
org.opendaylight.controller.sal.restconf.impl.ControllerContext.collectPathArguments(ControllerContext.java:612)
org.opendaylight.controller.sal.restconf.impl.ControllerContext.collectPathArguments(ControllerContext.java:612)
org.opendaylight.controller.sal.restconf.impl.ControllerContext.toInstanceIdentifier(ControllerContext.java:160)
org.opendaylight.controller.sal.restconf.impl.RestconfImpl.resolveInstanceIdentifier(RestconfImpl.java:384)
org.opendaylight.controller.sal.restconf.impl.RestconfImpl.readData(RestconfImpl.java:165)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
...
Debug Results:
1. In flow-node-inventory.yang: "grouping flow-node" contains statement "uses group:groups;" where group refers to group-types.yang
2. ControllerContext.java line:595
DataSchemaNode _dataChildByName = listNode.getDataChildByName(key);
RESTCONF correctly recognizes the group-id to be in group-types namespace and hence key is identified as "urn:opendaylight:group:types:group-id".
But the listNode object reference points to ListSchemaNode -> group whose child lements' namespace is incorrectly set to "urn:opendaylight:flow:inventory" namespace. Thus _dataChildByName is set to null. This results in exception.
Please note that the issue does not occur consistently.
Build info:
My code base contains code till the commit:
commit ffecdf80dfcda1b05b18ab30690e93f77593a236
Merge: 39e9983 f5f6bbc
Author: Abhijit Kumbhare <abhijitk@us.ibm.com>
Date: Thu Jan 16 00:48:58 2014 +0000
Merge "Fixed Bug : 287 https://bugs.opendaylight.org/show_bug.cgi?id=287"
Attachments
Issue Links
- is blocked by
-
YANGTOOLS-75 key from ListSchemaNode has different revision
- Resolved
-
YANGTOOLS-78 Node add by uses statement has a ConfigFalse statement even if they are configuration
- Resolved