<?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: Building model bundle for Juniper in Tools</title>
    <link>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/4267244#M1128</link>
    <description>&lt;P&gt;How much RAM did you need to install the package with pip? In my case it keeps crushing, the max RAM u could allocate is 32G.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jan 2021 17:58:09 GMT</pubDate>
    <dc:creator>gusmb</dc:creator>
    <dc:date>2021-01-05T17:58:09Z</dc:date>
    <item>
      <title>Building model bundle for Juniper</title>
      <link>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3992045#M1119</link>
      <description>&lt;P&gt;Hello.&lt;BR /&gt;I'm trying to create a model bundle for Juniper device using YANG models stored in Juniper Git repo.&lt;BR /&gt;&lt;BR /&gt;I've created a profile:&lt;/P&gt;&lt;PRE&gt;{
  "name": "junos-19.2",
  "version": "0.1.0",
  "ydk_version": "0.8.4",
  "author": "horseinthesky",
  "copyright": "horseinthesky",
  "description": "JunOS 19.2 Yang Model",
  "models": {
    "git": [
      {
        "url": "https://github.com/Juniper/yang.git",
        "dir": [
          "19.2/19.2R1/junos/conf",
          "19.2/19.2R1/junos/conf-with-extensions"
        ]
      }
    ]
  }
}&lt;/PRE&gt;&lt;P&gt;But executing&amp;nbsp;&lt;STRONG&gt;generate.py&lt;/STRONG&gt; against it runs in exception:&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;python3 generate.py --python --bundle ~/test/junos-19.2.json
Traceback (most recent call last):
  File "generate.py", line 492, in &amp;lt;module&amp;gt;
    output_directory = (generator.generate(options.bundle))
  File "/home/horseinthesky/ydk-gen/ydkgen/__init__.py", line 93, in generate
    return self._generate_bundle(description_file)
  File "/home/horseinthesky/ydk-gen/ydkgen/__init__.py", line 120, in _generate_bundle
    bundle_translator.translate(profile_file, tmp_file, self.ydk_root)
  File "/home/horseinthesky/ydk-gen/ydkgen/resolver/bundle_translator.py", line 198, in translate
    modules.extend(globals()[get_fun](data['models'][source],ydk_root))
  File "/home/horseinthesky/ydk-gen/ydkgen/resolver/bundle_translator.py", line 151, in get_git_attrs
    for c in g['commits']:
