ConfD User Community

How to override standard YANG modules during compilation


#1

Hi,

I’ve two YANG files within local ‘yang’ directory-

  1. tailf-common.yang
  2. tailf-cli-extensions.yang

I tried to compile them using below command. But I’m observing an error.
> ./confd-6.5.9/bin/confdc --yangpath yang -c -o yang/tailf-common.fxs yang/tailf-common.yang
confd-6.5.9/src/confd/yang/tailf-cli-extensions.yang:0: error: expected revision ‘2017-08-23’, got ‘2018-09-11’
>

The ‘tailf-cli-extensions.yang’ file within my local ‘yang’ directory has revision number ‘2017-08-23’. But the standard file within ConfD’s ‘src’ directory has revision number ‘2018-09-11’. And Confd compiler is always picking up the file from it’s internal ‘src’ directory instead of my local directory path.

I’ve some older standard YANG files that have to be compiled with newer ConfD. I would like to include all YANG files (including standard modules) within my local path and then compile them.

Is there a way to specify the compiler to pick up standard YANG modules from local path too?

Thanks,
Goutham


#2

Hi,

  1. If you specify a yangpath, like you have, confdc will pick the YANG module from that path. No magic.
  2. You do not want to compile and load YANG files from some older version of ConfD that ConfD uses internally, i.e. there is code writen for those extensions, for use with some later version of ConfD.

Regards