adt-apjc / YAP

BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Issue compiling XR NED Yang #14

Closed marumer closed 1 year ago

marumer commented 1 year ago

working on the ISIS service model, I am trying in the YANG module to refer to TenGigE/ interfaces using the leafref and for doing this, we are forced to import in the yang model the XR ned tailf-ned-cisco-ios-xr .

The path is now accepted in compilation but I am still getting same errors with the NED.

The compilation is now reporting:

cisco@controller:~/ncs-run-6.1.2.1/packages/isis/src$ make
/home/cisco/./nso-6.1.2.1/bin/ncsc  `ls isis-ann.yang  > /dev/null 2>&1 && echo "-a isis-ann.yang"` \
    --fail-on-warnings \
    --yangpath ../../cisco-iosxr-cli-7.50/src/ncsc-out/modules/yang --yangpath ../../cisco-iosxr-cli-7.50/src/yang \
    -c -o ../load-dir/isis.fxs yang/isis.yang
../../cisco-iosxr-cli-7.50/src/yang/tailf-ned-cisco-ios-xr.yang:33673: error: when tailf:cli-drop-node-name is given, it is recommended that tailf:cli-suppress-mode is used in combination. using tailf:cli-drop-nodename in a list child without using tailf:cli-suppress-mode on the list, might lead to confusing behaviour, where the user enters the submode without being able to give further configuration.
../../cisco-iosxr-cli-7.50/src/yang/tailf-ned-cisco-ios-xr.yang:50344: error: The statement tailf:cli-mode-name requires that tailf:cli-add-mode is also given.
../../cisco-iosxr-cli-7.50/src/yang/tailf-ned-cisco-ios-xr.yang:60159: error: when tailf:cli-drop-node-name is given, it is recommended that tailf:cli-suppress-mode is used in combination. using tailf:cli-drop-nodename in a list child without using tailf:cli-suppress-mode on the list, might lead to confusing behaviour, where the user enters the submode without being able to give further configuration.
../../cisco-iosxr-cli-7.50/src/yang/tailf-ned-cisco-ios-xr.yang:61594: error: when tailf:cli-drop-node-name is given, it is recommended that tailf:cli-suppress-mode is used in combination. using tailf:cli-drop-nodename in a list child without using tailf:cli-suppress-mode on the list, might lead to confusing behaviour, where the user enters the submode without being able to give further configuration.
make: *** [Makefile:25: ../load-dir/isis.fxs] Error 1

But the tailf:cli-drop-node-name is reported in too many places to fix and it is hard to find the right line because of the import in the YANG module that seems changing the line number reported in the error.

We may consider using the netconf instead of the cli yang but this should be a common error and there should be a workaround.

marumer commented 1 year ago

$(DIRS): mkdir -p $@ ../load-dir/%.fxs: yang/%.yang $(NCSC) ls $*-ann.yang > /dev/null 2>&1 && echo "-a $*-ann.yang" \ --fail-on-warnings \ $(NCSCPATH) \ -c -o $@ $<

@ueasaksupa suggestion to remove "--fail-on-warnings" in the service Makefile addressed the issue