Confd in container, what do I need to import python API?

Trying to write some code to remotely subscribe to confd cdb running in a container. I added the ‘pyapi’ directory (from a confd installation from a different machine) to my project, and added it to my PYTHONPATH. However, getting an error that looks like this:

File “/usr/lib/python2.7/site-packages/confd/pyapi/_confd/”, line 5, in
from _confd_py2 import cdb
ImportError: /usr/lib/python2.7/site-packages/confd/pyapi/_confd/ undefined symbol: maapi_netconf_ssh_call_home

Seems like it needs more to import this, but I’m not sure what else I need?

maapi_netconf_ssh_call_home() is a function in the ConfD C library and the Python API is just a wrapper around this library. To me itt looks like you haven’t installed on your target or maybe installed it in the wrong place. (it should be $CONFD_DIR/lib)…

1 Like