<?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: YDK tutorial in Tools</title>
    <link>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459419#M2542</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put single quotes around the whole XML tag for platform inventory:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;python ncc.py --host=1.1.1.1 -u vagrant -p vagrant --get-oper -f '&amp;lt;platform-inventory xmlns=“http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper”/&amp;gt;'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without that single quotes, the parameter given to -f isn’t correctly formed.&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>Tue, 12 Dec 2017 12:17:38 GMT</pubDate>
    <dc:creator>einarnn</dc:creator>
    <dc:date>2017-12-12T12:17:38Z</dc:date>
    <item>
      <title>YDK tutorial</title>
      <link>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459414#M2537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi people,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i find any good tutorial for if i want to put the following YANG Oper data from cisco XR devices?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/YangModels/yang/blob/master/vendor/cisco/xr/534/Cisco-IOS-XR-plat-chas-invmgr-oper.yang" title="https://github.com/YangModels/yang/blob/master/vendor/cisco/xr/534/Cisco-IOS-XR-plat-chas-invmgr-oper.yang"&gt;yang/Cisco-IOS-XR-plat-chas-invmgr-oper.yang at master · YangModels/yang · GitHub&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i want to do is to get the inventory data in XML format and put them in a file...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Guan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 22:08:38 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459414#M2537</guid>
      <dc:creator>Guan Deng</dc:creator>
      <dc:date>2017-12-08T22:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: YDK tutorial</title>
      <link>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459415#M2538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We don’t currently support a version of the YDK that has IOS-XR 5.3.4 models in it. Have you tried direct a direct NETCONF get? You might try the utility ncc.py, found here (recommend pulling entire git repo):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;https://github.com/CiscoDevNet/ncc/blob/master/ncc.py&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this should work once you’ve downloaded it and installed its dependencies:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;python ncc.py --host=your-device-ip -u your-username -p your-password --get-oper \&lt;/P&gt;&lt;P&gt;    -f ‘&amp;lt;platform-inventory xmlns=“http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper"&amp;gt;'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will dump XML to your console, and you can either use this as a CLI utility, or copy the use of the python ncclient library to your own code.&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>Mon, 11 Dec 2017 22:50:54 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459415#M2538</guid>
      <dc:creator>einarnn</dc:creator>
      <dc:date>2017-12-11T22:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: YDK tutorial</title>
      <link>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459416#M2539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Nilsen,&lt;/P&gt;&lt;P&gt;many thanks!&lt;/P&gt;&lt;P&gt;I got the packet installed, but i am getting this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(v)vagrant@vagrant-ubuntu-trusty-64:~/ncc$ python ncc.py --host=1.1.1.1 -u vagrant -p vagrant --get-oper&amp;nbsp; -f ‘&amp;lt;platform-inventory xmlns=“&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper" rel="nofollow" target="_blank"&gt;http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; °°&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt;ff&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;seems the command is not finished and i was stuck in &amp;gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Guan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 00:33:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459416#M2539</guid>
      <dc:creator>Guan Deng</dc:creator>
      <dc:date>2017-12-12T00:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: YDK tutorial</title>
      <link>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459417#M2540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you copied &amp;amp; pasted from your web browser or email, please make sure that no unicode quote characters got copied from the website. That can mess things up when ingested by the shell and provide bad input to Python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at what I see in the email below, there is two wrong characters, and they may have come from my original posting, apologies.&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>Tue, 12 Dec 2017 08:57:38 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459417#M2540</guid>
      <dc:creator>einarnn</dc:creator>
      <dc:date>2017-12-12T08:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: YDK tutorial</title>
      <link>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459418#M2541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Einar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my filter is still not correct:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;python ncc.py --host=1.1.1.1 -u vagrant -p vagrant --get-oper -f &amp;lt;platform-inventory xmlns=“&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper" rel="nofollow" target="_blank"&gt;http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where do i do wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 10:47:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459418#M2541</guid>
      <dc:creator>Guan Deng</dc:creator>
      <dc:date>2017-12-12T10:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: YDK tutorial</title>
      <link>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459419#M2542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put single quotes around the whole XML tag for platform inventory:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;python ncc.py --host=1.1.1.1 -u vagrant -p vagrant --get-oper -f '&amp;lt;platform-inventory xmlns=“http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper”/&amp;gt;'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without that single quotes, the parameter given to -f isn’t correctly formed.&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>Tue, 12 Dec 2017 12:17:38 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459419#M2542</guid>
      <dc:creator>einarnn</dc:creator>
      <dc:date>2017-12-12T12:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: YDK tutorial</title>
      <link>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459420#M2543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding your original question, the NANOG 68 YDK talk will give you a bit of a tutorial:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cisco.com/thread/72735"&gt;NANOG 68: YDK overview / demo&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find a sample app to read the inventory, validate the data, encode it in XML and print output at:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://gist.github.com/111pontes/2c5ea165683524dc44e401b619bfa6dc" title="https://gist.github.com/111pontes/2c5ea165683524dc44e401b619bfa6dc"&gt;nc-read-xr-plat-chas-invmgr-oper-99-ydk.py · GitHub&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can invoke it using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_15132818120223560" jivemacro_uid="_15132818120223560"&gt;