KeyError: 'commits'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 13:21:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3992045#M1119</guid>
      <dc:creator>horseinthesky</dc:creator>
      <dc:date>2019-12-02T13:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Building model bundle for Juniper</title>
      <link>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3992453#M1120</link>
      <description>&lt;P&gt;There are couple of errors in your profile:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Missing list element&amp;nbsp;&lt;STRONG&gt;'commits'.&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Missing &lt;STRONG&gt;'common'&lt;/STRONG&gt; directory, which leads to &lt;STRONG&gt;&lt;EM&gt;pyang&lt;/EM&gt;&lt;/STRONG&gt; failure to parse yang models.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;With these changes the profile looks like this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;"name": "junos-19.2",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;"version": "0.1.0",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;"ydk_version": "0.8.4",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;"author": "horseinthesky",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;"copyright": "horseinthesky",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;"description": "JunOS 19.2 Yang Model",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;"models": {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"git": [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"url": "https://github.com/Juniper/yang.git",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"commits": [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"dir": [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"19.2/19.2R1/common",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"19.2/19.2R1/junos/conf",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"19.2/19.2R1/junos/conf-with-extensions"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I tested model bundle generation with this profile and it worked fine. You need to make sure that you have enough RAM and disk space on your system in order to generate API for these models.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 01:25:21 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3992453#M1120</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2019-12-03T01:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Building model bundle for Juniper</title>
      <link>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3992564#M1121</link>
      <description>&lt;P&gt;This works. Couldn't find the right structure&amp;nbsp;&lt;A href="https://github.com/CiscoDevNet/ydk-gen#build-model-bundle-profile" target="_blank"&gt;https://github.com/CiscoDevNet/ydk-gen#build-model-bundle-profile&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 08:29:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3992564#M1121</guid>
      <dc:creator>horseinthesky</dc:creator>
      <dc:date>2019-12-03T08:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Building model bundle for Juniper</title>
      <link>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3992632#M1122</link>
      <description>&lt;P&gt;Ok. How can I start discovering the package?&lt;BR /&gt;It is 14 million lines so it's just undiscoverable.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Any time i do:&lt;/P&gt;&lt;PRE&gt;In [1]: from ydk.models.junos_19_2.junos_conf_root import Configuration                                                                                               

In [2]: c = Configuration()  

In [4]: c.&lt;/PRE&gt;&lt;P&gt;and press &amp;lt;Tab&amp;gt; my interpreter session just freezes forever.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 10:30:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3992632#M1122</guid>
      <dc:creator>horseinthesky</dc:creator>
      <dc:date>2019-12-03T10:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Building model bundle for Juniper</title>
      <link>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3992920#M1123</link>
      <description>Could you please open documentation bug on ydk-gen GitHub.</description>
      <pubDate>Tue, 03 Dec 2019 17:03:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3992920#M1123</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2019-12-03T17:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Building model bundle for Juniper</title>
      <link>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3992932#M1124</link>
      <description>This is obviously not a YDK issue, but rather symptoms of ineffectual architecture of YANG model, where all the components are concentrated in one module (junos_conf_root). For such model architecture I would suggest manually explore components of 'Configuration', define components of your interest in 'import' statements and then try to explore them using the Python interpreter.&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Dec 2019 17:25:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3992932#M1124</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2019-12-03T17:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Building model bundle for Juniper</title>
      <link>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3992962#M1125</link>
      <description>&lt;P&gt;I mean is there a way to correlate what YANG object turned into while Python module creation?&lt;BR /&gt;&lt;BR /&gt;It really hard to understand how all these YANG things work and the lack of documentation makes it even more difficult. (I'm looking at&amp;nbsp;&lt;A href="https://community.cisco.com/t5/yang-development-kit-ydk/sample-apps-for-encoding-acl-using-openconfig/m-p/3880235/highlight/false#M1226" target="_blank"&gt;https://community.cisco.com/t5/yang-development-kit-ydk/sample-apps-for-encoding-acl-using-openconfig/m-p/3880235/highlight/false#M1226&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 17:53:54 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3992962#M1125</guid>
      <dc:creator>horseinthesky</dc:creator>
      <dc:date>2019-12-03T17:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Building model bundle for Juniper</title>
      <link>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3993183#M1126</link>
      <description>&lt;P&gt;There is definitive correlation between YANG model and generated API. The rules are multiple and quite complicated; they are implemented in the API generator code. The simple way is just follow YANG model and compare it with generated Python API. You also might consider generating documentation for your core and bundles. You can get example of generated documentation on &lt;A href="http://ydk.cisco.com" target="_self"&gt;ydk.cisco.com&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;In order to generate documentation for YDK core and bundles, generate the bundles first, then run this command:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; ./generate.py --core --generate-doc&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Based on the volume of your model, please be prepared to wait for few hours for this command to finish. It also eats up lots of disk space. I would suggest to run it overnight. Once ready the documentation is located at &lt;EM&gt;&lt;STRONG&gt;./gen-apy/python/ydk/docs_expanded&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;Locally you can open documentation by running:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; firefox&amp;nbsp;gen-apy/python/ydk/docs_expanded/index.html &amp;amp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You also can publish the documentation on the web for your peers access.&lt;/P&gt;&lt;P&gt;The big plus of having documentation is web based, easy to browse and follow API description.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 00:19:51 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3993183#M1126</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2019-12-04T00:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Building model bundle for Juniper</title>
      <link>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3993283#M1127</link>
      <description>Ok. Thank you for the explanation. I'll try to generate some.</description>
      <pubDate>Wed, 04 Dec 2019 08:15:27 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/3993283#M1127</guid>
      <dc:creator>horseinthesky</dc:creator>
      <dc:date>2019-12-04T08:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Building model bundle for Juniper</title>
      <link>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/4267244#M1128</link>
      <description>&lt;P&gt;How much RAM did you need to install the package with pip? In my case it keeps crushing, the max RAM u could allocate is 32G.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 17:58:09 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/building-model-bundle-for-juniper/m-p/4267244#M1128</guid>
      <dc:creator>gusmb</dc:creator>
      <dc:date>2021-01-05T17:58:09Z</dc:date>
    </item>
  </channel>
</rss>

