[CONTROLLER-192] Restconf is unable to handle anyxml attributes Created: 06/Mar/14 Updated: 25/Jul/23 Resolved: 30/Jun/14 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | restconf |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Ashwin Pankaj | Assignee: | Tom Pantelis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Linux |
||
| Attachments: |
|
| External issue ID: | 484 |
| Priority: | High |
| Description |
|
My yang model has anyxml attributes which contains XML data not related to my data model. Restconf is unable to ignore this and always complains about unknown tags. |
| Comments |
| Comment by Jozef Gloncak [ 07/Mar/14 ] |
|
investigating |
| Comment by Jozef Gloncak [ 07/Mar/14 ] |
|
I worked with following scenario module xml-test { revision 2014-3-7 { container cont { anyxml data { I tried to PUT http://192.168.1.101:8080/restconf/config/xml-test:cont I obtained following message I found problem in RestconfImpl class and I did some fixes but I wasn't able to completely test it because of other error occured (see attachment). I wasn't able to found the reason. It seems to me that controller can't see *.class files which were generated for my YANG module. |
| Comment by Jozef Gloncak [ 07/Mar/14 ] |
|
Attachment file_484.txt has been added with description: part of error message from osgi console |
| Comment by Tom Pantelis [ 22/May/14 ] |
|
The DeserializationException no longer occurs with the new data store impl. I was able to get this to work with some changes in RestConfImpl, DataNormalizationOperation and JsonMapper. I defined an AnyXml yang container: container AnyXml { anyxml data { PUT: } GET: } PUT with XML works but GET fails - needs minor changes in XmlDocumentUtils in yangtools. One thing to note is that the generated AnyXml interface only contains the getLeaf() method - there's no method to retrieve the anyxml data. So it appears anyxml isn't supported by the yang code generator so it wouldn't be available to a binding-aware client. |
| Comment by Tom Pantelis [ 22/May/14 ] |
|
Pushed: https://git.opendaylight.org/gerrit/#/c/7337/ with proposed changes. It depends on a draft for |
| Comment by Tom Pantelis [ 23/May/14 ] |
|
Pushed https://git.opendaylight.org/gerrit/#/c/7339/ to fix issue in XmlDocumentUtils. |
| Comment by Jozef Gloncak [ 17/Jun/14 ] |
|
PatchSet9 was devided as follows (merging order in parenthesis):
Also AnyXmlNode is used in AnyXmlNormalization.normalize as was requested by Tony. How should be JSON output which contains anyxml data printed? like XML (isn't implemented) or like JSON (is implemented by Tom) |