<?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: Complex keys in YANG XPath leafref in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4640906#M7201</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/307031"&gt;@douglasfir&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your path is referring to two values: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;active&lt;/LI&gt;
&lt;LI&gt;interface-name&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;And it cannot refer back to just one leaf &lt;EM&gt;interface.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can either refer to both of them in separate leafs if you need them, something similar to this:&lt;/P&gt;
&lt;PRE&gt;    leaf active-state {
      type leafref {
        path "/ncs:devices/ncs:device[ncs:name=current()/../pe]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration/ifmgr-cfg:active";
      }
    }
    leaf intf-name {
      type leafref {
        path "/ncs:devices/ncs:device[ncs:name=current()/../pe]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration/ifmgr-cfg:interface-name";
      }
    }&lt;/PRE&gt;
&lt;P&gt;And it would list you all the configured values for both of these leafs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On the other hand if you want to access to some values inside the interface itself, you can do something similar to this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    leaf intf-desc {
      type leafref {
        path "/ncs:devices/ncs:device[ncs:name=current()/../pe]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration/ifmgr-cfg:description";
      }
    }&lt;/PRE&gt;
&lt;P&gt;If you try to reference to your leaf two values, you'll get errors like these:&lt;/P&gt;
&lt;PRE&gt;    leaf intf {
      type leafref {
        path "/ncs:devices/ncs:device[ncs:name=current()/../pe]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration";
      }
    }

Error:

Error: the leafref refers to non-leaf and non-leaf-list node 'interface-configuration' in module 'Cisco-IOS-XR-ifmgr-cfg' at ../../cisco-iosxr/src/ncsc-out/modules/yang/Cisco-IOS-XR-ifmgr-cfg.yang:324&lt;/PRE&gt;
&lt;P&gt;I hope this answers to your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;/Abdellah&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jun 2022 15:09:40 GMT</pubDate>
    <dc:creator>absabry</dc:creator>
    <dc:date>2022-06-29T15:09:40Z</dc:date>
    <item>
      <title>Complex keys in YANG XPath leafref</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4539417#M6779</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while developing NSO service and using NetConf NED for older versions of IOS XR I am facing a problem with a path to an interface configuration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that the interface is uniquely defined as "act Loopback3" instead of just "Loobpack3", so I don't know how to define a path in leafref. I have tried just refering to "interface-name" as shown below, but NSO reports an error later.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        leaf interface_name {
          type leafref {
            path /ncs:devices/ncs:devi:interface-configurations/ifmgr-cfg:interface-configuration/ifmgr-cfg:interface-name";
          }
        }&lt;/PRE&gt;&lt;P&gt;Now the question is where and how to put another leaf (ifmgr:active, responsible for "act" part) into the game together with interface-name, since the service is being compiled fine, but when trying to load it into NSO, I get something like the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Error: Failed to load ./state/packages-in-use/2/my-service/load-dir/peer-traffic-steering.fxs: Module my-service: The targets of the leafref path for node /services/my-service/interface/interface_name_test differ in type&lt;/PRE&gt;&lt;P&gt;I tried things like the following, but it doesn't work:&lt;/P&gt;&lt;PRE&gt;path "/ncs:devices/ncs:device[ncs:name=current()/../router]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration/ifmgr:active ifmgr-cfg:interface-name";   &lt;/PRE&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 15:57:52 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4539417#M6779</guid>
      <dc:creator>douglasfir</dc:creator>
      <dc:date>2022-01-26T15:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Complex keys in YANG XPath leafref</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4541661#M6789</link>
      <description>&lt;P&gt;You can try this:&lt;/P&gt;
