Supported Platforms
Related Documentation
- ACX, EX, M, MX, PTX, SRX, T Series
- Junos Script Automation: Named Templates in the jcs Namespace Overview
- Junos Script Automation: Global Parameters and Variables in the junos.xsl File
- Required Boilerplate for Event Scripts
- ACX, EX, M, MX, PTX, QFX, SRX, T Series
- Required Boilerplate for Commit Scripts
- Required Boilerplate for Op Scripts
- ACX, EX, M, MX, SRX, T Series
- apply-imports
import
Syntax
import href;
Release Information
Statement introduced in version 1.0 of the SLAX language.
Description
Import rules from an external file or style sheet,
which provide access to all the declarations and templates within
the imported item. Any import statements
must be the first elements in the script or style sheet. The path
can be any URI. The path ../import/junos.xsl
is standard for all commit scripts, op scripts, and event scripts.
Imported rules are overwritten by any subsequent matching rules within the importing script. If more than one file or style sheet is imported, the items imported last override each previous import where the rules match.
Attributes
href | — | Specifies the location of the imported file or style sheet. |
SLAX Example
In the example, the main script imports the file route-rules.slax
, which contains a template rule
for <route> elements.
version 1.1; import "route-rules.slax"; match route { <routes> { apply-imports; } }
Related Documentation
- ACX, EX, M, MX, PTX, SRX, T Series
- Junos Script Automation: Named Templates in the jcs Namespace Overview
- Junos Script Automation: Global Parameters and Variables in the junos.xsl File
- Required Boilerplate for Event Scripts
- ACX, EX, M, MX, PTX, QFX, SRX, T Series
- Required Boilerplate for Commit Scripts
- Required Boilerplate for Op Scripts
- ACX, EX, M, MX, SRX, T Series
- apply-imports
Published: 2013-03-05
Supported Platforms
Related Documentation
- ACX, EX, M, MX, PTX, SRX, T Series
- Junos Script Automation: Named Templates in the jcs Namespace Overview
- Junos Script Automation: Global Parameters and Variables in the junos.xsl File
- Required Boilerplate for Event Scripts
- ACX, EX, M, MX, PTX, QFX, SRX, T Series
- Required Boilerplate for Commit Scripts
- Required Boilerplate for Op Scripts
- ACX, EX, M, MX, SRX, T Series
- apply-imports