[CONTROLLER-1263] Restconf PUT exception when top level node is from augmentation Created: 20/Apr/15  Updated: 23/Apr/15  Resolved: 23/Apr/15

Status: Resolved
Project: controller
Component/s: restconf
Affects Version/s: Post-Helium
Fix Version/s: None

Type: Bug
Reporter: Jan Hajnar Assignee: Jan Hajnar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 3024

 Description   

Method: PUT
Path: http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:13/table/0
Payload:
{
"flow-node-inventory:table": [
{
"flow": [
{
"cookie": 0,
"cookie_mask": 4294967295,
"flow-name": "TestFlow-0",
"hard-timeout": 65000,
"id": "0",
"idle-timeout": 65000,
"installHw": false,
"instructions": {
"instruction": [
{
"apply-actions": {
"action": [
{
"drop-action": {},
"order": 0
}
]
},
"order": 0
}
]
},
"match": {
"ethernet-match": {
"ethernet-type":

{ "type": 2048 }

},
"ipv4-destination": "10.0.0.1/32"
},
"priority": 2,
"strict": false,
"table_id": 0
}
],
"id": 0
}
]
}

Exception from log:

java.lang.UnsupportedOperationException: Augmentation node has no QName
at org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier$AugmentationIdentifier.getNodeType(YangInstanceIdentifier.java:623)[149:org.opendaylight.yangtools.yang-data-api:0.7.0.SNAPSHOT]
at org.opendaylight.yangtools.yang.data.impl.schema.nodes.AbstractImmutableNormalizedNode.getNodeType(AbstractImmutableNormalizedNode.java:28)
at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.validateTopLevelNodeName(RestconfImpl.java:724)[246:org.opendaylight.controller.sal-rest-connector:1.2.0.SNAPSHOT]
at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.updateConfigurationData(RestconfImpl.java:675)[246:org.opendaylight.controller.sal-rest-connector:1.2.0.SNAPSHOT]
at org.opendaylight.controller.sal.restconf.impl.StatisticsRestconfServiceWrapper.updateConfigurationData(StatisticsRestconfServiceWrapper.java:94)[246:org.opendaylight.controller.sal-rest-connector:1.2.0.SNAPSHOT]

at org.opendaylight.controller.sal.rest.impl.RestconfCompositeWrapper.updateConfigurationData(RestconfCompositeWrapper.java:74)[246:org.opendaylight.controller.sal-rest-connector:1.2.0.SNAPSHOT]
at sun.reflect.GeneratedMethodAccessor217.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_71]



 Comments   
Comment by Jan Hajnar [ 20/Apr/15 ]

patch:
https://git.opendaylight.org/gerrit/#/c/18621/

Comment by Jan Hajnar [ 21/Apr/15 ]

new patch (previous one is abandoned):
https://git.opendaylight.org/gerrit/#/c/18765/

Generated at Wed Feb 07 19:55:05 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.