[NETCONF-644] standard edit-config fails when module augmenting base netconf has been retrieved from device Created: 14/Oct/19 Updated: 03/Mar/20 Resolved: 03/Mar/20 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Magnesium, Aluminium, Sodium SR3 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Jonas Mårtensson | Assignee: | Sanjana Babu |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
When a yang module that augments the base netconf edit-config rpc with an "output" statement is retrieved by ODL from a device, edit-config operations sent from ODL to this device fail, even if the augmentation is not used. It seems the "output" statement in the yang module causes ODL to not recognize a standard "ok" rpc-reply sent from the device in response to the edit-config rpc. Instead ODL reports an error and restarts the netconf session. Here is the related entry in karaf.log: java.lang.IllegalArgumentException: Failed to parse RPC response [rpc-reply: null] Caused by: javax.xml.stream.XMLStreamException: Schema for node with name ok and namespace urn:ietf:params:xml:ns:netconf:base:1.0 does not exist at AbsoluteSchemaPath{path=[(urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)edit-config, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)output]}
|
| Comments |
| Comment by Sanjana Babu [ 27/Jan/20 ] |
|
NetconfMessageTransformer.java throws error when it is trying to parse the <ok/> as a child in schema node. This is because when the rpc has output parameters i.e, child nodes, xmlparser tries to parse them. So, I'm planning the fix is if dont send the <ok/> of the <rpc-reply> to xmlparser, it wont parse the <ok/> as a child node. Xmlparser will try to find the output parameters else it treat the non mandatory nodes as transient nodes. I have validated this fix and it works fine. |