Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All
     

    Related Documentation

     

    get-secret() Function (jcs and slax Namespaces)

    Namespaces

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

    SLAX Syntax

    var $user-input = prefix:get-secret(string);

    XSLT Syntax

    <xsl:variable name="user-input" select="prefix:get-secret(string)"/>

    Release Information

    Function introduced in Junos OS Release 9.5R2.

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

    Description

    Invoke a CLI prompt and wait for user input. Unlike the jcs:get-input() function, the input is not echoed back to the user, which makes the function useful for obtaining passwords. The user input is defined as a string for subsequent use. This function cannot be used with event scripts.

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

    Parameters

    string
    —

    CLI prompt text.

    Return Value

    user-input
    —

    Text typed by the user and stored as a string.

    Usage Examples

    The following example shows how to prompt for a password that is not echoed back to the user:

    var $password = jcs:get-secret("Enter password: ");
     

    Related Documentation

     

    Published: 2013-03-05