<?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: Validate YANG models against CLI arguments in Tools</title>
    <link>https://community.cisco.com/t5/tools/validate-yang-models-against-cli-arguments/m-p/3513119#M2885</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At first look, this sounds very questionable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;This App is probably parsing YANG models under the hood and exposing variables in YANG as arguments on the CLI.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 12.8px; font-size: 12px; font-family: Arial; color: #232323;"&gt;example: &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;lets say the app is doing BGP YANG model as CLI arguments, where they will look like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 12.8px; font-size: 12px; font-family: Arial; color: #232323;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;./app.py -a bgp_neighbor -b bgp_source -c bgp_port -d remote_AS_number -e local_AS_number&lt;/SPAN&gt;&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nodes should really be specified by path instead of name.&amp;nbsp; A name can be used at different places in a model.&amp;nbsp; Also, the size of an average model will make a CLI-argument approach rather impractical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe if you describe the underlying problem that the app is trying to achieve, we could see if YDK can help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Apr 2017 19:10:14 GMT</pubDate>
    <dc:creator>saalvare</dc:creator>
    <dc:date>2017-04-06T19:10:14Z</dc:date>
    <item>
      <title>Validate YANG models against CLI arguments</title>
      <link>https://community.cisco.com/t5/tools/validate-yang-models-against-cli-arguments/m-p/3513117#M2883</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;We have a CLI-based app that leverages YANG models and I am supposed to test that, but i am clueless on where to start, I wonder if YDK can be used for that purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This App is probably parsing YANG models under the hood and exposing variables in YANG as arguments on the CLI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 12.8px; font-family: Arial; color: #232323;"&gt;example: &lt;SPAN style="font-size: 10pt;"&gt; lets say the app is doing BGP YANG model as CLI arguments, where they will look like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 12.8px; font-family: Arial; color: #232323;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;./app.py -a bgp_neighbor -b bgp_source -c bgp_port -d remote_AS_number -e local_AS_number&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 12.8px; font-family: Arial; color: #232323;"&gt;I just want to make sure that all the arguments are there and nothing is missing, without having to read every single argument, so&amp;nbsp; i am basically looking for automating that task of comparing CLI arguments with YANG models.&lt;/P&gt;&lt;P style="margin-bottom: 12.8px; font-family: Arial; color: #232323;"&gt;Probably i need to write some code to validate that CLI will expose all the YANG variables in the model, we need to make sure that CLI is not missing any variables.&lt;/P&gt;&lt;P style="margin-bottom: 12.8px; font-family: Arial; color: #232323;"&gt;Do you think there are tools out there that can be stitched together with YDK to do something similar, without having to write code from scratch?&lt;/P&gt;&lt;P style="margin-bottom: 12.8px; font-family: Arial; color: #232323;"&gt;Thanks,&lt;/P&gt;&lt;P style="margin-bottom: 12.8px; font-family: Arial; color: #232323;"&gt;Hakan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Apr 2017 06:04:41 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/validate-yang-models-against-cli-arguments/m-p/3513117#M2883</guid>
      <dc:creator>haksson81</dc:creator>
      <dc:date>2017-04-05T06:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Validate YANG models against CLI arguments</title>
      <link>https://community.cisco.com/t5/tools/validate-yang-models-against-cli-arguments/m-p/3513118#M2884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hakan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think there's anything the YDK can help with here out of the box. It seems that the arguments you need to validate would completely depend on the YANG model, so have you thought about expressing those arguments in a way that allows you to map them to paths in the yang model you care about?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without knowing  bit more about what you are trying to achieve and how it relates to your potential target models, it's hard to conclude how the YDK may or may not be able to help you, or if some other solution is more appropriate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Einar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2017 17:01:13 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/validate-yang-models-against-cli-arguments/m-p/3513118#M2884</guid>
      <dc:creator>einarnn</dc:creator>
      <dc:date>2017-04-06T17:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Validate YANG models against CLI arguments</title>
      <link>https://community.cisco.com/t5/tools/validate-yang-models-against-cli-arguments/m-p/3513119#M2885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At first look, this sounds very questionable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;This App is probably parsing YANG models under the hood and exposing variables in YANG as arguments on the CLI.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 12.8px; font-size: 12px; font-family: Arial; color: #232323;"&gt;example: &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;lets say the app is doing BGP YANG model as CLI arguments, where they will look like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 12.8px; font-size: 12px; font-family: Arial; color: #232323;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;./app.py -a bgp_neighbor -b bgp_source -c bgp_port -d remote_AS_number -e local_AS_number&lt;/SPAN&gt;&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nodes should really be specified by path instead of name.&amp;nbsp; A name can be used at different places in a model.&amp;nbsp; Also, the size of an average model will make a CLI-argument approach rather impractical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe if you describe the underlying problem that the app is trying to achieve, we could see if YDK can help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2017 19:10:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/validate-yang-models-against-cli-arguments/m-p/3513119#M2885</guid>
      <dc:creator>saalvare</dc:creator>
      <dc:date>2017-04-06T19:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Validate YANG models against CLI arguments</title>
      <link>https://community.cisco.com/t5/tools/validate-yang-models-against-cli-arguments/m-p/3513120#M2886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am a network guy, so its not easy to explain programmability things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I gave that example (imaginary) to make my question simple, and of course, you are right, its a full path, something like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;./app.py create &amp;lt;CPENAME&amp;gt; pe &amp;lt;PENAME&amp;gt; network &amp;lt;NETWORKNAME&amp;gt; force&lt;/P&gt;&lt;P&gt;./app.py delete &amp;lt;CPENAME&amp;gt; pe &amp;lt;PENAME&amp;gt; network &amp;lt;NETWORKNAME&amp;gt; force&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once a create is used then all recursive arguments are populated from that yang model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, in my case, say the latter argument called 'force' is already in the YANG model but it doesn't serve any purpose/function, which was a valid test case where we tried 'force' and it crashed the app., so i'm just trying to find a way to automatically generate test cases for checking these kind of issues, as these YANG models keep getting updated all the time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope its clearer now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2017 22:54:48 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/validate-yang-models-against-cli-arguments/m-p/3513120#M2886</guid>
      <dc:creator>haksson81</dc:creator>
      <dc:date>2017-04-13T22:54:48Z</dc:date>
    </item>
  </channel>
</rss>

