<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Leafref firewall interface in service template in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052059#M5000</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the error refers to this path in line 52 of your YANG model:&lt;/P&gt;&lt;P&gt;path "deref(../../device)/../ncs:config/fortinet-fortios-non-vdom:system/fortinet-fortios-non-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, NSO cannot find ../../device (neither can I).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Roque&lt;/P&gt;</description>
    <pubDate>Wed, 25 Mar 2020 13:36:33 GMT</pubDate>
    <dc:creator>rogaglia</dc:creator>
    <dc:date>2020-03-25T13:36:33Z</dc:date>
    <item>
      <title>Leafref firewall interface in service template</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4051957#M4999</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the below YANG file and MakeFile for a simple firewall service. In it - I am trying to leafref the device's interfaces so you can see them in a drop-down list in the GUI .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;===FW_SERVICE.yang===&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;module FW_SERVICE {&lt;BR /&gt;namespace "http://com/example/FW_SERVICE";&lt;BR /&gt;prefix FW_SERVICE;&lt;/P&gt;&lt;P&gt;import ietf-inet-types {&lt;BR /&gt;prefix inet;&lt;BR /&gt;}&lt;BR /&gt;import tailf-ncs {&lt;BR /&gt;prefix ncs;&lt;BR /&gt;}&lt;BR /&gt;import tailf-common {&lt;BR /&gt;prefix tailf;&lt;BR /&gt;}&lt;BR /&gt;import tailf-ned-fortinet-fortios-non-vdom {&lt;BR /&gt;prefix fortinet-fortios-non-vdom;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;list FW_SERVICE {&lt;BR /&gt;key name;&lt;/P&gt;&lt;P&gt;uses ncs:service-data;&lt;BR /&gt;ncs:servicepoint "FW_SERVICE";&lt;/P&gt;&lt;P&gt;leaf name {&lt;BR /&gt;type string;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// may replace this with other ways of refering to the devices.&lt;BR /&gt;leaf FW_OBJECT_NAME {&lt;BR /&gt;tailf:info "New Firewall Object Name";&lt;BR /&gt;type string;&lt;BR /&gt;}&lt;BR /&gt;leaf FW_WO_COMMENT {&lt;BR /&gt;tailf:info "WO Reference Comment";&lt;BR /&gt;type string;&lt;BR /&gt;}&lt;BR /&gt;leaf FW_OBJECT_SUBNET {&lt;BR /&gt;tailf:info "FW Object Subnet Address";&lt;BR /&gt;type string;&lt;BR /&gt;}&lt;BR /&gt;leaf FW_OBJECT_NETMASK {&lt;BR /&gt;tailf:info "FW Object Subnet Address Netmask";&lt;BR /&gt;type string;&lt;BR /&gt;}&lt;BR /&gt;leaf FW_POLICY_NAME {&lt;BR /&gt;tailf:info "FW Policy name";&lt;BR /&gt;type string;&lt;BR /&gt;}&lt;BR /&gt;leaf FW_PORT_SRC {&lt;BR /&gt;tailf:info "Incoming Interface";&lt;BR /&gt;type leafref {&lt;BR /&gt;path "deref(../../device)/../ncs:config/fortinet-fortios-non-vdom:system/fortinet-fortios-non-vdom:interface/fortinet-fortios-&lt;BR /&gt;non-vdom:interface-list";&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;leaf FW_PORT_DST {&lt;BR /&gt;tailf:info "Outgoing Interface";&lt;BR /&gt;type string;&lt;BR /&gt;}&lt;BR /&gt;leaf-list FW_OBJECT_DESTINATION {&lt;BR /&gt;tailf:info "Destination Object";&lt;BR /&gt;type string;&lt;BR /&gt;}&lt;BR /&gt;leaf FW_ACTION {&lt;BR /&gt;tailf:info "FW Action - cccept or deny";&lt;BR /&gt;type string;&lt;BR /&gt;}&lt;BR /&gt;leaf-list FW_SERVICE {&lt;BR /&gt;tailf:info "Destination Services to add";&lt;BR /&gt;type string;&lt;BR /&gt;}&lt;BR /&gt;// replace with your own stuff here&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;===MakeFile===&lt;/P&gt;&lt;P&gt;all: fxs&lt;BR /&gt;.PHONY: all&lt;/P&gt;&lt;P&gt;# Include standard NCS examples build definitions and rules&lt;BR /&gt;include $(NCS_DIR)/src/ncs/build/include.ncs.mk&lt;/P&gt;&lt;P&gt;src=$(wildcard yang/*.yang)&lt;BR /&gt;DIRS = ../load-dir&lt;BR /&gt;FXS = $(SRC:yang/%.yang=../load-dir/%.fxs)&lt;BR /&gt;YANGPATH += ../../fortinet-fortios-cli-5.4/src/ncsc-out/modules/yang&lt;/P&gt;&lt;P&gt;## Uncomment and patch the line below if you have a dependency to a NED&lt;BR /&gt;## or to other YANG files&lt;BR /&gt;# YANGPATH += ../../&amp;lt;ned-name&amp;gt;/src/ncsc-out/modules/yang \&lt;BR /&gt;# ../../&amp;lt;pkt-name&amp;gt;/src/yang&lt;/P&gt;&lt;P&gt;NCSCPATH = $(YANGPATH:%=--yangpath %)&lt;BR /&gt;YANGERPATH = $(YANGPATH:%=--path %)&lt;/P&gt;&lt;P&gt;fxs: $(DIRS) $(FXS)&lt;BR /&gt;.PHONY: fxs&lt;/P&gt;&lt;P&gt;$(DIRS):&lt;BR /&gt;mkdir -p $@&lt;/P&gt;&lt;P&gt;../load-dir/%.fxs: yang/%.yang&lt;BR /&gt;$(NCSC) `ls $*-ann.yang &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&amp;amp; echo "-a $*-ann.yang"` \&lt;BR /&gt;$(NCSCPATH) -c -o $@ $&amp;lt;&lt;BR /&gt;clean:&lt;BR /&gt;rm -rf $(DIRS)&lt;BR /&gt;.PHONY: clean&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now the error that it throws at me :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@localhost src]# pyang yang/FW_SERVICE.yang&lt;BR /&gt;yang/FW_SERVICE.yang:5: warning: imported module ietf-inet-types not used&lt;BR /&gt;&lt;STRONG&gt;yang/FW_SERVICE.yang:14: error: module "tailf-ned-fortinet-fortios-non-vdom" not found in search path&lt;/STRONG&gt;&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/ietf-yang-schema-mount.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/ietf-yang-schema-mount.yang:9: error: unexpected keyword "reference"&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/ietf-yang-schema-mount.yang:15: error: unexpected keyword "reference"&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-cluster.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-common.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-compliance.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-customers.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-devices.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-devices.yang:3789: error: XPath function "derived-from-or-self" is not defined in the XPath context&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-devices.yang:3997: error: XPath function "derived-from-or-self" is not defined in the XPath context&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-java-vm.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-log.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-packages.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-plan.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-python-vm.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-service-progress-monitoring.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-services.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-smart-license.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-snmp-notification-receiver.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-software.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-ssh.yang:2: error: bad value "1.1" (should be version)&lt;BR /&gt;/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs.yang:2: error: bad value "1.1" (should be version)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I try to compile the file :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@localhost src]# make --debug&lt;BR /&gt;GNU Make 3.82&lt;BR /&gt;Built for x86_64-redhat-linux-gnu&lt;BR /&gt;Copyright (C) 2010 Free Software Foundation, Inc.&lt;BR /&gt;License GPLv3+: GNU GPL version 3 or later &amp;lt;&lt;A href="http://gnu.org/licenses/gpl.html" target="_blank" rel="noopener"&gt;http://gnu.org/licenses/gpl.html&lt;/A&gt;&amp;gt;&lt;BR /&gt;This is free software: you are free to change and redistribute it.&lt;BR /&gt;There is NO WARRANTY, to the extent permitted by law.&lt;BR /&gt;Reading makefiles...&lt;BR /&gt;Updating goal targets....&lt;BR /&gt;File `all' does not exist.&lt;BR /&gt;File `fxs' does not exist.&lt;BR /&gt;Prerequisite `yang/FW_SERVICE.yang' is newer than target `../load-dir/FW_SERVICE.fxs'.&lt;BR /&gt;Must remake target `../load-dir/FW_SERVICE.fxs'.&lt;BR /&gt;Invoking recipe from Makefile:27 to update target `../load-dir/FW_SERVICE.fxs'.&lt;BR /&gt;/home/horia/ncs-5.3/bin/ncsc `ls FW_SERVICE-ann.yang &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&amp;amp; echo "-a FW_SERVICE-ann.yang"` \&lt;BR /&gt;--yangpath ../../fortinet-fortios-cli-5.4/src/ncsc-out/modules/yang -c -o ../load-dir/FW_SERVICE.fxs yang/FW_SERVICE.yang&lt;BR /&gt;yang/FW_SERVICE.&lt;STRONG&gt;yang:52: error: the node 'device' from module 'FW_SERVICE' is not found&lt;/STRONG&gt;&lt;BR /&gt;make: *** [../load-dir/FW_SERVICE.fxs] Error 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for the NED - I am using this one :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@localhost packages]# ls | grep forti&lt;BR /&gt;fortinet-fortios-cli-5.4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am struggling a little bit with this .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 11:14:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4051957#M4999</guid>
      <dc:creator>horia.gunica</dc:creator>
      <dc:date>2020-03-25T11:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Leafref firewall interface in service template</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052059#M5000</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the error refers to this path in line 52 of your YANG model:&lt;/P&gt;&lt;P&gt;path "deref(../../device)/../ncs:config/fortinet-fortios-non-vdom:system/fortinet-fortios-non-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, NSO cannot find ../../device (neither can I).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Roque&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 13:36:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052059#M5000</guid>
      <dc:creator>rogaglia</dc:creator>
      <dc:date>2020-03-25T13:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Leafref firewall interface in service template</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052064#M5001</link>
      <description>One interestic trick is to use the xpath tool to find the right xpath:&lt;BR /&gt;&lt;BR /&gt;admin@ncs&amp;gt; set devtools true&lt;BR /&gt;[ok][2020-03-25 14:37:30]&lt;BR /&gt;admin@ncs&amp;gt; configure&lt;BR /&gt;Entering configuration mode private&lt;BR /&gt;[ok][2020-03-25 14:37:36]&lt;BR /&gt;&lt;BR /&gt;[edit]&lt;BR /&gt;admin@ncs% xpath ctx firewalls-policies firewall-policy POL1 eval hosts&lt;BR /&gt;/firewalls-policies/firewall-policy[name='POL1']/hosts[ip4-address='1.1.1.1']&lt;BR /&gt;[ok][2020-03-25 14:38:30]&lt;BR /&gt;&lt;BR /&gt;[edit]&lt;BR /&gt;admin@ncs%</description>
      <pubDate>Wed, 25 Mar 2020 13:39:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052064#M5001</guid>
      <dc:creator>rogaglia</dc:creator>
      <dc:date>2020-03-25T13:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Leafref firewall interface in service template</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052079#M5002</link>
      <description>&lt;P&gt;Hi Rogaglia!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your quick reply !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried that as well but with no luck (pretty sure I am misconfiguring something) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried to find the correct xpath :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;admin@ncs% xpath ctx devices device Fortigate_VM config system interface interface-list port1 eval ip&lt;BR /&gt;&lt;STRONG&gt;/devices/device[name='Fortigate_VM']/config/fortinet-fortios-non-vdom:system/interface/interface-list[name='port1']/ip&lt;/STRONG&gt;&lt;BR /&gt;[ok][2020-03-25 09:39:56]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;leaf FW_PORT_SRC {&lt;BR /&gt;tailf:info "Incoming Interface";&lt;BR /&gt;type leafref {&lt;BR /&gt;&lt;STRONG&gt;path "/ncs:devices/ncs:device[name='Fortigate_VM']/ncs:config/fortinet-fortios-non-vdom:system/fortinet-fortios-non-vdom:interface/fortinet-fortios-non-vdom:interface-list";&lt;/STRONG&gt;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@localhost src]# make&lt;BR /&gt;/home/horia/ncs-5.3/bin/ncsc `ls FW_SERVICE-ann.yang &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&amp;amp; echo "-a FW_SERVICE-ann.yang"` \&lt;BR /&gt;--yangpath ../../fortinet-fortios-cli-5.4/src/ncsc-out/modules/yang -c -o ../load-dir/FW_SERVICE.fxs yang/FW_SERVICE.yang&lt;BR /&gt;yang/FW_SERVICE.yang:52: error: bad argument value &lt;STRONG&gt;"/ncs:devices/ncs:device[name='Fortigate_VM']/ncs:config/fortinet-fortios-non-vdom:system/fortinet-fortios-non-vdom:interface/fortinet-fortios-non-vdom:interface-list", should be of type path-arg&lt;/STRONG&gt;&lt;BR /&gt;make: *** [../load-dir/FW_SERVICE.fxs] Error 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess I am writing the path wrong ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 13:53:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052079#M5002</guid>
      <dc:creator>horia.gunica</dc:creator>
      <dc:date>2020-03-25T13:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Leafref firewall interface in service template</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052477#M5006</link>
      <description>Can you try adding the prefix to the "name" key (note that you are fixing the device name though):&lt;BR /&gt;path "/ncs:devices/ncs:device[ncs:name='Fortigate_VM']/ncs:config/fortinet-fortios-non-vdom:system/fortinet-fortios-non-vdom:interface/fortinet-fortios-non-vdom:interface-list";</description>
      <pubDate>Wed, 25 Mar 2020 21:36:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052477#M5006</guid>
      <dc:creator>rogaglia</dc:creator>
      <dc:date>2020-03-25T21:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Leafref firewall interface in service template</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052647#M5007</link>
      <description>&lt;P&gt;I modified it :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;leaf FW_PORT_SRC {&lt;BR /&gt;tailf:info "Incoming Interface";&lt;BR /&gt;type leafref {&lt;BR /&gt;path "/ncs:devices/ncs:device[&lt;STRONG&gt;ncs:name='Fortigate_VM'&lt;/STRONG&gt;]/ncs:config/fortinet-fortios-non-vdom:system/fortinet-fortios-non-vdom:interface/fortinet-fortios-non-vdom:interface-list";&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Same error unfortunetly :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@localhost src]# make&lt;BR /&gt;/home/horia/ncs-5.3/bin/ncsc `ls FW_SERVICE-ann.yang &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&amp;amp; echo "-a FW_SERVICE-ann.yang"` \&lt;BR /&gt;--yangpath ../../fortinet-fortios-cli-5.4/src/ncsc-out/modules/yang -c -o ../load-dir/FW_SERVICE.fxs yang/FW_SERVICE.yang&lt;BR /&gt;yang/&lt;STRONG&gt;FW_SERVICE.yang:52: error: bad argument value "/ncs:devices/ncs:device[ncs:name='Fortigate_VM']/ncs:config/fortinet-fortios-non-vdom:system/fortinet-fortios-non-vdom:interface/fortinet-fortios-non-vdom:interface-list", should be of type path-arg&lt;/STRONG&gt;&lt;BR /&gt;make: *** [../load-dir/FW_SERVICE.fxs] Error 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And yes - I know that I will fixate the device this way - but I am just trying to get at least this example working and I can start working towards a filter with "current device" from there .&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 07:17:05 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052647#M5007</guid>
      <dc:creator>horia.gunica</dc:creator>
      <dc:date>2020-03-26T07:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Leafref firewall interface in service template</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052734#M5008</link>
      <description>&lt;P&gt;I think the path-arg issue you are seeing here is because the path for a leafref must point to either a leaf-list or leaf node, but&amp;nbsp;&lt;SPAN&gt;fortinet-fortios-non-vdom:system/fortinet-fortios-non-vdom:interface/fortinet-fortios-non-vdom:interface-list is a list, not a leaf-list. Instead of pointing to the interface-list object, you need to point to one of the leaf nodes contained within it. Try using the following path:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;path "/ncs:devices/ncs:device[&lt;STRONG&gt;ncs:name='Fortigate_VM'&lt;/STRONG&gt;]/ncs:config/fortinet-fortios-non-vdom:system/fortinet-fortios-non-vdom:interface/fortinet-fortios-non-vdom:interface-list/fortinet-fortios-non-vdom:name";&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 10:02:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052734#M5008</guid>
      <dc:creator>tcragg1</dc:creator>
      <dc:date>2020-03-26T10:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Leafref firewall interface in service template</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052754#M5009</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I modified it :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    leaf FW_PORT_SRC {
        tailf:info "Incoming Interface";
      type leafref {
       path "/ncs:devices/ncs:device[name='Fortigate_VM']/ncs:config/fortinet-fortios-non-vdom:system/fortinet-fortios-non-vdom:interface/fortinet-fortios-non-vdom:interface-list/fortinet-fortios-non-vdom:name";
      }
    }&lt;/PRE&gt;&lt;P&gt;Same effect unfortunetly :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[root@localhost src]# make
/home/horia/ncs-5.3/bin/ncsc  `ls FW_SERVICE-ann.yang  &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&amp;amp; echo "-a FW_SERVICE-ann.yang"` \
             --yangpath ../../fortinet-fortios-cli-5.4/src/ncsc-out/modules/yang -c -o ../load-dir/FW_SERVICE.fxs yang/FW_SERVICE.yang
yang/FW_SERVICE.yang:52: error: bad argument value "/ncs:devices/ncs:device[name='Fortigate_VM']/ncs:config/fortinet-fortios-non-vdom:system/fortinet-fortios-non-vdom:interface/fortinet-fortios-non-vdom:interface-list/fortinet-fortios-non-vdom:name", should be of type path-arg
make: *** [../load-dir/FW_SERVICE.fxs] Error 1&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried another pyang validation - here is the output :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[root@localhost src]# pyang yang/FW_SERVICE.yang 
&lt;STRONG&gt;yang/FW_SERVICE.yang:5: warning: imported module ietf-inet-types not used
yang/FW_SERVICE.yang:14: error: module "tailf-ned-fortinet-fortios-non-vdom" not found in search path
yang/FW_SERVICE.yang:14: warning: imported module tailf-ned-fortinet-fortios-non-vdom not used
yang/FW_SERVICE.yang:52: error: bad value "/ncs:devices/ncs:device[name='Fortigate_VM']/ncs:config/fortinet-fortios-non-vdom:system/fortinet-fortios-non-vdom:interface/fortinet-fortios-non-vdom:interface-list/fortinet-fortios-non-vdom:name" (should be path-arg)&lt;/STRONG&gt;
/home/horia/ncs-5.3/src/ncs/yang/ietf-yang-schema-mount.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/ietf-yang-schema-mount.yang:9: error: unexpected keyword "reference"
/home/horia/ncs-5.3/src/ncs/yang/ietf-yang-schema-mount.yang:15: error: unexpected keyword "reference"
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-cluster.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-common.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-compliance.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-customers.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-devices.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-devices.yang:3789: error: XPath function "derived-from-or-self" is not defined in the XPath context
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-devices.yang:3997: error: XPath function "derived-from-or-self" is not defined in the XPath context
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-java-vm.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-log.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-packages.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-plan.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-python-vm.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-service-progress-monitoring.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-services.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-smart-license.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-snmp-notification-receiver.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-software.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs-ssh.yang:2: error: bad value "1.1" (should be version)
/home/horia/ncs-5.3/src/ncs/yang/tailf-ncs.yang:2: error: bad value "1.1" (should be version)&lt;/PRE&gt;&lt;P&gt;Why does it actually say that it cannot find tailf-ned-fortinet-fortios-non-vdom ? It's in the path in the MakeFile I included :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[root@localhost src]# ls ../../fortinet-fortios-cli-5.4/src/ncsc-out/modules/yang
fortinet-fortios-cli-5.4.yang  tailf-ned-fortinet-fortios-common.yang    tailf-ned-fortinet-fortios.yang
fortinet-fortios-cli.yang      tailf-ned-fortinet-fortios-non-vdom.yang&lt;/PRE&gt;&lt;P&gt;Best regards and thank you all for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 10:44:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4052754#M5009</guid>
      <dc:creator>horia.gunica</dc:creator>
      <dc:date>2020-03-26T10:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Leafref firewall interface in service template</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4053277#M5012</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried a few test cases:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp; import tailf-ned-fortinet-fortios-non-vdom {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; prefix fortios-non-vdom;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;....&lt;/FONT&gt;&lt;/P&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type leafref {&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path "/ncs:devices/ncs:device/ncs:name";&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; leaf dev-name {&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type string;&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default 'TESTKEY';&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; leaf fw-port-src {&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:info "Incoming Interface";&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type leafref {&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Compiles: deref points to device tree device specified in leaf device above&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // path "deref(../device)/../ncs:config/fortios-non-vdom:system/fortios-non-vdom:interface/fortios-non-vdom:interface-list/fortios-non-vdom:name";&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&amp;nbsp;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Compiles: likewise this set the device name to the name specified in the leaf device above&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // path "/ncs:devices/ncs:device[ncs:name=current()/../device]/ncs:config/fortios-non-vdom:system/fortios-non-vdom:interface/fortios-non-vdom:interface-list/fortios-non-vdom:name";&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&amp;nbsp;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Compiler error: bad argument value:&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; Don't think you can specify a literal as name here, the compiler will not know how to follow the path&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // path "/ncs:devices/ncs:device[ncs:name='TESTKEY']/ncs:config/fortios-non-vdom:system/fortios-non-vdom:interface/fortios-non-vdom:interface-list/fortios-non-vdom:name";&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&amp;nbsp;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Compiles: if you want the 'dev-name' to be static (like I think you are trying to do by specifying 'TESTKEY' above)&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; you'll need to do something like this.. to point to a leaf with the value set as a default value...&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path "/ncs:devices/ncs:device[ncs:name=current()/../dev-name]/ncs:config/fortios-non-vdom:system/fortios-non-vdom:interface/fortios-non-vdom:interface-list/fortios-non-vdom:name";&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/H6&gt;&lt;P&gt;&lt;FONT size="2"&gt;Makefile YANGPATH same as your's in first post..&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 22:58:20 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4053277#M5012</guid>
      <dc:creator>lmanor</dc:creator>
      <dc:date>2020-03-26T22:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Leafref firewall interface in service template</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4053581#M5015</link>
      <description>&lt;P&gt;Hi Imanor!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you very much for all your info !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I was missing ! Once I've inserted this section into the yang file and referenced it as you did below - it worked like a charm :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    leaf device {
      type leafref {
        path "/ncs:devices/ncs:device/ncs:name";
      }
    }

    leaf FW_PORT_SRC {
        tailf:info "Incoming Interface";
      type leafref {
       path "/ncs:devices/ncs:device[ncs:name=current()/../device]/ncs:config/fortios-non-vdom:system/fortios-non-vdom:interface/fortios-non-vdom:interface-list/fortios-non-vdom:name";
      }
    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your help and explanations!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Horia&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 11:54:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4053581#M5015</guid>
      <dc:creator>horia.gunica</dc:creator>
      <dc:date>2020-03-27T11:54:46Z</dc:date>
    </item>
  </channel>
</rss>

