Re: [j-nsp] How to catch invalid value/option for a command in SLAX script?

2016-07-11 Thread Tore Anderson
* Phil Shafer > But the newlines are my fault. The initial XML output for JUNOS > generated newlines after each tag open/close/data call to ease > debugging for developers, and also because I thought it would make > the XML->text renderer in the CLI easier. By the time I realized > the latter w

Re: [j-nsp] How to catch invalid value/option for a command in SLAX script?

2016-07-11 Thread Phil Shafer
Martin T writes: >Thanks for the reply! Did I understand you correctly that "if( >$variable == "usb0\ninvalid value" ) {" is actually "if( string( >$variable ) == "usb0\ninvalid value" ) {" and the string() inserts a >newline at the beginning and in the end of the string? Based on the >debugger out

[j-nsp] Basic NAT44 on MS-MPC implementation help

2016-07-11 Thread Josh Reynolds
Hi all. I've gone through quite a few pages of juniper techpubs, but I'm having a problem figuring out how to correctly implement your standard, run of the mill NAT (ipv4) using an MS-MPC-128 Part of this may be design or topology related, and I was wondering if someone could help me figure out a

Re: [j-nsp] How to catch invalid value/option for a command in SLAX script?

2016-07-11 Thread Martin T
Thanks for the reply! Did I understand you correctly that "if( $variable == "usb0\ninvalid value" ) {" is actually "if( string( $variable ) == "usb0\ninvalid value" ) {" and the string() inserts a newline at the beginning and in the end of the string? Based on the debugger output it looks like so: