Load confd yang failed

Netconf-client,use libyang,lys_parse_path load tail-common.yang failed!
log is:
ibyang[0]: Missing argument “name” to keyword “use”.
libyang[0]: Submodule “cli-extensions” parsing failed.
libyang[0]: Including “cli-extensions” module into “common” failed.
libyang[0]: Module “common” parsing failed.

Hi all:
I want to use libnetconf2 to write netconf-client to interact with confd, but there is no tail-common in the session, so I load it manually, but the above error occurs during the load, please help analyze, thank you

To me this looks like a problem in the libyang tool. As far as I can tell, tailf-common and its submodules are syntactically correct; and libyang’s error message does not tell much to try to identify where any problem might be.

But there should be no need to provide tailf-common module to your toolset. You can either:

  • remove all tailf:XXX annotations from your modules before providing them to libyang, either manually or using pyang -f yang --tailf-sanitize ...;
  • longer-term solution: move all your tailf:XXX annotations from your modules to annotation modules (typically named like <MODULE>-ann.yang; see how they are used in some of the confd examples.

I think I know what to do, thank you very much for your reply

1 Like

Hi Mike,

Did you manage using libnetconf2 as a client with ConfD server?

thanks,
Kobi

Yes, I am using libnetConf2 as client to ConfD server, waiting interface is “nc_accept_callhome()”

2 Likes