Re: [j-nsp] How is SLAX "version" statement internally used?
On Thu, Feb 1, 2018 at 7:30 PM, Phil Shafer wrote: > Martin T writes: >>"version" statement in SLAX script is mandatory and argument for >>version statement has to be either 1.0 or 1.1. Based on my testing, >>1.2 works as well for example in Junos 16.1R2.11. However, is there >>any difference between "version 1.0" and "version 1.1"? For example, >>in Junos 16.1R2.11 one could define "version 1.0" and still use >>functionality introduced in SLAX 1.1 like mutable variables or for >>loops. How is "version" statement used by cscript/mgd? > > At this point, it's strictly informational. I don't want to "break" > a script because it uses a new feature, so I don't do enforcement. > Mainly it's used for output during "slaxproc --write-version" > processing, which can convert between versions. > > http://libslax.readthedocs.io/en/latest/distribution.html#slaxproc-the-slax-processor > > http://libslax.readthedocs.io/en/latest/notes.html#slax-version-information > > Thanks, > Phil Understood. Thanks! regards, Martin ___ juniper-nsp mailing list juniper-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp
Re: [j-nsp] How is SLAX "version" statement internally used?
Martin T writes: >"version" statement in SLAX script is mandatory and argument for >version statement has to be either 1.0 or 1.1. Based on my testing, >1.2 works as well for example in Junos 16.1R2.11. However, is there >any difference between "version 1.0" and "version 1.1"? For example, >in Junos 16.1R2.11 one could define "version 1.0" and still use >functionality introduced in SLAX 1.1 like mutable variables or for >loops. How is "version" statement used by cscript/mgd? At this point, it's strictly informational. I don't want to "break" a script because it uses a new feature, so I don't do enforcement. Mainly it's used for output during "slaxproc --write-version" processing, which can convert between versions. http://libslax.readthedocs.io/en/latest/distribution.html#slaxproc-the-slax-processor http://libslax.readthedocs.io/en/latest/notes.html#slax-version-information Thanks, Phil ___ juniper-nsp mailing list juniper-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp
Re: [j-nsp] How is SLAX "version" statement internally used?
On 01. feb. 2018 14:04, Martin T wrote: Hi! "version" statement in SLAX script is mandatory and argument for version statement has to be either 1.0 or 1.1. Based on my testing, 1.2 works as well for example in Junos 16.1R2.11. However, is there any difference between "version 1.0" and "version 1.1"? For example, in Junos 16.1R2.11 one could define "version 1.0" and still use functionality introduced in SLAX 1.1 like mutable variables or for loops. How is "version" statement used by cscript/mgd? I can not say with 100% certainity, but I guess the point is the other way around. If you set "Version 1.1", you basically tell other people that "Do not expect this to work on earlier versions than 1.1". But my guess is that it is not "enforced" by the scripting engine, so the script _might_ work. You as a script writer just can not guarantee it. /Ola (T) ___ juniper-nsp mailing list juniper-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp