[NETCONF-763] yang-patch in Aluminium-SR1 does not work Created: 03/Mar/21 Updated: 04/Mar/21 Resolved: 04/Mar/21 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | Yevgeny Shakhnovich | Assignee: | Yevgeny Shakhnovich |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
yang-patch does not work. In response I get
The response is caused by exception
JsonNormalizedNodeBodyReader | 300 - org.opendaylight.netconf.restconf-nb-rfc8040 - 1.12.1 | Error parsing json input java.lang.IllegalStateException: Schema node with name yang-patch was not found under (http://www.ipinfusion.com/yang/ocnos/ipi-interface?revision=2020-12-15)interface. at org.opendaylight.yangtools.yang.data.codec.gson.JsonParserStream.resolveNamespace(JsonParserStream.java:385) ~[bundleFile:?]
Absolutely the same yang-patch request to the same device works in Magnesium-SR2. |
| Comments |
| Comment by Yevgeny Shakhnovich [ 03/Mar/21 ] |
|
The response is different from what I put: :RPC during tx failed. Currently only 'delete' operation is supported at node-level.<error-number>130</error-number>Currently only 'delete' operation is supported at node-level.<error-number>130</error-number>", :RPC during tx failed. Currently only 'delete' operation is supported at node-level.<error-number>130</error-number>Currently only 'delete' operation is supported at node-level.<error-number>130</error-number>, errorType=RPC, errorTag=OPERATION_FAILED, errorSeverity=ERROR, errorInfo={}}]]}" ] |
| Comment by Yevgeny Shakhnovich [ 03/Mar/21 ] |
|
OK, now I know the difference between Magnesium and Aluminium. I am not sure that it is a bug in Aluminium: So, the URL was the same in both cases:
PATCH http://localhost:8181/rests/data/network-topology/topology=topology-netconf/node=10.10.27.123/yang-ext:mount/ipi-interface:interfaces/interface=eth2/ipi-if-ip:ipv4
Content-type: application/yang.patch+json
But Netconf requests were different: on Aluminium
<rpc message-id="m-2521" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <candidate/> </target> <error-option>rollback-on-error</error-option> <config> <interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface"> <interface> <name>eth2</name> <ipv4 xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-ip"> <config xmlns:op="urn:ietf:params:xml:ns:netconf:base:1.0" op:operation="merge"> <primary-ip-addr>30.1.1.1/24</primary-ip-addr> </config> </ipv4> </interface> </interfaces> </config> </edit-config> </rpc>
on Magnesium <rpc message-id="m-479" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <candidate/> </target> <error-option>rollback-on-error</error-option> <config> <interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface"> <interface> <name>eth2</name> <ipv4 xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-ip"> <config> <primary-ip-addr>30.1.1.1/24</primary-ip-addr> </config> </ipv4> </interface> </interfaces> </config> </edit-config> </rpc> You see that in Magnesium there is no attribute op:operation="merge" Response in Aluminium: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:ipi-if-ip="http://www.ipinfusion.com/yang/ocnos/ipi-if-ip" xmlns:ipi-interface="http://www.ipinfusion.com/yang/ocnos/ipi-interface" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:ncx="http://netconfcentral.org/ns/yuma-ncx" message-id="m-2521"> <rpc-error> <error-type>rpc</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-app-tag>general-error</error-app-tag> <error-path>/nc:rpc/nc:edit-config/nc:config/ipi-interface:interfaces/ipi-interface:interface[ipi-interface:name='eth2']/ipi-if-ip:ipv4/ipi-if-ip:config/ipi-if-ip:primary-ip-addr</error-path> <error-message xml:lang="en">Currently only 'delete' operation is supported at node-level.</error-message> <error-info> <error-number xmlns="http://netconfcentral.org/ns/yuma-ncx">130</error-number> </error-info> </rpc-error> </rpc-reply>
Response in Magnesium: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-479"> <ok/> </rpc-reply> |
| Comment by Yevgeny Shakhnovich [ 04/Mar/21 ] |
|
This is not a bug in ODL. ODL works as designed. The bug is in our network devices. |
| Comment by Yevgeny Shakhnovich [ 04/Mar/21 ] |
|
This is not a bug in ODL. ODL works as designed. |