<?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: How to reference existing interface types/interfaces/configured IP's in yang service model in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3791131#M3205</link>
    <description />
    <pubDate>Wed, 30 Jan 2019 12:28:16 GMT</pubDate>
    <dc:creator>mohamkh7</dc:creator>
    <dc:date>2019-01-30T12:28:16Z</dc:date>
    <item>
      <title>How can I reference existing interface types/interfaces/configured IP's in yang service model?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537469#M1476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question regarding a basic YANG model I am creating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is a YANG model to collect input data in NSO WebUI for a SitetoSite VPN (IPSec) Service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please consider the following leafs/typedefs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;typedef interface_type {&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type enumeration {&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enum GigabitEthernet;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enum Ethernet;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enum FastEthernet;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12.8px;"&gt;typedef interface_number {&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type string {&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pattern "(\\d+)(/)(\\d+)";&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;[...]&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;leaf endpoint1 {&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type leafref {&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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";&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mandatory true;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; description 'Endpoint number one for VPN Tunnel';&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:info "Endpoint number one for VPN Tunnel";&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leaf interface1_type {&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type interface_type;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //type leafref {&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; path "????";&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //}&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mandatory true;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; description 'Interface type of interface 1';&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:info "Interface type of interface 1";&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leaf interface1_number {&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type interface_number;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //type leafref{&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //path "????";&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //}&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mandatory true;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; description 'Interface number of interface 1';&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:info "Interface number of interface 1";&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;The leaf endpoint1 gives me the possibility to choose only devices which exist in the NSO CDB (in WebUI). So far so good.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;I would like to have a similar dropdown for interface type and interface number (or name) which then dont use the typedefs at the top but rather reference the actual info in the CDB.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;So the dropdown for "interface_type" should show all interface types which can be configured on an IOS device and the dropdown for "interface_number" should show only the interface numbers/names of actually available interfaces on the device specified in endpoint1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;I have tried various things which all led nowhere for me (importing the yang model of the cisco-ios NED into my own and tried referencing the grouping/choice -interface-name-grouping/interface-choice- which exist in the NED yang model to populate the dropdown.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Further I am trying to access the actually configured IP address of a specific interface. My path expression there doesnt work either (&lt;SPAN style="color: #000000; font-family: 'courier new', courier; font-size: 12.8px;"&gt;/ncs:devices/ncs:device{R1_PE}/ncs:config/ios:interface/GigabitEthernet{5/0}/ios:ip/ios:address/ios:primary/ios:address). &lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;During compilation I keep getting an error that my path argument is wrong: "should be of type path-arg".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="color: #000000; font-size: 12.8px; font-family: arial, helvetica, sans-serif;"&gt;As you can probably tell I am not great with XPath...pretty sure the paths I tried arent even valid XPath and therefore I get the error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="color: #000000; font-size: 12.8px; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: #000000; font-size: 12.8px; font-family: arial, helvetica, sans-serif;"&gt;Can someone please help? Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="gmail_default" style="color: #000000; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2019 11:55:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537469#M1476</guid>
      <dc:creator>ian.scheidler1</dc:creator>
      <dc:date>2019-03-01T11:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to reference existing interface types/interfaces/configured IP's in yang service model</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537470#M1477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try something of this sort:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;choice interface {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case ios-GigabitEthernet {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leaf GigabitEthernet {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type leafref {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path "deref(../../&lt;SPAN style="font-family: 'courier new', courier;"&gt;endpoint1&lt;/SPAN&gt;)/../ncs:config/ios:interface/ios:GigabitEthernet/ios:name";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case ios-TenGigabitEthernet {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leaf TenGigabitEthernet {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type leafref {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path "deref(../../&lt;SPAN style="font-family: 'courier new', courier;"&gt;endpoint1&lt;/SPAN&gt;)/../ncs:config/ios:interface/ios:TenGigabitEthernet/ios:name";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A choice statement allows you define different mutually exclusive cases.&lt;/P&gt;&lt;P&gt;So the result will be that you can either defined the leaf GigabitEthernet or TenGigabitEthernet but not both of them at the same time (you can add more cases). This should replace the interface-type leaf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The path on the leafref is dereferencing your endpoint1 leaf which should be present higher on hierarchy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you get it compiled, I suggest testing in on ncs_cli before trying it on the web UI.&lt;/P&gt;&lt;P&gt;It will work on the web UI, but will be easier to debug on the CLI (on the web UI, you might need to reload the page once you select the device - depending on your implementation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Yftach&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 13:22:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537470#M1477</guid>
      <dc:creator>yfherzog</dc:creator>
      <dc:date>2017-07-12T13:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to reference existing interface types/interfaces/configured IP's in yang service model</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537471#M1478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BTW, Instead of the choice statement, you can also use interface-type enumerations leaf (as you did), and have the different interface leafrefs with relevant 'when' statement according to the interface-type leaf.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 13:36:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537471#M1478</guid>
      <dc:creator>yfherzog</dc:creator>
      <dc:date>2017-07-12T13:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reference existing interface types/interfaces/configured IP's in yang service model?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537472#M1479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for the helpful answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try your XPATH expression "&lt;SPAN style="color: #3d3d3d; font-family: arial; font-size: 12px;"&gt;deref(../../&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier; color: #3d3d3d;"&gt;endpoint1&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial; font-size: 12px;"&gt;)/../ncs:config/ios:interface/ios:GigabitEthernet/ios:name"&lt;/SPAN&gt; I get the following error:&lt;/P&gt;&lt;P&gt;error: XPath error: Invalid namespace prefix: ios&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I have to import the yang model from the Cisco IOS NED into my own yang model and assign prefix ios to it? If yes, how best do I import the ios NED yang model (there seem to be several mechanisms-import/include/uses)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2017 10:01:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537472#M1479</guid>
      <dc:creator>ian.scheidler1</dc:creator>
      <dc:date>2017-07-13T10:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reference existing interface types/interfaces/configured IP's in yang service model?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537473#M1480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;OK...answering this one myself:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;At the top of my own YANG model I needed:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;import tailf-ned-cisco-ios{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; prefix ios;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; }&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Also the Makefile needs something uncommented and patched, so that the NED YANG model is considered at compilation time:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;## Uncomment and patch the line below if you have a dependency to a NED&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;## or to other YANG files&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;YANGPATH += ../../&lt;STRONG&gt;tailf-ned-cisco-ios&lt;/STRONG&gt;/src/ncsc-out/modules/yang \&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ../../&lt;STRONG&gt;cisco-ios&lt;/STRONG&gt;/src/yang&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Nevertheless I still get an error message:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;error: the node 'interface' from module 'tailf-ned-cisco-ios' (in node 'config' from 'tailf-ncs') is not found&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;This is the path expression I use:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"deref(../endpoint1)/../ncs:config/ios:interface/ios:GigabitEthernet/ios:name"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;I tried &lt;/SPAN&gt;"deref(&lt;SPAN style="font-size: 12pt;"&gt;../&lt;/SPAN&gt;../endpoint1)/../ncs:config/ios:interface/ios:GigabitEthernet/ios:name" &lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;but that gave me an error that node endpoint1 could not be found, so I am assuming the first path expression is better/correct.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2017 11:43:05 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537473#M1480</guid>
      <dc:creator>ian.scheidler1</dc:creator>
      <dc:date>2017-07-13T11:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reference existing interface types/interfaces/configured IP's in yang service model?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537474#M1481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes. The import statement on the YANG file and updating the Makefile were the steps to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what is the tailf-ned-cisco-ios line on your makefile. That might be causing the confusion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For me, the following line does the job (in place of the two lines you provided):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YANGPATH += --yangpath ../../cisco-ios/src/ncsc-out/modules/yang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cisco-ios should be the NED directory, located under the packages directory on your system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The YANG import statement should be as you provided it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import tailf-ned-cisco-ios { prefix ios; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;note that the taif-ned-cisco-ios is the module name defined inside the cisco-ios NED directory (have a look under cisco-ios/src/yang), so the makefile, should include only the directory path (cisco-ios), while the import statement in your YANG module should refer to the module name (taif-ned-cisco-ios).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if it works for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yftach&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2017 11:57:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537474#M1481</guid>
      <dc:creator>yfherzog</dc:creator>
      <dc:date>2017-07-13T11:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reference existing interface types/interfaces/configured IP's in yang service model?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537475#M1482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yftach,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this worked for me as YANGPATH in the Makefile:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial; font-size: 12px;"&gt;YANGPATH += ../../cisco-ios/src/ncsc-out/modules/yang&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial; font-size: 12px;"&gt;In your reply you have &lt;SPAN style="color: #3d3d3d; font-family: arial; font-size: 12px;"&gt;YANGPATH += &lt;STRONG&gt;--yangpath&lt;/STRONG&gt; ../../cisco-ios/src/ncsc-out/modules/yang...not sure where --yangpath came from. Without it it works fine.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial; font-size: 12px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial; font-size: 12px;"&gt;Thank you very much. Your answers have been a great help to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2017 12:32:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537475#M1482</guid>
      <dc:creator>ian.scheidler1</dc:creator>
      <dc:date>2017-07-13T12:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reference existing interface types/interfaces/configured IP's in yang service model?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537476#M1483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad to know you were able to make it work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2017 12:43:05 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537476#M1483</guid>
      <dc:creator>yfherzog</dc:creator>
      <dc:date>2017-07-13T12:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reference existing interface types/interfaces/configured IP's in yang service model?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537477#M1484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The --yangpath option was needed in a previous version of the Makefiles and it is not longer needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Roque&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: If you check your Makefile, you would find the "--yangpath" option already added here:&lt;/P&gt;&lt;P&gt;NCSCPATH&amp;nbsp;&amp;nbsp; = $(YANGPATH:%=--yangpath %)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2017 15:02:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537477#M1484</guid>
      <dc:creator>rogaglia</dc:creator>
      <dc:date>2017-07-13T15:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reference existing interface types/interfaces/configured IP's in yang service model?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537478#M1485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as already mentioned in my original post I would also like to get the IP Information for the interface from the CDB.&lt;/P&gt;&lt;P&gt;I am currently trying the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case GigabitEthernet{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leaf GigabitEthernet-1{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type leafref {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path "deref(../endpoint1)/../ncs:config/ios:interface/ios:GigabitEthernet/ios:name";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leaf ip-1{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type leafref{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path "&lt;STRONG&gt;deref(./GigabitEthernet-1/../ios:ip/ios:address/ios:primary/ios:address)"; //????&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Again I am getting an error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;error: bad argument value "deref(./GigabitEthernet-1/ios:ip/ios:address/ios:primary/ios:address)", should be of type path-arg&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;a) What would be a valid and correct path-arg to get the IP address of the selected Interface?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;b) Is there some general documentation on the deref() function available? Where?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks in advance for the help.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 08:00:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537478#M1485</guid>
      <dc:creator>ian.scheidler1</dc:creator>
      <dc:date>2017-07-14T08:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reference existing interface types/interfaces/configured IP's in yang service model?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537479#M1486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for documentation on the deref function, you can have a look at the nso_man document and also at the NSO development guide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For what your are trying to achieve with the IP address, can you clarify what you're aiming for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you look at the device leaf and the GigabitEthernet leaf, they are both pointing to LISTS on the IOS NED.&lt;/P&gt;&lt;P&gt;In the path for ip-1 in the other hand, all nodes are containers (except from 'address' at the end which is a leaf).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With that in mind, I'm not sure what should be the point of having a leafref, which can point to, at most, one value.&lt;/P&gt;&lt;P&gt;Can you explain the functionally you are looking for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// interface * / ip address&lt;/P&gt;&lt;P&gt;container address {&lt;/P&gt;&lt;P&gt;&amp;nbsp; tailf:info "Set the IP address of an interface";&lt;/P&gt;&lt;P&gt;&amp;nbsp; tailf:cli-incomplete-command;&lt;/P&gt;&lt;P&gt;&amp;nbsp; tailf:cli-incomplete-no;&lt;/P&gt;&lt;P&gt;&amp;nbsp; choice address-choice {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case fixed-case {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // interface * / ip address a.b.c.d m.a.s.k&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; container primary {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:cli-drop-node-name;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:cli-compact-syntax;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:cli-sequence-commands;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:cli-incomplete-command;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:cli-incomplete-no;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // dep: before this created, must change l2vpn xconnect context&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:cli-diff-dependency "/ios:l2vpn-xconnect/l2vpn/xconnect/context" {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:cli-trigger-on-set;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leaf address {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:cli-drop-node-name;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:cli-incomplete-command;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:cli-incomplete-no;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type inet:ipv4-address {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tailf:info "A.B.C.D;;IP address";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Jul 2017 11:28:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537479#M1486</guid>
      <dc:creator>yfherzog</dc:creator>
      <dc:date>2017-07-16T11:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reference existing interface types/interfaces/configured IP's in yang service model?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537480#M1487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to select an interface by the list of IP primary IP addresses instead of the name of the interface, then you can have the path of the interface leafref to point to the IP address, instead of the name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, instead of this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leaf GigabitEthernet {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type leafref {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path "deref(../../&lt;SPAN style="font-family: 'courier new', courier;"&gt;endpoint1&lt;/SPAN&gt;)/../ncs:config/ios:interface/ios:GigabitEthernet/ios:name";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should be able to have something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leaf GigabitEthernet {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type leafref {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path "deref(../../&lt;SPAN style="font-family: 'courier new', courier;"&gt;endpoint1&lt;/SPAN&gt;)/../ncs:config/ios:interface/ios:GigabitEthernet/&lt;STRONG&gt;ios:ip/ios:address/ios:primary/ios:address&lt;/STRONG&gt;";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way, you should get a list of IP addresses, instead of list of interface names, but I'm not sure if this is what you're after.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that your YANG model does not have to include all the parameters that you want your service to have access to. It should only include the parameters which requires selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if your service is always going to use the primary IP address already configured on the interface that the user will select, then you don't have to include the IP on the YANG model. Instead, the service mapping logic (Java, Python, XML) can fetch this information from the interface configurations in NSO.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2017 06:55:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537480#M1487</guid>
      <dc:creator>yfherzog</dc:creator>
      <dc:date>2017-07-17T06:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reference existing interface types/interfaces/configured IP's in yang service model?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537481#M1488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your replies.&lt;/P&gt;&lt;P&gt;I simply wanted to have the (primary) IP address corresponding to the selected interface on a leaf which I could then reference in my XML template, so there wouldnt be any need for fetching it in the service logic in Java/Python.&lt;/P&gt;&lt;P&gt;I guess you are right though, the selection process for the user finishes by selecting the interface, which implies a certain IP, which then gets fetched in the service logic using Java/Python. Thanks for putting me on that path which I am now likely to follow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2017 07:40:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3537481#M1488</guid>
      <dc:creator>ian.scheidler1</dc:creator>
      <dc:date>2017-07-17T07:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to reference existing interface types/interfaces/configured IP's in yang service model</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3791131#M3205</link>
      <description />
      <pubDate>Wed, 30 Jan 2019 12:28:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-reference-existing-interface-types-interfaces/m-p/3791131#M3205</guid>
      <dc:creator>mohamkh7</dc:creator>
      <dc:date>2019-01-30T12:28:16Z</dc:date>
    </item>
  </channel>
</rss>

