<?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: Pros and Cons: Single Entry List vs Container in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/pros-and-cons-single-entry-list-vs-container/m-p/3521191#M1328</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 would think that a container is the natural choice. However, I have seen many times containers that over time evolve to lists as the service evolve. So, one point to consider is how do you imagine the model to evolve and if you could think on the need for many instances of the same data in a future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Roque&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 May 2017 18:58:59 GMT</pubDate>
    <dc:creator>rogaglia</dc:creator>
    <dc:date>2017-05-31T18:58:59Z</dc:date>
    <item>
      <title>Pros and Cons: Single Entry List vs Container</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/pros-and-cons-single-entry-list-vs-container/m-p/3521190#M1327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Customer would like to have certain entities modeled explicitly withing the data model. The one below is just an example. In that case the address could be easily a mandatory leaf directly under test-service list. However for the definition of more granular structure customer wants to model certain attributes separately. In this case an entity - let's call it config-ipv4 with some attributes will need to exist for each entry in test-service list. &lt;/P&gt;&lt;P&gt;One way to model it will be to use list with min and max elements 1.&lt;/P&gt;&lt;P&gt;The other way to use non presence containers with mandatory leaf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;container test {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; list test-service {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; key service-id;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leaf service-id {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type string;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; list config-ipv4-list {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; key address;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min-elements 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max-elements 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leaf address {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type inet:ipv4-address;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; container config-ipv4-container {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leaf address {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mandatory true;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type inet:ipv4-address;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One benefit of defining it as a container would be that in case of usage of CLI we'd be automatically asked for the value of this containers leaf. While for the list min-max elements statement we'd only receive and error at commit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are the other pros and cons?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2019 11:51:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/pros-and-cons-single-entry-list-vs-container/m-p/3521190#M1327</guid>
      <dc:creator>mmalysz</dc:creator>
      <dc:date>2019-03-01T11:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Pros and Cons: Single Entry List vs Container</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/pros-and-cons-single-entry-list-vs-container/m-p/3521191#M1328</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 would think that a container is the natural choice. However, I have seen many times containers that over time evolve to lists as the service evolve. So, one point to consider is how do you imagine the model to evolve and if you could think on the need for many instances of the same data in a future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Roque&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 18:58:59 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/pros-and-cons-single-entry-list-vs-container/m-p/3521191#M1328</guid>
      <dc:creator>rogaglia</dc:creator>
      <dc:date>2017-05-31T18:58:59Z</dc:date>
    </item>
  </channel>
</rss>

