ConfD User Community

Confdc compile options example from man page

I recently installed the basic version of confd on my Ubuntu system.

I get the following error message when I tried generating the header file as suggested in the Man page example. What is the reason for this error? Is the basic version of confd limitted to compiling only YANG files to schema files? Same issue when I tried generating mib file from YANG data.

user@newbunty:~$ confdc -c --emit-h blaster.h system.fxs
confdc: --compile <file> Can only compile .yang, .yin, .cli, and .mib files
        Try 'confdc -h' for help and more information

user@newbunty:~$ confdc -c --emit-mib sys.mib system.fxs
confdc: --compile <file> Can only compile .yang, .yin, .cli, and .mib files
        Try 'confdc -h' for help and more information

Regards … Terahari


this seems like a typo/cosmetic bug in that description of confdc man page…

It incorrectly says:

$ confdc -c --emit-h blaster.h system.fxs

but you need to do:

$ confdc --emit-h blaster.h system.fxs

The argument -c is not needed for emitting header files of mibs…

Thanks Joseph.

I am still not able to emit the mib from the example. I even tried the command in the folder where all fxs files are including ietf-inet-types.fxs.


user@newbunty:~/yangd$ confdc --emit-mib system.mib system.fxs
system.fxs: ‘urn:ietf:params:xml:ns:yang:ietf-inet-types’: This namespace must be available in one of the referenced fxs files (-f option).

i see, good old SNMP seems to be bit more complex, and it looks like it’s not covered into much detail in man page…

You can add missing dependencies like the confdc suggests using -f option, so, for our case and missing ietf-inet-types, something like:

confdc --emit-mib system.mib system.fxs -f ${CONFD_DIR}/etc/confd/ietf-inet-types.fxs 

It will then complain that it needs OID for SNMP mib, which is expectable. As we don’t have extra annotation file with OIDs defined for this trivial case, we must use --oid param to add an explicit OID for items inside system.yang. Thus, finally our command:

confdc --emit-mib system.mib system.fxs -f ${CONFD_DIR}/etc/confd/ietf-inet-types.fxs --oid 1.2.3

should do the whole trick :slight_smile:

Thanks Josephm. Got it compiled to an equivalent MIB.


For the sake of completeness, the example snmpa/8-emit-mib in the ConfD distribution is dedicated exactly to that - how to emit MIB from YANG.

1 Like