&lt;PRE&gt;path "/ncs:devices/ncs:device[ncs:name=current()/../router]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration[ifmgr-cfg:active,ifmgr-cfg:interface-name]";   &lt;/PRE&gt;
&lt;P&gt;Yan&lt;/P&gt;
&lt;P&gt;NSO architecture support&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jan 2022 00:28:28 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4541661#M6789</guid>
      <dc:creator>ygorelik</dc:creator>
      <dc:date>2022-01-29T00:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Complex keys in YANG XPath leafref</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4605082#M7020</link>
      <description>&lt;P&gt;Hi Yan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry for the late response. I have tried to test the path using the following YANG model, but I get the error again:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;module test-complex-xpath {
  namespace "http://com/example/testcomplexxpath";
  prefix test-complex-xpath;

  import ietf-inet-types {
    prefix inet;
  }
  import tailf-ncs {
    prefix ncs;
  }

  import Cisco-IOS-XR-ifmgr-cfg {
    prefix ifmgr-cfg;
  }

  augment /ncs:services {
  list test-complex-xpath {
    key name;

    uses ncs:service-data;
    ncs:servicepoint "test-complex-xpath";

    leaf name {
      type string;
    }

    leaf router {
      type leafref {
        path "/ncs:devices/ncs:device/ncs:name";
      }
    }

    leaf interface {
      type leafref {
        path "/ncs:devices/ncs:device[ncs:name=current()/../router]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration[ifmgr-cfg:active,ifmgr-cfg:interface-name]"; 
      }
    }
  }
  }
}&lt;/PRE&gt;&lt;P&gt;The error is:&lt;/P&gt;&lt;PRE&gt;/home/ncs/nso-5.4.4.1/bin/ncsc `ls test-complex-xpath-ann.yang  &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&amp;amp; echo "-a test-complex-xpath-ann.yang"` \
        --fail-on-warnings \
        --yangpath /home/ncs/nso-use-cases/neds/asr9k-nc-7.1.3/src/ncsc-out/modules/yang \
        -c -o ../load-dir/test-complex-xpath.fxs yang/test-complex-xpath.yang
yang/test-complex-xpath.yang:35: error: bad argument value "/ncs:devices/ncs:device[ncs:name=current()/../router]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration[ifmgr-cfg:active,ifmgr-cfg:interface-name]", should be of type path-arg
make: *** [Makefile:29: ../load-dir/test-complex-xpath.fxs] Error 1&lt;/PRE&gt;&lt;P&gt;In the end I decided to go without this path, becase of switching to CLI NED for IOS XR, but it would be interesting to know how to reference the node when the key is made of two or more fields maybe for some future use case...&lt;/P&gt;&lt;P&gt;Thanks anyway!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Dragan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 13:13:51 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4605082#M7020</guid>
      <dc:creator>douglasfir</dc:creator>
      <dc:date>2022-05-05T13:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Complex keys in YANG XPath leafref</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4605606#M7022</link>
      <description>&lt;P&gt;Hey&lt;/P&gt;&lt;PRE&gt;.../vty-access-list[seq-num='1'][ip-network='1.1.1.0/24']&lt;/PRE&gt;&lt;P&gt;Combined keys are printed like this in xpath, I'm almost sure same thing can be done for leafrefs too.&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 08:39:09 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4605606#M7022</guid>
      <dc:creator>u.avsec</dc:creator>
      <dc:date>2022-05-06T08:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Complex keys in YANG XPath leafref</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4633181#M7170</link>
      <description>&lt;P&gt;Hi u.avsec,&lt;/P&gt;
