<?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: Use pyang to validate backward incompatibility for augmented statement in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/use-pyang-to-validate-backward-incompatibility-for-augmented/m-p/3998607#M4603</link>
    <description>&lt;P&gt;Thank you so muchh for your help! This worked!&lt;/P&gt;
&lt;P&gt;I installed pyang using pip3.7 install pyang&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;PRALALA-M-27BM:17.2.1 pratik$&amp;nbsp; /usr/local/bin/pyang&amp;nbsp;&amp;nbsp; --strict --check-update-from&amp;nbsp; ../16.12.1/Cisco-IOS-XE-nbar.yang Cisco-IOS-XE-nbar.yang&amp;nbsp; -p /Users/pratik/confd/src/confd/yang/ -P /Users/pratik/confd/src/confd/yang/&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/usr/local/bin/pyang&amp;nbsp;&amp;nbsp; --strict --check-update-from&amp;nbsp; ../16.12.1/Cisco-IOS-XE-nbar.yang Cisco-IOS-XE-nbar.yang&amp;nbsp; -p /Users/pratik/newncs/ncs-5.2.1/src/ncs/yang/ -P /Users/pratik/newncs/ncs-5.2.1/src/ncs/yang/&amp;nbsp;&amp;nbsp; --verbose&lt;/P&gt;</description>
    <pubDate>Fri, 13 Dec 2019 17:47:51 GMT</pubDate>
    <dc:creator>pralala</dc:creator>
    <dc:date>2019-12-13T17:47:51Z</dc:date>
    <item>
      <title>Use pyang to validate backward incompatibility for augmented statement</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/use-pyang-to-validate-backward-incompatibility-for-augmented/m-p/3996686#M4596</link>
      <description>&lt;P&gt;Hello folks,&lt;/P&gt;
