<?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: Telemetry - YANG Model Parser in Tools</title>
    <link>https://community.cisco.com/t5/tools/telemetry-yang-model-parser/m-p/4394770#M1233</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello Deepak,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please have a look at our &lt;A href="https://community.cisco.com/t5/networking-documents/yang-tools-knowledge-base/ta-p/4391750" target="_blank" rel="noopener"&gt;YANG Tools Knowledge Base&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
    <pubDate>Wed, 28 Apr 2021 13:29:42 GMT</pubDate>
    <dc:creator>Alexander Stevenson</dc:creator>
    <dc:date>2021-04-28T13:29:42Z</dc:date>
    <item>
      <title>Telemetry - YANG Model Parser</title>
      <link>https://community.cisco.com/t5/tools/telemetry-yang-model-parser/m-p/4391993#M1232</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm exploring streaming telemetry on Cisco devices to receive operational state information. As appears, a telemetry message does not include a unit (byte, kb, etc) for the streamed value -&lt;/P&gt;&lt;PRE&gt;      {
        "name": "used-memory",
        "uint64Value": "353673736"
      }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To interpret the streamed value, we need to look into the YANG model (&lt;SPAN&gt;Cisco-IOS-XE-memory-oper.yang&lt;/SPAN&gt;) to get unit information -&lt;/P&gt;&lt;PRE&gt;    leaf used-memory {
      type uint64;
&lt;STRONG&gt;      units "bytes";&lt;/STRONG&gt;
      description
        "Total used memory in the pool (bytes)";
    }&lt;/PRE&gt;&lt;P&gt;So, I am looking for a YANG parser (in Java) that can help in reading a YANG model so that relevant information e.g. unit, description etc. can be retrieved for a Leaf statement. I explored OpenDayLight Java parser but could not find a way to read Leaf statements. (Python has pyang module that converts YANG model to YIN (kind of XML) but I need something in Java.)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, my requirement is that given the encoding path from Telemetry message -&lt;/P&gt;&lt;PRE&gt;"encodingPath": "Cisco-IOS-XE-memory-oper:&lt;STRONG&gt;memory-statistics/memory-statistic&lt;/STRONG&gt;"&lt;/PRE&gt;&lt;P&gt;Can I retrieve all the contained Leaf statements for the path? For the above encoding path, few of the Leaf statements are -&lt;/P&gt;&lt;PRE&gt;    leaf name {
      type string;
      description
        "The name of the memory pool";
    }
    leaf total-memory {
      type uint64;
      units "bytes";
      description
        "Total memory in the pool (bytes)";
    }
    leaf used-memory {
      type uint64;
      units "bytes";
      description
        "Total used memory in the pool (bytes)";
    }&lt;/PRE&gt;&lt;P&gt;Please let me know if you have any pointer in this regard. Thanks.&lt;/P&gt;&lt;P&gt;-Deepak&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 06:59:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/telemetry-yang-model-parser/m-p/4391993#M1232</guid>
      <dc:creator>Deepak Ladha</dc:creator>
      <dc:date>2021-04-23T06:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Telemetry - YANG Model Parser</title>
      <link>https://community.cisco.com/t5/tools/telemetry-yang-model-parser/m-p/4394770#M1233</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello Deepak,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please have a look at our &lt;A href="https://community.cisco.com/t5/networking-documents/yang-tools-knowledge-base/ta-p/4391750" target="_blank" rel="noopener"&gt;YANG Tools Knowledge Base&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 13:29:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/telemetry-yang-model-parser/m-p/4394770#M1233</guid>
      <dc:creator>Alexander Stevenson</dc:creator>
      <dc:date>2021-04-28T13:29:42Z</dc:date>
    </item>
  </channel>
</rss>