&lt;P&gt;did you maybe try something based on this in the YANG model? These combined keys can be seen like you said when listing the configuration in CLI using "| display xpath", but unfortunately they don't seem to work in leafref path...&lt;/P&gt;
&lt;P&gt;Thanks anyway!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 13:24:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4633181#M7170</guid>
      <dc:creator>douglasfir</dc:creator>
      <dc:date>2022-06-16T13:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Complex keys in YANG XPath leafref</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4633545#M7173</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The best way to find the xpath easier is to too use an existing interface then you do a&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;show running devices device &amp;lt;yourdevice&amp;gt;config ... | display xpath&amp;nbsp;&lt;/PRE&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;P&gt;I manage to compile but since i'am not using Netconf on XR device i cannot test if the leafref is working correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you change your leaf&amp;nbsp; to this definition&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    leaf interface {
      type leafref {
        path "/ncs:devices/ncs:device[ncs:name=current()/../router]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration/ifmgr-cfg:interface-name"; 
      }
    }&lt;/LI-CODE&gt;&lt;P&gt;Here the changes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;test-complex-xpath/src/yang$ diff -c test-complex-xpath.yang.orig test-complex-xpath.yang
*** test-complex-xpath.yang.orig        Fri Jun 17 02:51:02 2022
--- test-complex-xpath.yang     Fri Jun 17 03:52:36 2022
***************
*** 32,38 ****

      leaf interface {
        type leafref {
!         path "/ncs:devices/ncs:device[ncs:name=current()/../router]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration[ifmgr-cfg:active,ifmgr-cfg:interface-name]";
        }
      }
    }
--- 32,38 ----

      leaf interface {
        type leafref {
!         path "/ncs:devices/ncs:device[ncs:name=current()/../router]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration/ifmgr-cfg:interface-name";
        }
      }
    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 01:56:11 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4633545#M7173</guid>
      <dc:creator>Nabsch</dc:creator>
      <dc:date>2022-06-17T01:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Complex keys in YANG XPath leafref</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4640676#M7200</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;This is something that I had to figure out yesterday and it works:&lt;/P&gt;&lt;PRE&gt;          type leafref {
            path "../../element-drivers[type=current()/../ned-type][operating-system=current()/../operating-system]/ned-versions";
          }&lt;/PRE&gt;&lt;P&gt;This is done with YANG 1.0 on NSO 5.8.1. List element-drivers has combined keys type and operating-system and the ned-versions I am pointing to is a leaf-list. I also noticed that referencing keys has to be done with other nodes only. I tried to hardcode&lt;EM&gt; type='cli'&lt;/EM&gt; string and I got and error.&lt;/P&gt;&lt;P&gt;It is not exactly what you want as I am referencing other node based on the keys but maybe it can help.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 07:50:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4640676#M7200</guid>
      <dc:creator>u.avsec</dc:creator>
      <dc:date>2022-06-29T07:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Complex keys in YANG XPath leafref</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4640906#M7201</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/307031"&gt;@douglasfir&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your path is referring to two values: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;active&lt;/LI&gt;
&lt;LI&gt;interface-name&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;And it cannot refer back to just one leaf &lt;EM&gt;interface.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can either refer to both of them in separate leafs if you need them, something similar to this:&lt;/P&gt;
&lt;PRE&gt;    leaf active-state {
      type leafref {
        path "/ncs:devices/ncs:device[ncs:name=current()/../pe]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration/ifmgr-cfg:active";
      }
    }
    leaf intf-name {
      type leafref {
        path "/ncs:devices/ncs:device[ncs:name=current()/../pe]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration/ifmgr-cfg:interface-name";
      }
    }&lt;/PRE&gt;
&lt;P&gt;And it would list you all the configured values for both of these leafs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On the other hand if you want to access to some values inside the interface itself, you can do something similar to this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    leaf intf-desc {
      type leafref {
        path "/ncs:devices/ncs:device[ncs:name=current()/../pe]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration/ifmgr-cfg:description";
      }
    }&lt;/PRE&gt;
&lt;P&gt;If you try to reference to your leaf two values, you'll get errors like these:&lt;/P&gt;
&lt;PRE&gt;    leaf intf {
      type leafref {
        path "/ncs:devices/ncs:device[ncs:name=current()/../pe]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration";
      }
    }

Error:

