Pyang and libnetconf

248 views
Skip to first unread message

Ambika Tripathy

unread,
Jan 15, 2014, 12:00:45 AM1/15/14
to libne...@googlegroups.com
Hi,

I want to use libnetconf as a netconf server and client lib for my application in device.

I have YANG modules available for my application. But in the device pyang is not present. Do I need PYANG in my device also to use libnetconf.


When i am using lnctool to generate .yin file for my module, it is giving

ambika@ambika-VirtualBox:~$ lnctool --model /home/ambika/modules/mo...@2013-03-21.yang convert
Traceback (most recent call last):
File "/usr/local/bin/lnctool", line 428, in <module>
model = convert_to_yin(args.model.name, args.search_path)
File "/usr/local/bin/lnctool", line 63, in convert_to_yin
yin_data = subprocess.check_output(['pyang', '-p', search_path, '-f', 'yin', input_file_name])
File "/usr/lib/python2.7/subprocess.py", line 537, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

br,
Ambika

Radek Krejčí

unread,
Jan 15, 2014, 4:15:54 AM1/15/14
to Ambika Tripathy, libne...@googlegroups.com
Hi Ambika,
pyang is needed for development of a transAPI module. It's not needed
for running compiled application. pyang is needed to convert yang data
model into formats used by libnetconf but libnetconf doesn't use pyang
runtime.

Regards,
Radek Krejci

Dne 15.1.2014 06:00, Ambika Tripathy napsal(a):

Partha Dutta

unread,
May 12, 2015, 7:15:52 AM5/12/15
to libne...@googlegroups.com, ambika....@gmail.com
Hi Radek,

Is there any way to automatically generate "path file" used for TransAPI code generation ? Because if lots of TransaAPI modules need to be written, it takes significant manual effort to write the path file.

Regards,
Partha

Radek Krejčí

unread,
May 12, 2015, 9:00:11 AM5/12/15
to Partha Dutta, libne...@googlegroups.com, ambika....@gmail.com
Hi Partha,

no, the "path file" is input for lnctool. I'm open to new ideas, but I can hardly imagine how to automatically recognise which path of the data tree is important and should be implemented by the developer.

Regards,
Radek


Dne 12.5.2015 v 13:15 Partha Dutta napsal(a):
--
Radek Krejci
mobile : +420 732 212 714
office : +420 234 680 256
e-mail : rkr...@cesnet.cz
LinkedIn: http://www.linkedin.com/in/radekkrejci

CESNET, Association of Legal Entities
Zikova 4
160 00 Praha 6
Czech Republic

Reply all
Reply to author
Forward
0 new messages