[j-nsp] Unwanted newline characters in Netconf XML
Stacy W. Smith
stacy at acm.org
Wed Dec 2 10:33:15 EST 2015
> On Dec 2, 2015, at 2:31 AM, Dave Bell <me at geordish.org> wrote:
>
> On 2 December 2015 at 07:04, Tore Anderson <tore at fud.no> wrote:
>
>> Works fine for me? Even in JUNOS versions as old as 11.4. Try:
>>
>> {master:1}[edit]
>> tore at lab-ex4200# load merge terminal
>> [Type ^D at a new line to end input]
>> /* This is a
>> * multi-line
>> * comment.
>> */
>> protocols{}
>> [edit]
>> 'protocols'
>> warning: statement has no contents; ignored
>> load complete
>>
>
> Ah, I was using 'annotate ....' which doesn't appear to allow it. This
> method does.
[edit]
user at r0# annotate system "This is a\nmulti-line\ncomment"
[edit]
user at r0# show | find ^}
}
apply-groups [ global re0 ];
/* This is a
multi-line
comment */
system {
ports {
console log-out-on-disconnect;
}
}
[edit]
user at r0# show system | display xml
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/15.1I0/junos">
<configuration junos:changed-seconds="1449070222" junos:changed-localtime="2015-12-02 07:30:22 PST">
<junos:comment>/* This is a
multi-line
comment */</junos:comment>
<system>
<ports>
<console>
<log-out-on-disconnect/>
</console>
</ports>
</system>
</configuration>
<cli>
<banner>[edit]</banner>
</cli>
</rpc-reply>
--Stacy
More information about the juniper-nsp
mailing list