08-29-2017 11:15 AM - edited 03-01-2019 03:58 AM
Good day fellow NOS'ers!
I've been working through trying to compile a NETCONF NED for a TelcoSys T-Marc box - they say they support it. After getting my hands on their YANG models and having to clean up a bunch of XPath errors with 'tailf:dependency '../'' in some must clauses, I'm finally at a point where we're now building the 'augmented' YANGs and hitting an odd error (bottom of the pioneer build output).
What am I missing here? I'm admittedly not super familiar with the intricacies of YANG modeling/syntax so I'd be happy to provide whatever output is needed.
admin@ncs# devices device telcosys pioneer yang build-netconf-ned | exclude warning
Cleaning up existing ned-directory
Starting build of 96 YANG modules, this may take some time
PATH=/home/nso/nso-4.3.0.1/bin:/home/nso/nso-4.3.0.1/lib/ncs/erts/bin:/home/nso/nso-4.3.0.1/lib/ncs/bin:/home/fclements/bin:/home/fclements/.local/bin:/home/nso/nso-4.3.0.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin ncs-make-package --verbose --netconf-ned /tmp/download/telcosys telcosys --dest /tmp/packages/telcosys --no-java
Wrote package to /tmp/packages/telcosys
make clean fxs -C /tmp/packages/telcosys/src NCSC=/home/nso/nso-4.3.0.1/bin/ncsc --verbose
make: Entering directory '/tmp/packages/telcosys/src'
rm -rf ncsc-out ../load-dir
cd ../netsim && make clean || true
make[1]: Entering directory '/tmp/packages/telcosys/netsim'
make[1]: Leaving directory '/tmp/packages/telcosys/netsim'
mkdir -p ncsc-out
mkdir -p ../load-dir
/home/nso/nso-4.3.0.1/bin/ncsc --verbose --ncs-compile-bundle yang \
--ncs-device-dir ncsc-out \
--ncs-device-type netconf \
&& \
cp ncsc-out/modules/fxs/*.fxs ../load-dir;
Ignoring module "user_aaa.yang" - deviating/annotating/augmenting NCS-internal module
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/BATM-CR-LDP-MIB.yang -o augmented/BATM-CR-LDP-MIB.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/BATM-ISIS-DEBUG.yang -o augmented/BATM-ISIS-DEBUG.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/BATM-LMGR-MIB.yang -o augmented/BATM-LMGR-MIB.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/BATM-MPLS-DEBUG.yang -o augmented/BATM-MPLS-DEBUG.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/BATM-MPLS-LDP-MIB.yang -o augmented/BATM-MPLS-LDP-MIB.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/BATM-MPLS-TE-MIB.yang -o augmented/BATM-MPLS-TE-MIB.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/BATM-RSVP-MIB.yang -o augmented/BATM-RSVP-MIB.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/BATM-TEMIB-ENTITY-MIB.yang -o augmented/BATM-TEMIB-ENTITY-MIB.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/IANA-ADDRESS-FAMILY-NUMBERS-MIB.yang -o augmented/IANA-ADDRESS-FAMILY-NUMBERS-MIB@2000-09-08.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/MPLS-TC-PRIV-STDEXT-MIB.yang -o augmented/MPLS-TC-PRIV-STDEXT-MIB@2007-12-06.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/TeQueryTool.yang -o augmented/TeQueryTool.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/aggregation.yang -o augmented/aggregation@2009-12-28.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/attack-prevent.yang -o augmented/attack-prevent.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/auto_backup.yang -o augmented/auto_backup.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/batm.yang -o augmented/batm.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/batm-types.yang -o augmented/batm-types.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/batmServices.yang -o augmented/batmServices.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/bfd.yang -o augmented/bfd.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/bm_debug.yang -o augmented/bm_debug.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/bridge.yang -o augmented/bridge.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/cfm.yang -o augmented/cfm@2011-03-28.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/confd_dyncfg.yang -o augmented/confd_dyncfg.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/device.yang -o augmented/device.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/dhclient.yang -o augmented/dhclient.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/dns-resolver.yang -o augmented/dns-resolver.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/efm.yang -o augmented/efm.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/eps.yang -o augmented/eps@2010-05-07.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/ethernet_mvr.yang -o augmented/ethernet_mvr.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/event-propagation.yang -o augmented/event-propagation.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/fdb.yang -o augmented/fdb.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/fib.yang -o augmented/fib.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/glob_defs.yang -o augmented/glob_defs.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/igmpSnoopingV3.yang -o augmented/igmpSnoopingV3.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/igmp_vlan_node.yang -o augmented/igmp_vlan_node.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/igmp_vpls_node.yang -o augmented/igmp_vpls_node.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/isis.yang -o augmented/isis.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/l2tunn.yang -o augmented/l2tunn.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/lldp.yang -o augmented/lldp.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/lmm.yang -o augmented/lmm.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/load-balance.yang -o augmented/load-balance.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/mac-security.yang -o augmented/mac-security.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/management-debug.yang -o augmented/management-debug.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/manufacturing_details.yang -o augmented/manufacturing_details.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/mcast_vlan_node.yang -o augmented/mcast_vlan_node.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/mcast_vpls_node.yang -o augmented/mcast_vpls_node.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/mfib.yang -o augmented/mfib.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/mgmt_acc.yang -o augmented/mgmt_acc.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/mpls_global_if.yang -o augmented/mpls_global_if.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/mpls_oam.yang -o augmented/mpls_oam.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/ntest.yang -o augmented/ntest.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/oam_node.yang -o augmented/oam_node.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/oem.yang -o augmented/oem.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/ospf.yang -o augmented/ospf.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/port_monitor.yang -o augmented/port_monitor.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/port_protection.yang -o augmented/port_protection.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/proto-priority.yang -o augmented/proto-priority.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/proto_priority_glue.yang -o augmented/proto_priority_glue.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/qosSimple.yang -o augmented/qosSimple.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/raps.yang -o augmented/raps@2010-05-07.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/res_link.yang -o augmented/res_link@2010-03-23.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/rmon.yang -o augmented/rmon.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/route.yang -o augmented/route.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/routemap.yang -o augmented/routemap.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/router_interface.yang -o augmented/router_interface.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/saa.yang -o augmented/saa.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/security.yang -o augmented/security.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/serviceMac.yang -o augmented/serviceMac.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/services.yang -o augmented/services.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/sfp_details.yang -o augmented/sfp_details.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/spanning-tree.yang -o augmented/spanning-tree.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/static_lsps.yang -o augmented/static_lsps.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/statistics.yang -o augmented/statistics.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/statisticsmonitor.yang -o augmented/statisticsmonitor.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/stormctl.yang -o augmented/stormctl.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/super-vlan.yang -o augmented/super-vlan.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/sys_cfg.yang -o augmented/sys_cfg.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/sys_cfg_glue.yang -o augmented/sys_cfg_glue.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/syslog.yang -o augmented/syslog.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/system-compliance.yang -o augmented/system-compliance.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/system_cmd.yang -o augmented/system_cmd.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/system_monitor.yang -o augmented/system_monitor.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/tables.yang -o augmented/tables.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/telnet-server.yang -o augmented/telnet-server.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/telnetbanner.yang -o augmented/telnetbanner.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/time_sync.yang -o augmented/time_sync.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/twamp.yang -o augmented/twamp.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/version.yang -o augmented/version.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/vlan.yang -o augmented/vlan.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/vrrp.yang -o augmented/vrrp.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/y1564.yang -o augmented/y1564.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/y1731slm.yang -o augmented/y1731slm.yang
yanger -p yang:/home/nso/nso-4.3.0.1/src/ncs/yang --no-deviation-apply -t ncs -f yang yang/zero_touch.yang -o augmented/zero_touch.yang
Generating .fxs file "augmented/BATM-CR-LDP-MIB.fxs"
Generating .fxs file "augmented/BATM-ISIS-DEBUG.fxs"
Generating .fxs file "augmented/BATM-LMGR-MIB.fxs"
Generating .fxs file "augmented/BATM-MPLS-DEBUG.fxs"
Generating .fxs file "augmented/BATM-MPLS-LDP-MIB.fxs"
Generating .fxs file "augmented/BATM-MPLS-TE-MIB.fxs"
Generating .fxs file "augmented/BATM-RSVP-MIB.fxs"
Generating .fxs file "augmented/BATM-TEMIB-ENTITY-MIB.fxs"
Generating .fxs file "augmented/IANA-ADDRESS-FAMILY-NUMBERS-MIB@2000-09-08.fxs"
Generating .fxs file "augmented/MPLS-TC-PRIV-STDEXT-MIB@2007-12-06.fxs"
Generating .fxs file "augmented/TeQueryTool.fxs"
Generating .fxs file "augmented/aggregation@2009-12-28.fxs"
Generating .fxs file "augmented/attack-prevent.fxs"
Generating .fxs file "augmented/auto_backup.fxs"
Generating .fxs file "augmented/batm.fxs"
augmented/batm.yang:45: error: the node 'confdConfig' from module 'confd_dyncfg' is not found
augmented/batm.yang:49: error: the node 'confdConfig' from module 'confd_dyncfg' is not found
Makefile:25: recipe for target 'ncsc-out/.done' failed
make: *** [ncsc-out/.done] Error 1
make: Leaving directory '/tmp/packages/telcosys/src'
augmented/batm.yang:45: error: the node 'confdConfig' from module 'confd_dyncfg' is not found
augmented/batm.yang:49: error: the node 'confdConfig' from module 'confd_dyncfg' is not found
make: *** [ncsc-out/.done] Error 1
failure Build failed
Relevent output from the augmented/batm.yang file:
module batm {
// Generated by yanger -t ncs
tailf:ncs-device-type netconf;
namespace "http://batm.com";
prefix batm;
import tailf-common {
prefix tailf;
}
import confd_dyncfg {
prefix dyncfg;
}
import tailf-ncs {
prefix ncs;
}
...
tailf:symlink dynMaxConfigSessions {
tailf:path "/dyncfg:confdConfig/sessionLimits/maxConfigSessions";
tailf:hidden debug;
}
tailf:symlink dynMaxSessions {
tailf:path "/dyncfg:confdConfig/sessionLimits/maxSessions";
tailf:hidden debug;
}
}
And output from yanger:
cisco-nso:/tmp/download/telcosys$ yanger --tree-depth 2 -f tree confd_dyncfg.yang
module: confd_dyncfg
+--rw confdConfig
+--rw subagents!
+--rw notifications!
+--rw opcache!
+--rw snmpgw!
+--rw hideGroup* [name]
+--rw encryptedStrings!
+--rw logs!
+--rw sessionLimits!
+--rw aaa!
+--rw ssh!
+--rw cli!
+--rw webui!
+--rw rest!
+--rw restconf!
+--rw proxyForwarding!
+--rw snmpAgent!
+--rw netconf!
Solved! Go to Solution.
08-30-2017 08:00 AM
Thanks. I looked at batm.yang that you had trouble with, and edited out the bad+unnecessary stuff from it. Try replacing the batm.yang you downloaded with this:
module batm {
namespace "http://batm.com";
prefix batm;
import tailf-common {
prefix tailf;
}
container ethernet {
//tailf:cli-suppress-show-path;
tailf:cli-incomplete-show-path;
tailf:cli-add-mode;
description "Configure Ethernet protocols";
}
}
If you encounter further issues, let's take them offline.
08-30-2017 05:00 AM
We managed to get a use case working between NSO and a BATM on the EANTC NETCONF/YANG interop earlier this year, so something is likely possible here too. It may be that you have to disable a few YANGs, or hack the YANGs a little for things to work. The confd_dyncfg.yang should actually not be published by BATM, so this is something we should discuss with them. If you have a contact name there, I'd reach out.
I can take a look at the YANGs to see what can be done if you supply them to me.
08-30-2017 05:22 AM
Thanks! I would definitely appreciate a look and some guidance on what we could disable. All the YANG files I got from them are located here: https://www.dropbox.com/sh/52kyl1t865w61ov/AABxYsqWp2TYyBRfty00bySPa?dl=0
I put a tarball in there as well for quicker download.
08-30-2017 08:00 AM
Thanks. I looked at batm.yang that you had trouble with, and edited out the bad+unnecessary stuff from it. Try replacing the batm.yang you downloaded with this:
module batm {
namespace "http://batm.com";
prefix batm;
import tailf-common {
prefix tailf;
}
container ethernet {
//tailf:cli-suppress-show-path;
tailf:cli-incomplete-show-path;
tailf:cli-add-mode;
description "Configure Ethernet protocols";
}
}
If you encounter further issues, let's take them offline.
08-30-2017 12:57 PM
SUCCESS!!
Thanks a ton for the help here Jan, very much appreciated! I had to tweak up some paths in the security.yang model. For example:
2418 | list ip-std-acg { |
2419 | tailf:cli-exit-command "exit"; |
2420 | must "(current()/type!='in') or not(../../../ip/access-list/standard[id=current()/id]/rule[*]/fc)"{ |
2421 | error-message "Access-list with FC rule not supported on ingress."; |
2422 | tailf:dependency '../../../ip/access-list/standard'; |
2423 | } |
Originally line 2420 had 'must "(current()/type!='in') or not(/ip/access-list/standard[id=current()/id]/rule[*]/fc)"{'
Which leads me to the question. Is there an easier way to reference top of the current module in these cases? Not that it's a huge deal but the way I figured this out was using yanger to just print each leg of the tree one by one counting up the levels. Seems inefficient. Wasn't sure if there's a top() function that just roots the path up to the current module.
I'll update the yang models on the dropbox link and include the package that was built from pioneer in the tarball.
08-31-2017 12:20 AM
No need for top(), simply starting the path with slash / does just that. But there's a major difference between a relative path and an absolute, even if they end up pointing to the same element. An absolute path would refer to *all mathcing instances* in the tree, while a relative path with some double dots ../../ in the path preserves the keys in the path, so as to only point to the current instance. Huge difference.
Would it be possible for you to connect me with someone at BATM? I have some model review issues to discuss with them ;-)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide