[CONTROLLER-613] Error not reported when path and payload keys are inconsistent Created: 08/Jul/14  Updated: 14/Nov/17  Due: 11/Jul/14  Resolved: 14/Jul/14

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

Type: Bug
Reporter: Tony Tkacik Assignee: Jozef Gloncak
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows
Platform: PC


External issue ID: 1330

 Description   

Adding a single service function with inconsistency between path and JSON name

put /config/service-function:service-functions/service-function/fw-zz/

{
"service-function": [

{ "ip-mgmt-address": "20.0.0.11", "type": "firewall", "name": "fw-yy" }

]
}

This is the actual Service Function created

{
"service-functions": {
"service-function": [

{ "ip-mgmt-address": "20.0.0.11", "name": "fw-yy", "type": "firewall" }

}
}
}

Some things to notice:
The service function name from the path "fw-zz" was ignored. The actually created service function name was "fw-yy"
There was no callback. OndataChanged() was never called.



 Comments   
Comment by Tom Pantelis [ 09/Jul/14 ]

There's 2 separate issues here:

1) Restconf doesn't verify that the list key value in the URI matches the key
value in the input. eg

put /config/service-function:service-functions/service-function/fw-zz/

{
"service-function": [

{ "ip-mgmt-address": "20.0.0.11", "type": "firewall", "name": "fw-yy" }

]
}

where service-function is a yang list element with "name" as the key.

2) The data store didn't notify the DataChangeListener of a new list entry where
the DataChangeListener had registered with a wild-carded list
InstanceIdentifier, eg:

InstanceIdentifier.builder(ServiceFunctions.class)
.child(ServiceFunction.class).build()

where ServiceFunction is a yang list element.

Comment by Jozef Gloncak [ 10/Jul/14 ]

fix for first problem is proposed
https://git.opendaylight.org/gerrit/#/c/8889/

Comment by Tony Tkacik [ 10/Jul/14 ]

For Number 2, description was copied out from original report, and this is tracked in MD-SAL bugs, should be fixed by https://git.opendaylight.org/gerrit/8807

Comment by Jozef Gloncak [ 11/Jul/14 ]

Patch set 2 was submitted with incorporated comments
https://git.opendaylight.org/gerrit/#/c/8889/

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