- play_arrow Overview
- play_arrow Introduction
-
- play_arrow Devices
- play_arrow Device Management
- play_arrow Systems of Record
- play_arrow Device Discovery Profiles
- play_arrow Modeling Devices
- Rapid Deployment Overview
- Zero Touch Deployment Using Autoinstallation and Junos Space Network Management Platform on ACX Series and SRX Series Devices
- Model Devices Overview
- Creating a Connection Profile
- Creating a Modeled Instance
- Activating a Modeled or Cloned Device in Junos Space Network Management Platform
- Downloading a Configlet
- Viewing and Copying Configlet Data
- Activating Devices by Using Configlets
- Viewing a Modeled Instance
- Adding More Devices to an Existing Modeled Instance
- Viewing the Status of Modeled Devices
- Deleting Modeled Instances
- Viewing a Connection Profile
- Cloning a Connection Profile
- Modifying a Connection Profile
- Deleting Connection Profiles
- play_arrow Device Authentication in Junos Space
- play_arrow Viewing Device Inventory
- play_arrow Exporting Device Inventory
- play_arrow Configuring Juniper Networks Devices
- Modifying the Configuration on the Device
- Reviewing and Deploying the Device Configuration
- Junos OS Releases Supported in Junos Space Network Management Platform
- Configuration Guides Overview
- Saving the Configuration Created using the Configuration Guides
- Previewing the Configuration Created using the Configuration Guides
- Deploying the Configuration Created using the Configuration Guides
- Viewing and Assigning Shared Objects
- Applying a CLI Configlet to Devices
- Applying a CLI Configlet to a Physical Inventory Element
- Applying a CLI Configlet to a Physical Interface
- Applying a CLI Configlet to a Logical Interface
- Executing a Script on the Devices
- Executing a Script on a Physical Inventory Component
- Executing a Script on a Logical Interface
- Executing a Script on the Physical Interfaces
- play_arrow Device Adapter
- play_arrow Device Configuration Management
- play_arrow Adding and Managing Non Juniper Networks Devices
- play_arrow Accessing Devices
- Launching a Device’s Web User Interface
- Looking Glass Overview
- Executing Commands by Using Looking Glass
- Exporting Looking Glass Results in Junos Space Network Management Platform
- Secure Console Overview
- Connecting to a Device by Using Secure Console
- Configuring SRX Device Clusters in Junos Space using Secure Console
- play_arrow Logical Systems (LSYS)
- play_arrow Tenant System (TSYS)
- play_arrow Device Partitions
- play_arrow Custom Labels
- play_arrow Verifying Template, Image Deployment, Script Execution, and Staged Images on Devices
- play_arrow Device Monitoring
- play_arrow Device Maintenance
- Viewing Device Statistics
- Viewing Devices and Logical Systems with QuickView
- Resynchronizing Managed Devices with the Network
- Putting a Device in RMA State and Reactivating Its Replacement
- Modifying the Target IP Address of a Device
- Modifying the Serial Number of a Device
- Rebooting Devices
- Deleting Staged Images on a Device
- Cloning a Device in Junos Space Network Management Platform
- Deleting Devices
-
- play_arrow Device Templates
- play_arrow Overview
- play_arrow Template Definitions
- Creating a Template Definition
- Finding Configuration Options in a Template Definition
- Working with Rules in a Template Definition
- Specifying Device-Specific Values in Template Definitions
- Managing CSV Files for a Template Definition
- Publishing a Template Definition
- Viewing a Template Definition
- Modifying a Template Definition
- Cloning a Template Definition
- Importing a Template Definition
- Exporting a Template Definition
- Unpublishing a Template Definition
- Deleting a Template Definition
- play_arrow Configuring Devices using Device Templates
- play_arrow Configuring Devices using Quick Templates
- play_arrow Device Template Administration
- Viewing Template Details
- Viewing the Device-Template Association (Device Templates)
- Viewing Template Definition Statistics
- Viewing Device Template Statistics
- Comparing Templates or Template Versions
- Comparing a Device Template Configuration with a Device Configuration
- Cloning a Template in Junos Space Network Management Platform
- Exporting and Importing a Quick Template in Junos Space Network Management Platform
- Deleting Device Templates from Junos Space Network Management Platform
-
- play_arrow CLI Configlets
- play_arrow Overview
- play_arrow CLI Configlets
- Creating a CLI Configlet
- Modifying a CLI Configlet
- Viewing CLI Configlet Statistics
- Viewing a CLI Configlet
- Exporting CLI Configlets
- CLI Configlet Examples
- Deleting CLI configlets
- Cloning a CLI Configlet
- Importing CLI Configlets
- Applying a CLI Configlet to Devices
- Comparing CLI Configet Versions
- Marking and Unmarking CLI Configlets as Favorite
- play_arrow Configuration Views
- Configuration Views Overview
- Configuration View Variables
- Configuration View Workflow
- XML Extensions
- Creating a Configuration View
- Viewing a Configuration View
- Modifying a Configuration View
- Deleting Configuration Views
- Exporting and Importing Configuration Views
- Viewing Configuration Views Statistics
- Default Configuration Views Examples
- play_arrow XPath and Regular Expressions
- play_arrow Configuration Filters
-
- play_arrow Reports
- play_arrow Reports Overview
- play_arrow Report Definitions
- play_arrow Reports
-
- play_arrow Network Monitoring
- play_arrow Overview
- play_arrow Managing Nodes
- play_arrow Searching for Nodes and Assets
- play_arrow Managing Outages
- play_arrow Using the Network Monitoring Dashboard
- play_arrow Managing and Configuring Events
- play_arrow Managing and Configuring Alarms
- play_arrow Managing and Configuring Notifications
- play_arrow Managing Reports and Charts
- play_arrow Network Monitoring Topology
- play_arrow Network Monitoring Administration
- Configuring Network Monitoring System Settings
- Updating Network Monitoring After Upgrading the Junos Space Network Management Platform
- Configuring SNMP Community Names by IP
- Configuring SNMP Data Collection per Interface
- Managing Thresholds
- Compiling SNMP MIBs
- Managing SNMP Collections
- Managing SNMPv3 Trap Configuration
- Managing Data Collection Groups
- Managing and Unmanaging Interfaces and Services
- Starting, Stopping, and Restarting Services
-
- play_arrow Configuration Files
- play_arrow Overview
- play_arrow Managing Configuration Files
-
- play_arrow Jobs
- play_arrow Overview
- play_arrow Managing Jobs
- Viewing Statistics for Jobs
- Viewing Your Jobs
- Viewing Jobs
- Viewing Objects on Which a Job is Executed
- Viewing Job Recurrence
- Rescheduling and Modifying the Recurrence Settings of Jobs
- Retrying a Job on Failed Devices
- Reassigning Jobs
- Canceling Jobs
- Clearing Your Jobs
- Archiving and Purging Jobs
- Common Error Messages in Device-Related Operations
-
- play_arrow Role-Based Access Control
- play_arrow Overview
- play_arrow Roles
- Roles Overview
- Predefined Roles Overview
- Creating a User-Defined Role
- Managing Roles
- Modifying User-Defined Roles
- Deleting User-Defined Roles
- Cloning Predefined and User-Defined Roles
- Exporting User-Defined Roles from Junos Space Network Management Platform
- Importing Roles to Junos Space Network Management Platform
- play_arrow User Accounts
- Configuring Users to Manage Objects in Junos Space Overview
- Creating Users in Junos Space Network Management Platform
- Modifying a User
- Deleting Users
- Disabling and Enabling Users
- Unlocking Users
- Viewing Users
- Exporting User Accounts from Junos Space Network Management Platform
- Changing Your Password on Junos Space
- Clearing User Local Passwords
- Viewing User Statistics
- play_arrow User Groups
- play_arrow Domains
- play_arrow Remote Profiles
- play_arrow API Access Profiles
- play_arrow User Sessions
-
- play_arrow Audit Logs
- play_arrow Administration
- play_arrow Overview
- play_arrow Managing Nodes in the Junos Space Fabric
- Fabric Management Overview
- Overall System Condition and Fabric Load History Overview
- Junos Space Nodes and FMPM Nodes in the Junos Space Fabric Overview
- Dedicated Database Nodes in the Junos Space Fabric Overview
- Adding a Node to an Existing Junos Space Fabric
- Viewing Nodes in the Fabric
- Monitoring Nodes in the Fabric
- Viewing Alarms from a Fabric Node
- Shutting Down or Rebooting Nodes in the Junos Space Fabric
- Deleting a Node from the Junos Space Fabric
- Resetting MySQL Replication
- Modifying the Network Settings of a Node in the Junos Space Fabric
- Load-Balancing Devices Across Junos Space Nodes
- Replacing a Failed Junos Space Node
- Generating and Uploading Authentication Keys to Devices
- Configuring the ESX or ESXi Server Parameters on a Node in the Junos Space Fabric
- Creating a System Snapshot
- Deleting a System Snapshot
- Restoring the System to a Snapshot
- NAT Configuration for Junos Space Network Management Platform Overview
- Configuring the NAT IP Addresses and Ports on Junos Space Platform
- Modifying the NAT IP Addresses and Ports on Junos Space Platform
- Disabling the NAT Configuration on Junos Space Platform
- play_arrow Backing up and Restoring the Junos Space Platform Database
- play_arrow Managing Licenses
- play_arrow Managing Junos Space Platform and Applications
- Managing Junos Space Applications Overview
- Upgrading Junos Space Network Management Platform Overview
- Junos Space Store Overview
- Configuring and Managing Junos Space Store
- Running Applications in Separate Server Instances
- Managing Junos Space Applications
- Modifying Settings of Junos Space Applications
- Modifying Junos Space Network Management Platform Settings
- Managing File Integrity Check
- Starting, Stopping, and Restarting Services
- Adding a Junos Space Application
- Upgrading a Junos Space Application
- Upgrading Junos Space Network Management Platform
- Synchronizing Time Across Junos Space Nodes
- Upgrading to Junos Space Network Management Platform Release 21.1R1
- Uninstalling a Junos Space Application
- play_arrow Managing Troubleshooting Log Files
- System Status Log File Overview
- Customizing Node System Status Log Checking
- Customizing Node Log Files to Download
- Configuring JBoss and OpenNMS Logs in Junos Space
- Generating JBoss Thread Dump for Junos Space Nodes
- Downloading the Troubleshooting Log File in Server Mode
- Downloading the Troubleshooting Log File in Maintenance Mode
- Downloading Troubleshooting System Log Files Through the Junos Space CLI
- play_arrow Managing Certificates
- Certificate Management Overview
- Changing User Authentication Modes
- Installing a Custom SSL Certificate on the Junos Space Server
- Uploading a User Certificate
- Uploading a CA Certificate and Certificate Revocation List
- Deleting a CA Certificate or Certificate Revocation List
- Adding and Activating X.509 Certificate Parameters for X.509 Certificate Parameter Authentication
- Modifying an X.509 Certificate Parameter
- Deleting X.509 Certificate Parameters
- play_arrow Configuring Authentication Servers
- Remote Authentication Overview
- Junos Space Authentication Modes Overview
- Junos Space Login Behavior with Remote Authentication Enabled
- Managing Remote Authentication Servers
- Creating a Remote Authentication Server
- Modifying Authentication Settings
- Configuring a RADIUS Server for Authentication and Authorization
- Configuring a TACACS+ Server for Authentication and Authorization
- play_arrow Managing SMTP Servers
- play_arrow Email Listeners
- play_arrow Managing Git Repositories
- play_arrow Audit Log Forwarding
- Audit Log Forwarding in Junos Space Overview
- Viewing Audit Log Forwarding Criterion
- Adding Audit Log Forwarding Criterion
- Modifying Audit Log Forwarding Criterion
- Deleting Audit Log Forwarding Criterion
- Enabling Audit Log Forwarding Criterion
- Testing the System Log Server Connection for Audit Log Forwarding
- play_arrow Configuring a Proxy Server
- play_arrow Managing Tags
- Tags Overview
- Creating a Tag
- Managing Tags
- Managing Hierarchical Tags
- Sharing a Tag
- Renaming Tags
- Deleting Tags
- Tagging an Object
- Untagging Objects
- Filtering the Inventory by Using Tags
- Viewing Tagged Objects
- Viewing Tags for a Managed Object
- Exporting Tags from Junos Space Network Management Platform
- play_arrow Managing DMI Schemas
- DMI Schema Management Overview
- Viewing and Managing DMI Schemas
- Viewing Missing DMI Schemas
- Setting a Default DMI Schema
- Configuring Access to Juniper Networks DMI Schema Repository by Using the Configure Juniper Repository Action
- Adding Missing DMI Schemas or Updating Outdated DMI Schemas in Junos Space Network Management Platform
- Creating a Compressed TAR File for Updating DMI Schema
- Viewing and Deleting Unused DMI Schemas
- play_arrow Managing Hardware Catalog
- play_arrow Managing the Purging Policy
- play_arrow Disaster Recovery
-
- play_arrow Troubleshooting
- play_arrow Knowledge Base
-
Script Annotations
Script annotations are used to specify the metadata of a script. They are embedded in scripts. They are parsed and stored in the Junos Space Network Management Platform database while scripts are modified or imported. An annotation uses the following syntax:
/* @[ANNOTATION]= "<ANNOTATION CONTENT>" */
An annotation can be provided anywhere in the script.
Annotations are used to specify the name, description, and confirmation text of a script and the context in which the script can be applied. For an example script with an annotation, see Script Example. Table 1 displays the types of script annotations with their descriptions.
Annotation | Description |
---|---|
@CONTEXT | This annotation is used to specify the context in which the script can be applied. When the context is not specified, the default context is taken as /device.Example: /* @CONTEXT = "/device/chassis-inventory/chassis/chassis-module[starts-with (name,"FPC")]/chassis-sub-module[starts-with(name,"PIC")]" */ Note: You can execute scripts on more than 200 devices only if the script context is /, //, or /device and no device-specific or entity-specific parameters are specified. |
@NAME | This annotation is used to specify the descriptive name of the script. Example:
|
@CATEGORY | This annotation is used to specify the category to which the script belongs. This annotation enables you to group scripts based on any criteria. The annotation cannot exceed 255 characters. It can contain only letters and numbers and can include hyphen (-), underscore (_), space ( ), or period (.).Example:
|
@DESCRIPTION | This annotation is used to specify a description of the script.Example:
|
@CONFIRMATION | This annotation is used to specify the confirmation text of the script. That is, the text that must be displayed when an attempt is made to execute the script. When this field is not provided, no confirmation text is shown when the script is executed. This can be used to create warnings for certain scripts.Example:
|
@EXECUTIONTYPE | This annotation is used to specify the type of execution. The types of execution are GROUPEDEXECUTION and SINGLEEXECUTION. When this annotation is not specified, the default option is SINGLEEXECUTION.Example:
|
@GROUPBYDEVICE | This annotation is used to specify whether the script must be executed simultaneously or sequentially on the selected devices. The annotation works only for scripts for which the execution type is GROUPEDEXECUTION and @ISLOCAL is true. You can add the GROUPBYDEVICE annotation from Junos Space Network Management Platform Release 15.2R1 onward. If the annotation is set to TRUE, the script is executed on the selected devices at the same time. If set to FALSE or if the annotation is not included in the script, the script is executed sequentially on the selected devices.Example:
|
@ISLOCAL | This annotation is used to define whether the script is to be executed locally or staged on the device. This could be True or False. Example:
|
@VARIABLECONTEXT | This annotation is used to define the context of a variable.Example: /*@VARIABLECONTEXT="[{'name':'XPATHVARIABLE1','defaultvalue' :'mydefaultvalue','parameterscope':'devicespecific'},{'name' :'XPATHVARIABLE2','configuredvaluexpath':'/device/interface-information/ physical-interface/name/text()','parameterscope':'entityspecific'},{' name':'XPATHVARIABLE3','selectionvaluesxpath':'/device/ interface-information/physical-interface/name/text()','parameterscope':'global'}]"*/ |
@PASSSPACEAUTHHEADER | This annotation is specific to local scripts. If the annotation is set to True, then the $JSESSIONSSO and $JSESSIONID script variables are set. Example:
This annotation also provides the virtual IP address of the cluster in $VIP. |
@PASSDEVICECREDENTIALS | This annotation is specific to local scripts. If the annotation is set to true, Junos Space Platform sets the device credentials to $credentials and $deviceipmap variable (that is, $deviceipmap= '{"192.168.0.210":"Device1",...}')..Example:
|
@PROMOTE | This annotation is used to define whether the script is available for execution as a right-click action. This only works for scripts with the @EXECUTIONTYPE = "SINGLEEXECUTION" annotation. |
@ONCLOSESTRING | This annotation is used when the user wants the script execution result page to be closed automatically after the expected result is received. The @ONCLOSESTRING annotation contains a string. This string is compared with the script execution results. When the specified string appears in the script output, the script execution result page is automatically closed. The @ONCLOSESTRING annotation is useful for script promotion. For example, if a user has included the @ONCLOSESTRING annotation in the Reboot script containing a string that is displayed on successful execution of the script and executes the promoted Reboot script. The script execution result page closes by itself automatically and the reboot command is sent to the device successfully. If the script is not executed successfully, the reason for failure is displayed in the script execution result window. This further improves user experience by reducing the number of clicks required by the user to complete an action. |
@FAILJOBSTRING | This annotation is used to specify an arbitrary string which if present in the script output identifies the script execution as failure. The @FAILJOBSRTING annotation can take an arbitrary string value that does not exceed 255 characters. Because the string comparison is case sensitive, ensure that the string specified for @FAILJOBSTRING and the one in the script output use the same casing. The value of the @FAILJOBSRTING annotation can also be used as a tag name. If the script output contains the tag, the corresponding job is marked as failure.
|
Script Execution Types
With the SINGLEEXECUTION script execution type, the script can be executed only on a single element at a time. This is helpful if the script developer wants to ensure that the script execution is not executed for multiple elements simultaneously.
With the GROUPEDEXECUTION script execution type, the script is executed for a group of devices simultaneously. The context of the elements belonging to the group is passed as an expression to the $CONTEXT variable in the script. This way, the script is provided with the elements for which the script should be executed.
For example, for GROUPEDEXECUTION, the context structure could be as follows:
/device[name="EX4200-20"]/interface-information/physical-interface[name="ge-0/0/11"]| /device[name="EX4200-20"]/interface-information/physical-interface[name="ge-0/0/12"], /device[name="EX4200-240"]/interface-information/physical-interface[name="ge-0/0/5"]| /device[name="EX4200-240"]/interface-information/physical-interface[name="ge-0/0/6"].
Variable Context
The variable context defines what input the script is expecting from the user. This context can be used to autopopulate user-input options. This behavior is similar to that of the parameters in CLI Configlets. The variable context is defined using the @VARIABLECONTEXT annotation. The options are given in the following format:
@VARIABLECONTEXT = "[{'name':'<variable-name-1>',
'<option-1-1>':'<value-1-1>','<option-1-2>':'<value-1-2>',....,},.....,{'name':'<variable-name-n>',
'<option-n-1>':'<value-n-1>','<option-n-2>':'<value-n-2>',....,}]"
Table 2 explains the possible options.
Option | Description |
---|---|
configuredvaluexpath | This specifies the XPath (with reference to the device XML) from which the value of the parameter must be fetched. |
defaultvalue | The behavior is the same as that of configured value of XPath except that the value is given explicitly. This is considered only when "configuredvaluexpath" is not specified. |
selectionvaluesxpath | This contains the XPath (with reference to the device XML) to fetch the set of values for populating the options. |
selectionvalues | This is the same as the "selectionvalues" except that the comma-separated values are given explicitly. |
parameterscope | This is used to specify the scope of a parameter.
|
password | Use this option to allow the user to enter a password before executing the scripts. This obscures or displays the input parameters that you enter when you execute an op script. If you configure an op script with the @VARIABLECONTEXT script annotation for an input parameter with the "password" option, the input parameters that you enter in this field are obscured or displayed depending on the following values:
|
Local Script Execution
With Junos Space, you can execute op scripts in one or more devices simultaneously without staging and enabling the scripts. To do this, you use the local script execution feature. This feature enables you to execute the script locally in the Junos Space server. The @ISLOCAL annotation in the script must be set to true to differentiate normal script from the local script:
/*@ISLOCAL="true"*/
Local scripts run directly in the Junos Space server, so you do not need to stage, enable, or disable these scripts. If a script that is already staged is modified using the @ISLOCAL annotation, the update is rejected.
You can execute local scripts on one or more selected devices. For a cluster setup, you need to execute the scripts on a VIP node.
For the GROUPEDEXECUTION execution type, the device IP address list is passed as a parameter. The script opens an internal connection before interacting with the device.
You can execute local scripts with the GROUPEDEXECUTION execution type on multiple devices simultaneously by setting GROUPBYDEVICE to TRUE. If the GROUPBYDEVICE annotation is set to FALSE or if the annotation does not appear in the script, the script is executed sequentially on the selected devices.
Local scripts can be executed on devices with Junos Space–initiated connection.
Nesting Variables
You can use the XPath context to define the default option or the selectable options of a variable that are displayed on the script execution page. This XPath could have dependencies on other variables. Consider the following example:
A script requires two inputs: Physical Interface (Input-1) and
a Logical Interface (Input-2) that is part of the selected Physical
Interface (Input-1). You first define a variable PHYINT to get the name of the physical interface and a variable LOGINT to get the name of the logical interface. You then
define the SELECTIONVALUESXPATH for PHYINT as /device/interface-information/physical-interface/name/text()
. Select a value from the options listed by the XPath. Because the
selection values listed for the LOGINT variable
is dependent on the value selected for PHYINT, you define the SELECTIONVALUESXPATH of LOGINT as /device/configuration/interfaces/interface[name='$PHYINT']/unit/name/text()
. This ensures that only the logical interfaces of the selected physical
interface are listed.
When using the $INTERFACE, $UNIT, Configured Value XPath, Invisible
Params, and Selection fields, the variable definition in the CLI Configlet
Editor should contain .get(0)
to fetch
the value from the array. For example, $INTERFACE.get(0)
.
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.