[NETCONF-696] Invoking Yang 1.1 Action on ODL fails for Yang Model containing yang action under augmentation hierarchy. Created: 29/May/20 Updated: 17/Jul/20 Resolved: 17/Jul/20 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Aluminium, Magnesium SR2, Sodium SR4 |
| Type: | Bug | Priority: | Highest |
| Reporter: | Ajay Deep Singh | Assignee: | Ajay Deep Singh |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Description |
|
While Executing yang action requests on ODL via POST request failes for augmented yang actions see attached screenshot By going through ODL wiki , it says that QName for augmented yang model would not be supported. pathArg.add(path); yang-version 1.1; import er-yang-extensions { prefix yexte; } list SwM { yexte:is-system-created; } } |
| Comments |
| Comment by Jamo Luhrsen [ 02/Jun/20 ] |
|
rovarga, this might belong in yangtools? |
| Comment by Robert Varga [ 02/Jun/20 ] |
|
ah, nope, related but I think this is RESTCONF's failure to take handle the NormalizedNode addressing complexities. |
| Comment by Ajay Deep Singh [ 03/Jun/20 ] |
|
Hi Robert, Thanks for commenting on JIRA. I have checked-in code changes for issue please can you review/merge on master branch, also I need to merge it on stable/sodium, stable/magnesium once its reviewed on master branch will cherrypick on other branches hope that should work. Issue details : Earlier code was iteration and trying to get QName for augment node in data model hierarchy. Gerrit link : https://git.opendaylight.org/gerrit/c/netconf/+/90225 Regards, Ajay |
| Comment by Ajay Deep Singh [ 03/Jun/20 ] |
|
Hi All, Tested Code against Yang Model attached in JIRA. Detail: Restend Point : http://localhost:8181/rests/data/network-topology:network-topology/topology=topology-netconf/node=testtool/yang-ext:mount/main:cont/cont1/reset JSon Body : <?xml version="1.0" encoding="UTF-8"?> <input xmlns="ns:augment:main:a"> <delay>600</delay> </input> RPC Message: <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-0"> <action xmlns="urn:ietf:params:xml:ns:yang:1"> <cont xmlns="ns:main"> <cont1 xmlns="ns:augment:main:a"> <reset> <delay>600</delay> </reset> </cont1> </cont> </action> </rpc> |
| Comment by Jamo Luhrsen [ 08/Jul/20 ] |
|
rovarga, we can assign this to nikhil.soni.lumina unless you already have some progress on it. I'll assign it now, but |
| Comment by Ajay Deep Singh [ 08/Jul/20 ] |
|
Hi Jamo, Cant follow up on this Jira can see now code is reverted on braches, whats the issue here...? In one Jira it was commented that Code works for XML input but not for JSON is that the case...? Please can you provide some details in it will debug and find the failure scenario. Regards, Ajay |
| Comment by Jamo Luhrsen [ 08/Jul/20 ] |
|
Thanks for taking this up ajay_dp001... the short story is that your fix did work for a few more details are here: https://jira.opendaylight.org/browse/NETCONF-702 I did spend some cycles in the debugger trying to figure it out, but I'm just not In the JSON case, the yangIId.getParent() looked like this:
/(ns:main?revision=2014-01-21)cont/AugmentationIdentifier{childNames=[(ns:augment:main:a?revision=2014-01-21)cont1]}/(ns:augment:main:a?revision=2014-01-21)cont1/reset
and XML case, it was:
/(ns:main?revision=2014-01-21)cont/AugmentationIdentifier{childNames=[(ns:augment:main:a?revision=2014-01-21)cont1]}/(ns:augment:main:a?revision=2014-01-21)cont1
Maybe that difference (/reset in JSON) is helpful to understanding why? kailashkhalasi is almost done with automating the augmentation action case in our CSIT so we can Let me know how I can help. |
| Comment by Ajay Deep Singh [ 09/Jul/20 ] |
|
Hi Jamo, Thanks for details. Figured root casue, fixed issue with Json Input, I have created new Pull Request: https://git.opendaylight.org/gerrit/c/netconf/+/91274 Please can you get it tested against all 4 Yang 1.1 Action CRUD CSIT. Regards, Ajay |
| Comment by Jamo Luhrsen [ 13/Jul/20 ] |
|
ajay_dp001, rovarga, our new CSIT to cover this is failing. It looks like the testtool is not happy with <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-2"> <rpc-error> <error-type>application</error-type> <error-tag>operation-not-supported</error-tag> <error-severity>error</error-severity> <error-message>Mapping not found <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-2"> <action xmlns="urn:ietf:params:xml:ns:yang:1"> <cont xmlns="ns:main"> <cont1 xmlns="ns:augment:main:a"> <reset> <delay>600</delay> </reset> </cont1> </cont> </action> </rpc> </error-message> </rpc-error> </rpc-reply> we are putting the two yang models attached to this ticket in the schemas dir used by the testtool and the log seems I wonder if there is something basic we are missing. |
| Comment by Ajay Deep Singh [ 14/Jul/20 ] |
|
Hi Jamo, Thanks for updates. I have tested against all 4 (Normal+Augument(XML+JSON)) cases locally and seems to be working fine. Please can you share details if below are the only check-in made to cover Augmentation Action(XML+JSON) then i guess its incomplete, that's the reason the Old CSIT is passing and the new CSIT for Augmentation is failing. https://git.opendaylight.org/gerrit/c/integration/test/+/90879 https://git.opendaylight.org/gerrit/c/integration/test/+/90969 I will request to have acheck on initial CSIT added for testing action: https://git.opendaylight.org/gerrit/c/integration/test/+/84858 Looking at karaf.log looks like Input Mapping for rpc in testtool is not provided due to which its failing.
Regards, Ajay |
| Comment by Kailash Khalasi [ 14/Jul/20 ] |
|
HI Ajay,
Here is the data i'm posting to test the augmentation action - |
| Comment by Ajay Deep Singh [ 14/Jul/20 ] |
|
Hi Kailash,
I doubt if you have followed CSIT action: https://git.opendaylight.org/gerrit/c/integration/test/+/84858 Let me know if we can synch on whatsApp there after will iniiate Zoom Call Regards, Ajay |
| Comment by Kailash Khalasi [ 14/Jul/20 ] |
|
sorry it was a POST call. i copied an older request i was doing but then corrected it.
And yes I do have all those actions in CSIT. I cloned the entire repo and pointed to all those schemas. |
| Comment by Jamo Luhrsen [ 14/Jul/20 ] |
|
ajay_dp001what is the full command line you are using to start the testtool? here is ours in CSIT: java -Xmx1G -jar netconf-testtool-1.9.0-20200712.191255-249-executable.jar --device-count 1 --debug true --schemas-dir ./schemas --rpc-config /tmp/customaction.xml --md-sal true |
| Comment by Ajay Deep Singh [ 14/Jul/20 ] |
|
Hi Jamo, I had a chat with Kailash, and we are able to figure out issue the mapping was missing for Augument usecase. I have requested Kailash to update csit/variables/netconf/CRUD/customaction/customaction.xml file with below input data it should work thereafter. <rpc> <input> <action xmlns="urn:ietf:params:xml:ns:yang:1"> <cont xmlns="ns:main"> <cont1 xmlns="ns:augment:main:a"> <reset> <delay>600</delay> </reset> </cont1> </cont> </action> </input> <output> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:sys="ns:augment:main:a"> <ok /> </rpc-reply> </output> </rpc> Thanks kailashkhalasi for your time. Regards, Ajay |
| Comment by Kailash Khalasi [ 14/Jul/20 ] |
|
Thanks Ajay! After updating the custom action with the needed rpc, the test cases are passing - https://jenkins.opendaylight.org/sandbox/view/All/job/netconf-csit-1node-gate-userfeatures-all-aluminium/5/
This was tested on this build - https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/netconf/karaf/0.13.0-SNAPSHOT/karaf-0.13.0-20200712.074149-237.zip |
| Comment by Jamo Luhrsen [ 14/Jul/20 ] |
|
Thanks for all the work kailashkhalasi and ajay_dp001. I gave a note in gerrit to rovarga that our CSIT is good now |
| Comment by Ajay Deep Singh [ 15/Jul/20 ] |
|
Hi Jamo, Kailash, Thank you for sharing details and efforts added for JIRA. Request rovarga to please review/merge there after we can close JIRA. Regards, Ajay |
| Comment by Ajay Deep Singh [ 17/Jul/20 ] |
|
Request you to please review/merge changes for this Jira on Master branch. Regards, Ajay |