[NETCONF-767] Unable to fetch mounted device's data when unkeyed and operational list present in device yang Created: 05/Feb/21 Updated: 01/Feb/22 |
|
| Status: | Confirmed |
| Project: | netconf |
| Component/s: | netconf |
| Affects Version/s: | 2.0.13 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | Sarguna Dharani | Assignee: | Ivan Martiniak |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
Restconf returns "Request could not be completed because the relevant data model content does not exist network-topology:network-topology/topology/topology-netconf/node/{device-name}/yang-ext:mount/Cisco-IOS-XR-mpls-te-oper:mpls-te/tunnel-current-lsp/s2l/resv-rro"
container tunnel-current-lsp { } }
When unkeyed and operational list is present in device yang , we were unable to fetch that particular list.
|
| Comments |
| Comment by Robert Varga [ 16/Feb/21 ] |
|
So this needs a stack trace to go with it |
| Comment by Sarguna Dharani [ 02/Mar/21 ] |
|
Hi Robert,
Replicated the issue using the test case
------------------- NETCONF --------------------- package org.opendaylight.netconf.sal.connect.netconf.util; import java.io.IOException; /**
private final MountPointContext mountContext; NetconfRpcStructureTransformer(final MountPointContext mountContext) { this.mountContext = mountContext; }@Override catch (final XMLStreamException | URISyntaxException | IOException | SAXException e) { LOG.error("Cannot parse anyxml.", e); return Optional.empty(); }} else { return NormalizedNodes.findNode(data, path.getPathArguments()); }} ..... ---------------- YANGTOOLS ----------------- package org.opendaylight.yangtools.yang.data.api.schema; .... /**
...... public static Optional<NormalizedNode<?, ?>> findNode(final Optional<NormalizedNode<?, ?>> parent, return currentNode; }
PFA for changes added in test case to replicate UnkeyedListNode issue.
Please let me know if you need more information. |
| Comment by Robert Varga [ 17/Mar/21 ] |
|
Well, children of UnkeyedListNode are not adressable through PathArgument. They can only be either iterated or selected by offset. For the code in your test case, this translates to the question: how would NormalizedNodes know to select the child at offset 0 (as opposed to any other offset)? This needs to be fixed NETCONF-side. |
| Comment by Robert Varga [ 01/Feb/22 ] |
|
Can you post karaf logs with NETCONF debugs enabled, please? |