Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Automation Scripting User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

progress() Function (Python, SLAX, and XSLT)

date_range 30-May-23

Namespaces

content_copy zoom_out_map
http://xml.juniper.net/junos/commit-scripts/1.0
http://xml.libslax.org/slax

Python Syntax

content_copy zoom_out_map
jcs.progress(string)

SLAX Syntax

content_copy zoom_out_map
expr prefix:progress(string);

XSLT Syntax

content_copy zoom_out_map
<xsl:value-of select="prefix:progress(string)"/>

Description

Issue a progress message containing the single argument immediately to the CLI session provided that the detail flag was specified when the script was invoked.

The prefix associated with the namespace URI should be defined in the prefix-to-namespace mapping in the style sheet.

Parameters

string

Text that is output to CLI session.

Usage Examples

SLAX syntax:

content_copy zoom_out_map
expr jcs:progress('Working...');

XSLT syntax:

content_copy zoom_out_map
<xsl:value-of select="jcs:progress('Working...')"/>

Python syntax:

content_copy zoom_out_map
 jcs.progress('Working...')

The script must be invoked with the detail flag in order for the progress message to appear in the CLI session.

content_copy zoom_out_map
user@host> op script1.slax detail
2010-10-01 16:27:54 PDT: running op script 'script1.slax'
2010-10-01 16:27:54 PDT: opening op script '/var/db/scripts/op/script1.slax'
2010-10-01 16:27:54 PDT: reading op script 'script1.slax'
2010-10-01 16:27:54 PDT: Working...
2010-10-01 16:28:14 PDT: inspecting op output 'script1.slax'
2010-10-01 16:28:14 PDT: finished op script 'script1.slax'

Release Information

Function introduced in Junos OS Release 7.6.

Support for the slax namespace http://xml.libslax.org/slax added in Junos OS Release 12.2.

Support for Python added in Junos OS Release 16.1R1.

footer-navigation