Closed ygorelik closed 2 years ago
This is not a YDK issue, but an issue with how Junos responds to the RPCs. By default junos uses a single namespace, non rfc/yang compatible. To change this behaviour configure the junos device with:
set system services netconf rfc-compliant
set system services netconf yang-compliant
<junos:comment>
and <undocumented>
elementschoice-ident/choice-value
keys (there are a few yang lists with multiple leaf keys that have a different way of serialization in the native junos compared to rfc/yang.On top of this you may be hitting a bug that older junos versions had with get-schema (https://github.com/ncclient/ncclient/issues/276). The newest ncclient has a workaround (). However, the workaround applies for the "juniper" device flavour, which returns NCElement objects from the rpc response instead of RPCReply objects like vanilla netconf devices (https://github.com/ncclient/ncclient/issues/453), so ydk probably won't understand this non-vanilla reply object.
A recent junos version (which has the fix for get-schema
) configured with rfc-compliant
and yang-compliant
should not face this problem.
Expected Behavior
YDK is expected to work across wide range of devices, which implement standard management protocols like Netconf, Restconf, and gNMI
Current Behavior
YDK fails to decode RPC received from Juniper device due to failure to correctly extract namespaces from RPC data. Error message:
As a result YDK fails to import YANG modules from device:
with following exception:
Steps to Reproduce
Logs
JUNOS_DEBUG.txt
System Information
YDK-0.8.4