<?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 can i use leaf ref to choose a device from specific group of devices? in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-use-leaf-ref-to-choose-a-device-from-specific-group-of/m-p/3909901#M4183</link>
    <description>&lt;P&gt;Hi Ahmed,&lt;BR /&gt;One solution can be where you hard-code your group-name as a leaf in your yang and then another leaf for your devices referring to the "group-name" leaf in the yang. This can be a user input(more dynamic) or defaulted (static)&lt;BR /&gt;&lt;BR /&gt;Here's a pattern for reference&lt;BR /&gt;leaf group-name {&lt;BR /&gt;type string {&lt;BR /&gt;pattern "MY GROUP";&lt;BR /&gt;}&lt;BR /&gt;default "MY GROUP";&lt;BR /&gt;tailf:info "desired group name";&lt;BR /&gt;description "desired group name";&lt;BR /&gt;}&lt;BR /&gt;leaf device-name {&lt;BR /&gt;type leafref {&lt;BR /&gt;path "/ncs:devices/ncs:device-group[ncs:name=current()/../group-name]/ncs:device-name";&lt;BR /&gt;}&lt;BR /&gt;tailf:info "MY GROUP devices";&lt;BR /&gt;description "MY GROUP devices";&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2019 02:05:22 GMT</pubDate>
    <dc:creator>SnehaAnn</dc:creator>
    <dc:date>2019-08-19T02:05:22Z</dc:date>
    <item>
      <title>How can i use leaf ref to choose a device from specific group of devices?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-use-leaf-ref-to-choose-a-device-from-specific-group-of/m-p/3909852#M4182</link>
      <description>&lt;P&gt;I want to use leaf ref to make it possible to make dropdown list of devices in a specific group and choose one to configur ?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 19:59:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-use-leaf-ref-to-choose-a-device-from-specific-group-of/m-p/3909852#M4182</guid>
      <dc:creator>Ahmed Elsamahy</dc:creator>
      <dc:date>2019-08-18T19:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: How can i use leaf ref to choose a device from specific group of devices?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-use-leaf-ref-to-choose-a-device-from-specific-group-of/m-p/3909901#M4183</link>
      <description>&lt;P&gt;Hi Ahmed,&lt;BR /&gt;One solution can be where you hard-code your group-name as a leaf in your yang and then another leaf for your devices referring to the "group-name" leaf in the yang. This can be a user input(more dynamic) or defaulted (static)&lt;BR /&gt;&lt;BR /&gt;Here's a pattern for reference&lt;BR /&gt;leaf group-name {&lt;BR /&gt;type string {&lt;BR /&gt;pattern "MY GROUP";&lt;BR /&gt;}&lt;BR /&gt;default "MY GROUP";&lt;BR /&gt;tailf:info "desired group name";&lt;BR /&gt;description "desired group name";&lt;BR /&gt;}&lt;BR /&gt;leaf device-name {&lt;BR /&gt;type leafref {&lt;BR /&gt;path "/ncs:devices/ncs:device-group[ncs:name=current()/../group-name]/ncs:device-name";&lt;BR /&gt;}&lt;BR /&gt;tailf:info "MY GROUP devices";&lt;BR /&gt;description "MY GROUP devices";&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 02:05:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-use-leaf-ref-to-choose-a-device-from-specific-group-of/m-p/3909901#M4183</guid>
      <dc:creator>SnehaAnn</dc:creator>
      <dc:date>2019-08-19T02:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: How can i use leaf ref to choose a device from specific group of devices?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-use-leaf-ref-to-choose-a-device-from-specific-group-of/m-p/3909933#M4184</link>
      <description>Thanks Senha . I will try it and send you feedback</description>
      <pubDate>Mon, 19 Aug 2019 04:16:03 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-use-leaf-ref-to-choose-a-device-from-specific-group-of/m-p/3909933#M4184</guid>
      <dc:creator>Ahmed Elsamahy</dc:creator>
      <dc:date>2019-08-19T04:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can i use leaf ref to choose a device from specific group of devices?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-use-leaf-ref-to-choose-a-device-from-specific-group-of/m-p/3910066#M4185</link>
      <description>thanks Sneha</description>
      <pubDate>Mon, 19 Aug 2019 09:16:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-can-i-use-leaf-ref-to-choose-a-device-from-specific-group-of/m-p/3910066#M4185</guid>
      <dc:creator>Ahmed Elsamahy</dc:creator>
      <dc:date>2019-08-19T09:16:23Z</dc:date>
    </item>
  </channel>
</rss>

