<?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 yanger: No pretty format for output format tree in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/yanger-no-pretty-format-for-output-format-tree/m-p/3917698#M4233</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to visualize the yang model from a ncs service as tree format and save it to a file for documentation purpose .&lt;BR /&gt;If I use the &lt;EM&gt;--output option&lt;/EM&gt; inside yanger, I got the tree output in one line without pretty format.&lt;/P&gt;&lt;P&gt;But if I am print the tree output to STDOUT, I got the pretty view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a option to get the newlines inside the output file for pretty format?&lt;/P&gt;&lt;P&gt;Or do I need to redirect always the output from stdout to file per Bash I/O redirection with &lt;EM&gt;&amp;gt; output.txt ?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Create tree output&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;yanger -f tree -o output.txt testservice/src/yang/testservice.yang&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Output&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;module: testservice&lt;BR /&gt;augment /ncs:services:&lt;BR /&gt;+--rw testservice* [infra-type infra-location] +---x check-sync | +---w input | | +---w outformat? outformat4 | | +---w (depth)? | | | +--:(deep) | | | | +---w deep? empty | | | +--:(shallow) | | | +---w shallow? empty | | +---w suppress-positive-result? empty | | +---w (choice-lsa)? | | +--:(use-lsa) | | | +---w use-lsa? empty | | +--:(no-lsa) | | +---w no-lsa? empty | +--ro output | +--ro (outformat)? | +--:(in-sync) | | +--ro in-sync? boolean | +--:(case-xml) | | +--ro result-xml | | +--ro local-node | | | +--ro data? &amp;lt;anyxml&amp;gt; | | +--ro lsa-node* | | +--ro name? string | | +--ro data? &amp;lt;anyxml&amp;gt; | +--:(case-cli)                     |  +---w input            |  |  +---w outformat?                  outformat4       |  |  +---w (depth)?       |  |  |  +--:(deep)       |  |  |  |  +---w deep?                       empty       |  |  |  +--:(shallow)       |  |  |     +---w shallow?                    empty       |  |  +---w suppress-positive-result?   empty       |  |  +---w (choice-lsa)?       |  |     +--:(use-lsa)       |  |     |  +---w use-lsa?                    empty       |  |     +--:(no-lsa)       

[Omitted output]&lt;/PRE&gt;&lt;P&gt;If I generate the tree output to STDOUT, it is pretty-formatted:&lt;/P&gt;&lt;PRE&gt;yanger -f tree testservice/src/yang/testservice.yang&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;module: testservice

  augment /ncs:services:
    +--rw testservice* [infra-type infra-location]
       +---x check-sync
       |  +---w input
       |  |  +---w outformat?                  outformat4
       |  |  +---w (depth)?
       |  |  |  +--:(deep)

[Omitted output]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Common information:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;$ ncs --version
4.7.2.1
$ yanger --version
yanger 1.0&lt;/PRE&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Sep 2019 14:30:42 GMT</pubDate>
    <dc:creator>DTtb</dc:creator>
    <dc:date>2019-09-02T14:30:42Z</dc:date>
    <item>
      <title>yanger: No pretty format for output format tree</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/yanger-no-pretty-format-for-output-format-tree/m-p/3917698#M4233</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to visualize the yang model from a ncs service as tree format and save it to a file for documentation purpose .&lt;BR /&gt;If I use the &lt;EM&gt;--output option&lt;/EM&gt; inside yanger, I got the tree output in one line without pretty format.&lt;/P&gt;&lt;P&gt;But if I am print the tree output to STDOUT, I got the pretty view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a option to get the newlines inside the output file for pretty format?&lt;/P&gt;&lt;P&gt;Or do I need to redirect always the output from stdout to file per Bash I/O redirection with &lt;EM&gt;&amp;gt; output.txt ?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Create tree output&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;yanger -f tree -o output.txt testservice/src/yang/testservice.yang&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Output&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;module: testservice&lt;BR /&gt;augment /ncs:services:&lt;BR /&gt;+--rw testservice* [infra-type infra-location] +---x check-sync | +---w input | | +---w outformat? outformat4 | | +---w (depth)? | | | +--:(deep) | | | | +---w deep? empty | | | +--:(shallow) | | | +---w shallow? empty | | +---w suppress-positive-result? empty | | +---w (choice-lsa)? | | +--:(use-lsa) | | | +---w use-lsa? empty | | +--:(no-lsa) | | +---w no-lsa? empty | +--ro output | +--ro (outformat)? | +--:(in-sync) | | +--ro in-sync? boolean | +--:(case-xml) | | +--ro result-xml | | +--ro local-node | | | +--ro data? &amp;lt;anyxml&amp;gt; | | +--ro lsa-node* | | +--ro name? string | | +--ro data? &amp;lt;anyxml&amp;gt; | +--:(case-cli)                     |  +---w input            |  |  +---w outformat?                  outformat4       |  |  +---w (depth)?       |  |  |  +--:(deep)       |  |  |  |  +---w deep?                       empty       |  |  |  +--:(shallow)       |  |  |     +---w shallow?                    empty       |  |  +---w suppress-positive-result?   empty       |  |  +---w (choice-lsa)?       |  |     +--:(use-lsa)       |  |     |  +---w use-lsa?                    empty       |  |     +--:(no-lsa)       

[Omitted output]&lt;/PRE&gt;&lt;P&gt;If I generate the tree output to STDOUT, it is pretty-formatted:&lt;/P&gt;&lt;PRE&gt;yanger -f tree testservice/src/yang/testservice.yang&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;module: testservice

  augment /ncs:services:
    +--rw testservice* [infra-type infra-location]
       +---x check-sync
       |  +---w input
       |  |  +---w outformat?                  outformat4
       |  |  +---w (depth)?
       |  |  |  +--:(deep)

[Omitted output]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Common information:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;$ ncs --version
4.7.2.1
$ yanger --version
yanger 1.0&lt;/PRE&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2019 14:30:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/yanger-no-pretty-format-for-output-format-tree/m-p/3917698#M4233</guid>
      <dc:creator>DTtb</dc:creator>
      <dc:date>2019-09-02T14:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: yanger: No pretty format for output format tree</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/yanger-no-pretty-format-for-output-format-tree/m-p/3917736#M4234</link>
      <description>&lt;P&gt;This is a known problem, fixed in yanger released with nso-5.2. As an alternative, you can use yanger from &lt;A href="https://github.com/mbj4668/yanger" target="_blank"&gt;https://github.com/mbj4668/yanger&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2019 15:53:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/yanger-no-pretty-format-for-output-format-tree/m-p/3917736#M4234</guid>
      <dc:creator>mvolf</dc:creator>
      <dc:date>2019-09-02T15:53:00Z</dc:date>
    </item>
  </channel>
</rss>

