ConfD User Community

Compiling of 3GPP's Yang Modules

Hello Everyone,

Nowadays, i’m working on compiling 3GPP yang modules. But it gives an error.
Here is the yang modules:

Here is the makefile:

CONFDC=$(CONFD_DIR)/bin/confdc

YANG_SOURCES        = $(wildcard *.yang)
SUBMODULES          = $(shell grep -l belongs-to *.yang)
ANNOTATION_MODULES  = $(wildcard *-ann.yang)
DEVIATION_MODULES   = $(wildcard *-deviation.yang)

YANG_MODULES = $(filter-out $(SUBMODULES) $(ANNOTATION_MODULES) \
		  $(DEVIATION_MODULES),$(YANG_SOURCES))

ALL_FXS_FILES = $(YANG_MODULES:%.yang=%.fxs)

all: $(ALL_FXS_FILES)

%.fxs: %.yang %-ann.yang %-deviation.yang
	$(CONFDC) -c -o $@ -a $*-ann.yang --deviation $*-deviation.yang -- $<

%.fxs: %.yang %-deviation.yang
	$(CONFDC) -c -o $@ -a --deviation $*-deviation.yang -- $<

%.fxs: %.yang %-ann.yang
	$(CONFDC) -c -o $@ -a $*-ann.yang -- $<

%.fxs: %.yang
	$(CONFDC) -c -o $@ -- $<

clean:
	-rm -f *.fxs 2>/dev/null

And here is the error:

confdc -c -o _3gpp-nr-nrm-nrnetwork.fxs -- _3gpp-nr-nrm-nrnetwork.yang
./_3gpp-common-subnetwork.yang:207: error: there cannot be any data nodes defined when 'mount-point' is used.
./_3gpp-common-trace.yang:398: warning: The XPath expression references an undefined node: the node 'tjTraceReportingFormat' from module '_3gpp-common-subnetwork' (in node 'tjStreamingTraceConsumerURI' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:398: warning: The when expression refers to descendant node 'tjTraceReportingFormat', will probably not work as intended.
./_3gpp-common-trace.yang:410: warning: The XPath expression references an undefined node: the node 'tjTraceReportingFormat' from module '_3gpp-common-subnetwork' (in node 'tjTraceCollectionEntityAddress' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:410: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjTraceCollectionEntityAddress' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:410: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjTraceCollectionEntityAddress' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:410: warning: The when expression refers to descendant node 'tjTraceReportingFormat', will probably not work as intended.
./_3gpp-common-trace.yang:410: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:424: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjTraceDepth' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:424: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjTraceDepth' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:424: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:542: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjTriggeringEvent' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:542: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjTriggeringEvent' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:542: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:552: warning: The XPath expression references an undefined node: the node 'tjMDTAreaScope' from module '_3gpp-common-subnetwork' (in node 'tjMDTAnonymizationOfData' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:552: warning: The when expression refers to descendant node 'tjMDTAreaScope', will probably not work as intended.
./_3gpp-common-trace.yang:563: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTAreaConfigurationForNeighCell' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:563: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:605: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTCollectionPeriodRrmLte' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:605: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTCollectionPeriodRrmLte' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:605: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:620: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTCollectionPeriodRrmUmts' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:620: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTCollectionPeriodRrmUmts' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:620: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:635: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTCollectionPeriodRrmNR' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:635: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTCollectionPeriodRrmNR' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:635: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:649: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTEventListForTriggeredMeasurement' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:649: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:675: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTListOfMeasurements' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:675: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:685: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTLoggingDuration' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:685: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTLoggingDuration' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:685: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:699: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTLoggingInterval' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:699: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTLoggingInterval' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:699: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:713: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTMBSFNAreaList' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:713: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:724: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTMeasurementPeriodLTE' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:724: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTMeasurementPeriodLTE' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:724: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:740: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTMeasurementPeriodUMTS' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:740: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTMeasurementPeriodUMTS' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:740: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:756: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTMeasurementQuantity' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:756: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTMeasurementQuantity' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:756: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:766: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTPLMList' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:766: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:777: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTPositioningMethod' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:777: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTPositioningMethod' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:777: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:790: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTReportAmount' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:790: warning: The XPath expression references an undefined node: the node 'tjMDTReportingTrigger' from module '_3gpp-common-subnetwork' (in node 'tjMDTReportAmount' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:790: warning: The when expression refers to descendant node 'tjMDTReportingTrigger', will probably not work as intended.
./_3gpp-common-trace.yang:790: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:810: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTReportingTrigger' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:810: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:830: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTReportInterval' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:830: warning: The XPath expression references an undefined node: the node 'tjMDTReportingTrigger' from module '_3gpp-common-subnetwork' (in node 'tjMDTReportInterval' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:830: warning: The when expression refers to descendant node 'tjMDTReportingTrigger', will probably not work as intended.
./_3gpp-common-trace.yang:830: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:849: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTReportType' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:849: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
./_3gpp-common-trace.yang:874: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTTraceCollectionEntityID' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:874: warning: The XPath expression references an undefined node: the node 'tjJobType' from module '_3gpp-common-subnetwork' (in node 'tjMDTTraceCollectionEntityID' from '_3gpp-common-subnetwork') is not found
./_3gpp-common-trace.yang:874: warning: The when expression refers to descendant node 'tjJobType', will probably not work as intended.
make: *** [Makefile:58: _3gpp-nr-nrm-nrnetwork.fxs] Error 1

I put all of yang modules and makefile into same directory, i compiled it by using makefile which is in above

With My Best Regards,

Some update:

pyang works properly, it didn’t give any error.

First, the XPath expression warnings: the expressions are really meaningless, if not incorrect. Take for instance this leaf from _3gpp-common-trace.yang:

    leaf tjMDTAnonymizationOfData {
      when ./tjMDTAreaScope ;
      // ...
    }

The context node . for the when expression is (essentially) the leaf tjMDTAnonymizationOfData, so the when statement says that the leaf tjMDTAnonymizationOfData is valid only if there is a node tjMDTAreaScope under it, i.e. never. I am pretty sure that what the author intended is better captured by

      when ../tjMDTAreaScope;

And similarly for other when statements.

You have following options:

  • ignore the warning messages - they are just warnings, after all;
  • add -w YANG_ERR_XPATH_BAD_REF -w TAILF_BAD_WHEN to the confdc command line - you will not see the warnings any longer;
  • edit _3gpp-common-trace.yang.

Neither of these is really satisfactory, the first two just ignore/hide the problem, the last one means modifying a YANG module that you do not own. I’m not aware of anything better.

As for the mount point: it doesn’t look like the RFC 8528 requires that a mount point does not have schema node siblings; but ConfD does require it, the reason is, as I understand, that mount points with siblings have difficult semantics and are tricky to implement correctly. Also, note that ConfD does not implement schema mount; it allows you to compile and use a module with a mount point, but does not let you mount a schema on that mount point.

Your only option here is to edit the YANG module, as far as I can tell.