&lt;P&gt;$ ./nc-read-xr-plat-chas-invmgr-oper-99-ydk.py ssh://user:password@host&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2017 19:55:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459420#M2543</guid>
      <dc:creator>saalvare</dc:creator>
      <dc:date>2017-12-14T19:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: YDK tutorial</title>
      <link>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459421#M2544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santiago,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot, this helps.&lt;/P&gt;&lt;P&gt;We figured it out at the end the filter was wrong, it should be looking like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(v)vagrant@vagrant-ubuntu-trusty-64:~/ncc$ python ncc.py --host=1.1.1.1 -u vagrant -p vagrant --get-oper -f '&amp;lt;platform xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper" rel="nofollow" target="_blank"&gt;http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For BGP Oper as example:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(v)vagrant@vagrant-ubuntu-trusty-64:~/ncc$ python ncc.py --host=1.1.1.1 -u vagrant -p vagrant --get-oper -f "&amp;lt;bgp xmlns='&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-oper" rel="nofollow" target="_blank"&gt;http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-oper&lt;/A&gt;&lt;SPAN&gt;'&amp;gt;&amp;lt;instances&amp;gt;&amp;lt;instance&amp;gt;&amp;lt;instance-name&amp;gt;default&amp;lt;/instance-name&amp;gt;&amp;lt;instance-active&amp;gt;&amp;lt;default-vrf&amp;gt;&amp;lt;neighbors&amp;gt;&amp;lt;neighbor&amp;gt;&amp;lt;neighbor-address/&amp;gt;&amp;lt;/neighbor&amp;gt;&amp;lt;/neighbors&amp;gt;&amp;lt;/default-vrf&amp;gt;&amp;lt;/instance-active&amp;gt;&amp;lt;/instance&amp;gt;&amp;lt;/instances&amp;gt;&amp;lt;/bgp&amp;gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is much more tedious of cause, but i think it helps to understand how to build a filter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Guan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2017 22:25:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459421#M2544</guid>
      <dc:creator>Guan Deng</dc:creator>
      <dc:date>2017-12-14T22:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: YDK tutorial</title>
      <link>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459422#M2545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IMHO, if you're having to handcraft filters, you're doing it wrong.&amp;nbsp; The whole YDK purpose is to abstract as much as possible these details.&amp;nbsp; I agree that at the end it all comes to personal preference.&amp;nbsp; Glad you got it working. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 00:56:54 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459422#M2545</guid>
      <dc:creator>saalvare</dc:creator>
      <dc:date>2017-12-15T00:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: YDK tutorial</title>
      <link>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459423#M2546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks Santiago, really appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Dec 2017 18:40:45 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-tutorial/m-p/3459423#M2546</guid>
      <dc:creator>Guan Deng</dc:creator>
      <dc:date>2017-12-18T18:40:45Z</dc:date>
    </item>
  </channel>
</rss>

