New model definition

43 views
Skip to first unread message

delucchi...@gmail.com

unread,
Mar 23, 2015, 10:23:30 AM3/23/15
to neto...@googlegroups.com
Hi,

I'm starting to use Netopeer in my research activity. I have some troubles while I'm trying to define new modules.

As a mater of fact I'm able to define new models, I add it to netopeer using netopeer-manager, and I checked that the models are added correctly. Unfortunately during the hello exchange the module is not announced.

Moreover also after client-server connection instantiation, using <get> my module is not reported in the schemas listed in the get response.

Someone can help me? On Internet I can't find an appropriate solution.

Thanks.

Stefano.

Radek Krejčí

unread,
Mar 23, 2015, 11:54:59 AM3/23/15
to delucchi...@gmail.com, neto...@googlegroups.com
Hi Stefano,

can you share the log messages of the netopeer-server (you can simply get it from command line when running netopeer-server -v 3)? It should provide more detailed information about loading the modules, so let's see if there is some issue with your module.

Regards,
Radek

Dne 23.3.2015 v 15:22 delucchi...@gmail.com napsal(a):

delucchi...@gmail.com

unread,
Mar 23, 2015, 6:01:28 PM3/23/15
to neto...@googlegroups.com, delucchi...@gmail.com
Dear Radek,

the problem happens also with the modules already included in the netopeer folder (e.g., ietf-ip), not only adding modules developed by me. Probably th problem is not related to the module but in the procedures to add them.

In more detail I added a model in this way:

$ sudo netopeer-manager add --name ietf-ip --model /path/to/file.yin --datastore /etc/netopeer/modules.conf.d/ietf-ip.xml

Then executing $ sudo netopeer-manager list the model is shown but it is not included in the hello message.

Attached you can find the log that you have requested.

Thank you in advance for your kind support.

Stefano
log.txt

Radek Krejčí

unread,
Mar 24, 2015, 2:22:36 AM3/24/15
to delucchi...@gmail.com, neto...@googlegroups.com
Hi Stefano,

well, the ietf-ip data model only augments ietf-interfaces data model that you did not load. The install process of the Netopeer modules (netopeer/transAPI/) covers also installation into the netopeer-server (it runs netopeer-manager), so the best way how to install them is just run make install in the module's directory. Anyway, according to the log, libnetconf loads this data model.

But I don't see any try to load your data module. Regarding the fact that you are specifying /etc/netopeer/modules.conf.d/ietf-ip.xml as a datastore and the file exists and it does not have the datastore format, I guess that you tried to install the netopeer-server more than once and you changed sysconfdir parameter. So, currently you have two installations (or at least builds) with different sysconfdir - one is /etc/ and the second one (default) is /usr/local/etc/. In this case it depends which netopeer-manager are you running. If you run the netopeer-manager compiled with /etc/ as sysconfdir, it stores modules configuration files into /etc/netopeer/modules.conf.d/, but then you are running netopeer-server compiled with /usr/local/etc/ as its sysconfdir so it searches in /usr/local/etc/netopeer/modules.conf.d/ for the modules configuration files. BTW, it is not a good idea to store the datastore file in the modules.conf.d/ directory, but in this case it helped me to
understand what is probably happening :)

So, please make sure, that you are running the netopeer-manager and netopeer-server compiled with the same options. To make you sure, I'm going (today, but not immediately) to make netopeer-manager print where it stores the configuration data.

I hope I'm right and this will help you, let me know if I was right and about your progress.

Radek


Dne 23.3.2015 v 23:01 delucchi...@gmail.com napsal(a):
Reply all
Reply to author
Forward
0 new messages