[YANGTOOLS-851] MDSAL rejects valid json file when YANG model has a container that crosses a Choice Created: 14/Feb/18  Updated: 23/Feb/18  Resolved: 23/Feb/18

Status: Resolved
Project: yangtools
Component/s: codecs
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: High
Reporter: M. Ranganathan Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OpenDaylight Nitrogen release version.


Attachments: File access-control-list.json     File bug.tar.gz    

 Description   

The attached files include the YANG models used and the test file I posted to the nrothbound.

To re-create, create a dummy project. put the attached files in api/src/main/yang

Build the project and POST the json file ( see attached tar.gz) to the northbound

curl -v -X PUT -u admin:admin --header "Content-Type:application/json" --data @access-control-list.json http://127.0.0.1:8181/restconf/config/ietf-access-control-list:access-lists

 Attached error.log (stdout  error returned when I use CURL to post )

Attached karaf-logs.tar.gz the server logs from Karaf. I set these to DEBUG and repeated the experiment above.



 Comments   
Comment by Robert Varga [ 14/Feb/18 ]

Can you quote the error (with a stack trace, if possible) and attach logs, please?

Comment by M. Ranganathan [ 15/Feb/18 ]

Attached:

  1. Karaf logs
  2. returned error message from the northbound.
Comment by M. Ranganathan [ 15/Feb/18 ]

Attached updated error logs. ( I had included the wrong yang model in my previous report. Sorry about the confusion. )

Comment by Robert Varga [ 19/Feb/18 ]

No problem, thanks. We also need the JSON input.

Comment by M. Ranganathan [ 19/Feb/18 ]

Attached access-control-list.json. Thanks

Comment by Robert Varga [ 19/Feb/18 ]

At first glance the JSON looks okay, but this has nothing to do with bindings.

Comment by Robert Varga [ 22/Feb/18 ]

Looks like the codecs are doing something bad. More investigation is needed.

Comment by Robert Varga [ 23/Feb/18 ]

This actually is not an ODL bug, but a mismatch between ietf-acldns and input data. ietf-acldns adds leaves to the ipv4 case, the data assumes it is added to the ipv4 container.

Comment by Eliot Lear [ 23/Feb/18 ]

Robert, I'm the person that designed the generation tool.  Can you explain a bit more as to what the mismatch is?  acldns augments the ipv4 and ipv4 containers of the ACL model.  The data seems labeled appropriately and wrapped in "ipv4": { }.  What am I doing wrong?

Generated at Wed Feb 07 20:54:29 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.