<?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 library in Code Exchange</title>
    <link>https://community.cisco.com/t5/code-exchange/ydk-library/m-p/4921285#M12</link>
    <description>&lt;P&gt;See&amp;nbsp;&lt;A href="https://github.com/CiscoDevNet/ydk-gen/blob/master/README.md" target="_blank"&gt;https://github.com/CiscoDevNet/ydk-gen/blob/master/README.md&lt;/A&gt;&amp;nbsp;for requirements and installation options.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Sep 2023 06:58:26 GMT</pubDate>
    <dc:creator>Marcel Zehnder</dc:creator>
    <dc:date>2023-09-11T06:58:26Z</dc:date>
    <item>
      <title>YDK library</title>
      <link>https://community.cisco.com/t5/code-exchange/ydk-library/m-p/4921077#M7</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;In order to run the following script, I assume it is required to install the YDK repository to be able to import the ydk modules as listed below.&lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Netmart&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from &lt;STRONG&gt;ydk.services&lt;/STRONG&gt; import CRUDService&lt;/P&gt;&lt;P&gt;from &lt;STRONG&gt;ydk.providers&lt;/STRONG&gt; import NetconfServiceProvider as nc&lt;/P&gt;&lt;P&gt;from &lt;STRONG&gt;ydk.models.cisco&lt;/STRONG&gt; &lt;STRONG&gt;ios&lt;/STRONG&gt; &lt;STRONG&gt;xe&lt;/STRONG&gt; import Cisco ISO XE native as model&lt;/P&gt;&lt;P&gt;ip = '10.10.20.48'&lt;/P&gt;&lt;P&gt;prtcl = 'ssh'&lt;/P&gt;&lt;P&gt;user = 'developer'&lt;/P&gt;&lt;P&gt;pw = 'password'&lt;/P&gt;&lt;P&gt;port = 830&lt;/P&gt;&lt;P&gt;provider = nc (address=ip, port = port, username=user, password=psw, protocol=prtcl)&lt;/P&gt;&lt;P&gt;crud = CRUDService()&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;interface = &lt;/STRONG&gt;&lt;STRONG&gt;model.Native.Interface.FastEthernet&lt;/STRONG&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;interface.name = '2/0'&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;interface.keepalive&lt;/STRONG&gt;&lt;STRONG&gt; = True&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;interface_data&lt;/STRONG&gt;&lt;STRONG&gt; = &lt;/STRONG&gt;&lt;STRONG&gt;crud.read&lt;/STRONG&gt;&lt;STRONG&gt;(provider, interface)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if interface data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print ('Keepalive is enabled. ')&lt;/P&gt;&lt;P&gt;else:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print ('Keepalive is not enabled.')&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 01:32:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/code-exchange/ydk-library/m-p/4921077#M7</guid>
      <dc:creator>Netmart</dc:creator>
      <dc:date>2023-09-11T01:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: YDK library</title>
      <link>https://community.cisco.com/t5/code-exchange/ydk-library/m-p/4921285#M12</link>
      <description>&lt;P&gt;See&amp;nbsp;&lt;A href="https://github.com/CiscoDevNet/ydk-gen/blob/master/README.md" target="_blank"&gt;https://github.com/CiscoDevNet/ydk-gen/blob/master/README.md&lt;/A&gt;&amp;nbsp;for requirements and installation options.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 06:58:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/code-exchange/ydk-library/m-p/4921285#M12</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2023-09-11T06:58:26Z</dc:date>
    </item>
  </channel>
</rss>

