Automation
Showing results for 
Search instead for 
Do you mean 

SLAX 1.1 enhancements released in Junos 14.1

by Cordelia on ‎08-08-2015 06:49 AM - edited on ‎09-06-2017 04:43 PM by Administrator Administrator
This applies to SLAX version 1.1 and higher.

Overview


SLAX 1.1 was introduced in Junos 12.2 as libslax version 0.11.22. No libslax updates have been committed into Junos since that time until Junos 14.1 when the version of libslax included by Junos was updated to 0.14.1. This article lists the various SLAX enhancements that were introduced in Junos 14.1 as a consequence of this libslax upgrade.

libslax version details


libslax 0.11.22 - GitHub commit 714720f98de1f89ee334ddc713ff8e94eb8d3182 on April 17, 2012

libslax 0.14.1 - GitHub commit 69f1fbc0c4093c5b332eaea188eb828da3d8cc01 on February 1, 2013

New Functions


os:exit-code() - Set the exit code for the process running the script.

os:mkdir() - Make a new directory in the filesystem.

os:stat() - Return details about a file or directory.

xutil:max-call-depth() - Check and/or change the recursive call depth. (Default is 3000).

xutil:json-to-xml() - Translate a JSON string into XML.

xutil:xml-to-json() - Translate XML into a JSON string.

Function Enhancements


curl <format> element now supports "html". When selected, the result is parsed as HTML.

New curl <timeout> option to specify how many seconds before considering an open connection to have failed.

New curl <connect-timeout> option to specify how many seconds to attempt a connection before considering it to have failed.

New <retain-returns> options for slax:document(). If present, carriage returns will not be removed from the document. This might be necessary if the file is in DOS format.

Source


Original content by Curtis Call <ccall@juniper.net>, July 2014.