10-01-2017 09:40 AM
Hi,
I try to use Python inetconf API to get schema of open device box.
I keep getting empty data as return. The messages exchanged with open box device as below
I think open device doesn't like xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"/>, extra "/>
How do I get around this issue ?
Thanks
Executing CRUD read operation
=============Generating payload to send to device=============
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><get xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<filter><get-schema xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"/></filter>
</get>
</rpc>
=============Reply payload received from device=============
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
<data/>
</rpc-reply>
Solved! Go to Solution.
10-02-2017 12:35 AM
Please take a look at the documentation here:
http://ydk.cisco.com/py/docs/gen_doc_8a24df942f18e3e8d10f942723e7ccd22489d19e.html
you will need to pass in an instance of the “Input” class referred to on that page. You can click through to that class definition and find out what parameters need populated. There is also a code sample here:
Cheers,
Einar
10-01-2017 12:14 PM
Thang,
The RPC you have sent is malformed. The get-schema RPC is its own RPC and should not be inside a get. Please see:
https://tools.ietf.org/html/rfc6022#section-3.1
...and the subsequent YANG model identifying that the module name is a mandatory parameter. The get was interpreting this as a request for something in the data tree that didn’t exist, and thus returned no data, a completely valid response per the Netconf/Yang RFCs.
Cheers,
Einar
10-01-2017 05:17 PM
Hi Einarl
How do I feed the input to YDK Python RPC class ?
Thanks
-Thang
10-02-2017 12:35 AM
Please take a look at the documentation here:
http://ydk.cisco.com/py/docs/gen_doc_8a24df942f18e3e8d10f942723e7ccd22489d19e.html
you will need to pass in an instance of the “Input” class referred to on that page. You can click through to that class definition and find out what parameters need populated. There is also a code sample here:
Cheers,
Einar
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