Error: the leafref refers to non-leaf and non-leaf-list node 'interface-configuration' in module 'Cisco-IOS-XR-ifmgr-cfg' at ../../cisco-iosxr/src/ncsc-out/modules/yang/Cisco-IOS-XR-ifmgr-cfg.yang:324&lt;/PRE&gt;
&lt;P&gt;I hope this answers to your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;/Abdellah&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 15:09:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4640906#M7201</guid>
      <dc:creator>absabry</dc:creator>
      <dc:date>2022-06-29T15:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Complex keys in YANG XPath leafref</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4650255#M7229</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1258687"&gt;@Nabsch&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;I have tried this approach, the YANG model indeed gets compiled this time, but the error is detected once I try to import it into NSO:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Error: Failed to load ./state/packages-in-use/3/test-complex-xpath/load-dir/test-complex-xpath.fxs: Module test-complex-xpath: The targets of the leafref path for node /services/test-complex-xpath/interface differ in type&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, it seems that there is another issue now, as this approach works fine with ifmgr-active only, as &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/817000"&gt;@absabry&lt;/a&gt; suggested:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;      leaf active-state {
        type leafref {
          path "/ncs:devices/ncs:device[ncs:name=current()/../router]/ncs:config/ifmgr-cfg:interface-configurations/ifmgr-cfg:interface-configuration/ifmgr-cfg:active";
        }
      }&lt;/LI-CODE&gt;
&lt;P&gt;I looked into the Cisco-IOS-XR-ifmgr-cfg.yang to compare active and interface-name leafs and the only difference that I see is that data type for interface-name is defined in another YANG module (Cisco-IOS-XR-types), so maybe this somehow is not recognized by NSO properly?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;...
  import Cisco-IOS-XR-types {
    prefix xr;
  } 
...
     leaf active {
        type Interface-active;
        description
          "Whether the interface is active or
           preconfigured";
      }
      leaf interface-name {
        type xr:Interface-name;
        description
          "The name of the interface";
      }
...&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 14 Jul 2022 13:50:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4650255#M7229</guid>
      <dc:creator>douglasfir</dc:creator>
      <dc:date>2022-07-14T13:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Complex keys in YANG XPath leafref</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4650303#M7230</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/817000"&gt;@absabry&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;thanks for you answer. I have tried the approach and it works fine for &lt;STRONG&gt;active&lt;/STRONG&gt; leaf, but for the &lt;STRONG&gt;interface-name&lt;/STRONG&gt; leaf it is reporting the error, as mentioned in the reply to &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1258687"&gt;@Nabsch&lt;/a&gt; above. I looked into the &lt;STRONG&gt;&lt;SPAN class="pl-s"&gt;Cisco-IOS-XR-ifmgr-cfg&lt;/SPAN&gt;&lt;/STRONG&gt; YANG model to compare the data types for both and I am not sure if it has something with NSO not being able to properly interpret data type defined in another YANG model for &lt;STRONG&gt;interface-name&lt;/STRONG&gt;, while for &lt;STRONG&gt;active&lt;/STRONG&gt; leaf it works fine, as the type definition is inside the same YANG model...&lt;/P&gt;
&lt;P&gt;I did one more test now with the YANG model &lt;STRONG&gt;Cisco-IOS-XR-um-interface-cfg&lt;/STRONG&gt; which uses the same data type for interface-name as in "legacy" model &lt;SPAN class="pl-s"&gt;Cisco-IOS-XR-ifmgr-cfg&lt;/SPAN&gt;. This time there was not issue...do you have maybe some idea what might be the problem here? Maybe I could opent a separate thread for this?&lt;/P&gt;
&lt;P&gt;Regards!&lt;/P&gt;
&lt;P&gt;Dragan&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 16:30:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/complex-keys-in-yang-xpath-leafref/m-p/4650303#M7230</guid>
      <dc:creator>douglasfir</dc:creator>
      <dc:date>2022-07-14T16:30:47Z</dc:date>
    </item>
  </channel>
</rss>

