<?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: tailf:cli-preformatted issue in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5260046#M8774</link>
    <description>&lt;P&gt;Please clarify what your configuration is and what is expected to be shown.&lt;BR /&gt;Although it seems like you are looking for the&amp;nbsp;tailf:cli-multi-value YANG extension&lt;/P&gt;</description>
    <pubDate>Thu, 13 Feb 2025 08:17:04 GMT</pubDate>
    <dc:creator>cohult</dc:creator>
    <dc:date>2025-02-13T08:17:04Z</dc:date>
    <item>
      <title>tailf:cli-preformatted issue</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5259422#M8770</link>
      <description>&lt;P&gt;In the NCS man-pages it states:&lt;BR /&gt;--------------&lt;/P&gt;
&lt;H3&gt;tailf:cli-preformatted&lt;/H3&gt;
&lt;P&gt;Suppresses quoting of non-config elements when displaying them. Newlines will be preserved in strings etc.&lt;/P&gt;
&lt;P&gt;Used in J-, I- and C-style CLIs.&lt;/P&gt;
&lt;P&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="emphasis"&gt;&lt;EM&gt;cli-preformatted&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;statement can be used in:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="emphasis"&gt;&lt;EM&gt;leaf&lt;/EM&gt;&lt;/SPAN&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="emphasis"&gt;&lt;EM&gt;tailf:symlink&lt;/EM&gt;&lt;/SPAN&gt;, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="emphasis"&gt;&lt;EM&gt;refine&lt;/EM&gt;&lt;/SPAN&gt;.&lt;BR /&gt;--------------&lt;BR /&gt;&lt;BR /&gt;but when I use it in a leaf like below:&lt;BR /&gt;leaf day0 {&lt;BR /&gt;&amp;nbsp; tailf:cli-preformatted;&lt;BR /&gt;&amp;nbsp; type string;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;when entering data into the leaf it always interprets the "\n" into new line instead of preserve it as a text.&lt;BR /&gt;anybody ever have this issue?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 22:45:12 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5259422#M8770</guid>
      <dc:creator>atriyant</dc:creator>
      <dc:date>2025-02-11T22:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: tailf:cli-preformatted issue</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5259778#M8772</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Using the&amp;nbsp;&lt;SPAN&gt;tailf:cli-preformatted extension means that the "\n" will be interpreted as a new line instead of preserving it as text.&lt;BR /&gt;Let's say I configure the day0 leaf with:&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="terminal,monaco"&gt;&lt;SPAN class="s1"&gt;hello\nworld&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Without&lt;/STRONG&gt; the&amp;nbsp;&lt;SPAN&gt;tailf:cli-preformatted extension:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;# show running-config day0
day0 "hello\nworld"&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;With&lt;/STRONG&gt; the&amp;nbsp;tailf:cli-preformatted extension:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;# show running-config day0
day0 hello
     world&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 12 Feb 2025 16:33:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5259778#M8772</guid>
      <dc:creator>cohult</dc:creator>
      <dc:date>2025-02-12T16:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: tailf:cli-preformatted issue</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5259890#M8773</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/523322"&gt;@cohult&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;my req is:&lt;BR /&gt;&lt;BR /&gt;EXPECTED&lt;BR /&gt;day0 configure terminal&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;banner exec sequence 1 "####################\r\n*"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;banner exec sequence 2 "#" "#\r\n*"&lt;BR /&gt;&lt;BR /&gt;ACTUAL&lt;BR /&gt;day0 configure terminal&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;banner exec sequence 1 "####################\r&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;banner exec sequence 2 "#" "#\r&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*"&lt;BR /&gt;&lt;BR /&gt;is there a way to format it as in EXPECTED?&lt;BR /&gt;&lt;BR /&gt;thanks,&lt;BR /&gt;adi&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 21:32:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5259890#M8773</guid>
      <dc:creator>atriyant</dc:creator>
      <dc:date>2025-02-12T21:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: tailf:cli-preformatted issue</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5260046#M8774</link>
      <description>&lt;P&gt;Please clarify what your configuration is and what is expected to be shown.&lt;BR /&gt;Although it seems like you are looking for the&amp;nbsp;tailf:cli-multi-value YANG extension&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 08:17:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5260046#M8774</guid>
      <dc:creator>cohult</dc:creator>
      <dc:date>2025-02-13T08:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: tailf:cli-preformatted issue</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5260058#M8775</link>
      <description>&lt;P&gt;Please find attached the text file which has the content that I want to store in the leaf as it is.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 08:17:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5260058#M8775</guid>
      <dc:creator>atriyant</dc:creator>
      <dc:date>2025-02-13T08:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: tailf:cli-preformatted issue</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5260089#M8776</link>
      <description>&lt;LI-CODE lang="c"&gt; container banner {
   container exec {
     list sequence {
       tailf:cli-suppress-mode;
       key id;
       leaf id {
         type uint32;
       }
       leaf banner {
         tailf:cli-drop-node-name;
         type string;
       }
     }
   }
 }&lt;/LI-CODE&gt;
&lt;P&gt;I get pretty much what you expect: &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TOHAGBER-M-V4W1(config)# no banner 
TOHAGBER-M-V4W1(config)# banner exec sequence 1 "####################\r\n*"        
TOHAGBER-M-V4W1(config)# top
TOHAGBER-M-V4W1(config)# banner exec sequence 2 "\#'        '#\r\n*"       
TOHAGBER-M-V4W1(config)# commit 
TOHAGBER-M-V4W1(config)# do show running-config banner 
banner exec sequence 1 "####################\r\n*"
banner exec sequence 2 "\#'               '#\r\n*"&lt;/LI-CODE&gt;
&lt;P&gt;Note through if you are going to use double quotes inside a string you either need to escape them with \" or you can maybe use singe quote as per above? &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 09:17:05 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5260089#M8776</guid>
      <dc:creator>tohagber</dc:creator>
      <dc:date>2025-02-13T09:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: tailf:cli-preformatted issue</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5260357#M8777</link>
      <description>&lt;P&gt;thanks for your suggestions cohult and tohagber, but both '&lt;SPAN&gt;tailf:cli-multi-value' and 'tailf:drop-node-name' don't work for me.&lt;BR /&gt;cli-multi-value makes all text to be in one line.&lt;BR /&gt;the above drop-node-name need parent and drop the leaf name. I need one leaf like in my EXPECTED above.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 00:38:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5260357#M8777</guid>
      <dc:creator>atriyant</dc:creator>
      <dc:date>2025-02-14T00:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: tailf:cli-preformatted issue</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5260476#M8778</link>
      <description>&lt;P&gt;The intention with drop-node-name is not to give any instruction to the leafs output value when rendered on show command, it just means that the name of the leaf is not showed in C-style cli. My point was mainly if you just have a leaf with simple string type it will render the value as you want AFAIKT. The only thing that does not match what you stated earlier is the double quote inside the value. As i said, if you want a double quote inside an double quoted string, the only way to render that is if it is escaped with \"&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 08:50:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/tailf-cli-preformatted-issue/m-p/5260476#M8778</guid>
      <dc:creator>tohagber</dc:creator>
      <dc:date>2025-02-14T08:50:00Z</dc:date>
    </item>
  </channel>
</rss>