&lt;P&gt;I have 2 revisions of same model which i want to compare for backward incompatibility.&lt;/P&gt;
&lt;PRE&gt;augment "/ios:native/ios:interface/ios:TwentyFiveGigE/ios:ip" {&lt;BR /&gt;  uses config-interface-ip-nbar-grouping;&lt;BR /&gt;}&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;In the first model i have the above, and in the 2nd model i removed the same statement.&lt;BR /&gt;How do i validate using pyang as the structure of&amp;nbsp;&lt;STRONG&gt;ios:interface/ios:TwentyFiveGigE/&lt;/STRONG&gt; is defined in a different file and it seems pyang is not really considering the augmented statement when i remove it.&amp;nbsp;&lt;BR /&gt;I ran these 2 commands but it never showed me the expected output that TwentyFiveGigE is being removed&lt;BR /&gt;&lt;BR /&gt;pyang --strict&amp;nbsp; --check-update-from ../16.12.1/Cisco-IOS-XE-nbar.yang Cisco-IOS-XE-nbar.yang --check-update-from-path ~/newncs/nso-5.2.1.1/src/ncs/yang/&lt;BR /&gt;&lt;BR /&gt;pyang --strict --check-update-from ../16.12.1/*.yang *.yang --check-update-from-path ~/newncs/nso-5.2.1.1/src/ncs/yang/&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;There is a way to do using ncsc compiler though when i do a revision merge of fxs files, it gives me the expected output which is good, but i want a way without doing all the revision merge and determine before hand if there is any incompatibility&lt;BR /&gt;&lt;SPAN&gt;ncsc: Revision &amp;lt;&amp;lt;"2020-03-01"&amp;gt;&amp;gt; deletes item /devices/device/config/native/interface/ATM/encapsulation/dot1Q/second-dot1q&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, any other tool apart from pyang which could be useful like yanger,confdc etc please let me know. Just want a way to catch these things via script&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 17:58:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/use-pyang-to-validate-backward-incompatibility-for-augmented/m-p/3996686#M4596</guid>
      <dc:creator>pralala</dc:creator>
      <dc:date>2019-12-10T17:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Use pyang to validate backward incompatibility for augmented statement</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/use-pyang-to-validate-backward-incompatibility-for-augmented/m-p/3998505#M4602</link>
      <description>&lt;P style="text-align: left;"&gt;Hello,&lt;/P&gt;
&lt;P style="text-align: left;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="text-align: left;"&gt;which version of pyang are you using? with 2.0.1 I manage to get the error:&lt;/P&gt;
&lt;P style="text-align: left;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;cisco@server # pyang --strict --check-update-from ../16121/Cisco-IOS-XE-nbar.yang Cisco-IOS-XE-nbar.yang    
Cisco-IOS-XE-nbar.yang:1: error: new revision 2019-07-01 is not newer than old revision 2019-07-01 (RFC 6020: 10, p2)
Cisco-IOS-XE-nbar.yang:1: error: the augment '/ios:native/ios:interface/ios:TwentyFiveGigE/ios:ip', defined at ../16121/Cisco-IOS-XE-nbar.yang:1066 is illegally removed
&lt;BR /&gt;[... truncated]&lt;/PRE&gt;
&lt;P style="text-align: left;"&gt;I have just done the following:&lt;/P&gt;
&lt;P style="text-align: left;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;pyang --version # output pyang 2.0.1&lt;BR /&gt;git clone https://github.com/YangModels/yang
cd yang/vendor/cisco/xe/
cp -r 16121 test
cd test
# edit by removing the same augment as you in the same file
pyang --strict --check-update-from ../16121/Cisco-IOS-XE-nbar.yang Cisco-IOS-XE-nbar.yang&lt;/PRE&gt;
&lt;P style="text-align: left;"&gt;Note: the version that comes with NSO is pyang 1.5 which is much older and which should not be used I think - it indeed does not detect the augment on my laptop&lt;/P&gt;
&lt;PRE&gt;cisco@server # pyang --strict --check-update-from ../16121/Cisco-IOS-XE-nbar.yang Cisco-IOS-XE-nbar.yang
Cisco-IOS-XE-nbar.yang:1: error: new revision 2019-07-01 is not newer than old revision 2019-07-01 (RFC 6020: 10, p2)&lt;/PRE&gt;
&lt;P style="text-align: left;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="text-align: left;"&gt;I looked at yanger but could not find similar option.&lt;/P&gt;
&lt;P style="text-align: left;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="text-align: left;"&gt;regards&lt;/P&gt;
&lt;P style="text-align: left;"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 14:59:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/use-pyang-to-validate-backward-incompatibility-for-augmented/m-p/3998505#M4602</guid>
      <dc:creator>gmuloche</dc:creator>
      <dc:date>2019-12-13T14:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Use pyang to validate backward incompatibility for augmented statement</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/use-pyang-to-validate-backward-incompatibility-for-augmented/m-p/3998607#M4603</link>
      <description>&lt;P&gt;Thank you so muchh for your help! This worked!&lt;/P&gt;
&lt;P&gt;I installed pyang using pip3.7 install pyang&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;PRALALA-M-27BM:17.2.1 pratik$&amp;nbsp; /usr/local/bin/pyang&amp;nbsp;&amp;nbsp; --strict --check-update-from&amp;nbsp; ../16.12.1/Cisco-IOS-XE-nbar.yang Cisco-IOS-XE-nbar.yang&amp;nbsp; -p /Users/pratik/confd/src/confd/yang/ -P /Users/pratik/confd/src/confd/yang/&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/usr/local/bin/pyang&amp;nbsp;&amp;nbsp; --strict --check-update-from&amp;nbsp; ../16.12.1/Cisco-IOS-XE-nbar.yang Cisco-IOS-XE-nbar.yang&amp;nbsp; -p /Users/pratik/newncs/ncs-5.2.1/src/ncs/yang/ -P /Users/pratik/newncs/ncs-5.2.1/src/ncs/yang/&amp;nbsp;&amp;nbsp; --verbose&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 17:47:51 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/use-pyang-to-validate-backward-incompatibility-for-augmented/m-p/3998607#M4603</guid>
      <dc:creator>pralala</dc:creator>
      <dc:date>2019-12-13T17:47:51Z</dc:date>
    </item>
  </channel>
</rss>

