05-17-2018 05:55 AM
Hi
I could generate bundle using ydk-gen 3rd party vendor yang models without facing any obvious problems.
Then I imported it, made small testing code(attached) and faced and issue.
As it seem from debug (attached), crud tries to download yang-model in order to validate payload against it. It makes several iterations and then returns error
ydk.errors.YInvalidArgumentError: Path is invalid: configuration:configuration
However pasting of below-listed rpc over ssh returned yang model
ssh 192.168.2.11 -p 830 -l ali -s netconf
Password:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<get-schema>
<module>configuration</module>
</get-schema>
</rpc>
Q: Could you please explain how crud composes rpc to fetch schemes (it seems it tries to put "configuration:confguration" between "module" tags instead of "configuration"). Is it possible to influence on this logic somehow or disable this sort of validation ?
Thanks a lot !
Solved! Go to Solution.
05-18-2018 10:06 AM
It appears that the device does not support the get-schema RPC. Can you please copy all the device yang models to the below directory:
/home/alex-limonov/.ydk/192.168.2.11_830
The other option is to pass in a different folder location of the yang models in the repo parameter of NetconfServiceProvider: http://ydk.cisco.com/py/docs/api/providers/netconf_provider.html#ydk.providers.NetconfServiceProvider
05-18-2018 10:06 AM
It appears that the device does not support the get-schema RPC. Can you please copy all the device yang models to the below directory:
/home/alex-limonov/.ydk/192.168.2.11_830
The other option is to pass in a different folder location of the yang models in the repo parameter of NetconfServiceProvider: http://ydk.cisco.com/py/docs/api/providers/netconf_provider.html#ydk.providers.NetconfServiceProvider
05-19-2018 01:30 PM
Thanks for you responce
Actually I could send get-schema RPC over SSH (simple openssh connection) !
i used such command :
cat get-schema_request.xml | ssh 192.168.2.11 -p 830 -l ali -s netconf >> get-schema_responce.xml (respective .xml files are in attachement)
That makes me think that get-schema RPC was processed normally by device.
What is little bit strange:
When test-code is executed there is no get-schema-rpc message in debug, only comments, that it tries to fetch schema from device (however hello messages bodies do present and another ydk specific debugs do present).Libssh and libnetconf were rebuilt to provide logging.
Is there option to check that get-schema rpc was actually sent ? Because right now it is not really obvious
From the other hand, manual specifying of repo with .yang files breaks a knot, but I would like to understand why my code can not fetch and resolve yang models directly from device
05-19-2018 02:06 PM
Small update:
I have slightly modified test code and ran it over XR platform.
Below is displayed respective debug and it does content get-schema-rpc body
This is extract from initial debug, it looks pretty similar to previous one until string 15. It says "Cannot find model with module_name: configuration module_rev"
Q: Could you please explain, what actually it tries to check here ?
Thanks !
05-21-2018 09:52 AM
Sorry. It looks like though the device supports get-schema, it does not advertise the support for the corresponding model "ietf-netconf-monitoring" in the capabilities in the hello message. This needs to be fixed on the device side
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide