- play_arrow Overview
- play_arrow Junos Automation Scripts Overview
- play_arrow Junos XML Management Protocol and Junos XML API Overview
-
- play_arrow Automation Scripting Using XSLT
- play_arrow XSLT Overview
- play_arrow Standard XPath and XSLT Functions Used in Automation Scripts
- play_arrow Standard XSLT Elements and Attributes Used in Automation Scripts
-
- play_arrow Automation Scripting Using SLAX
- play_arrow SLAX Overview
- SLAX Overview
- SLAX Syntax Rules Overview
- SLAX Elements and Element Attributes Overview
- SLAX Elements as Function Arguments
- Understanding SLAX Default Namespaces
- XPath Expressions Overview for SLAX
- SLAX Templates Overview
- SLAX Functions Overview
- SLAX Parameters Overview
- SLAX Variables Overview
- SLAX Statements Overview
- XSLT Elements Without SLAX Equivalents
- SLAX Operators
- play_arrow SLAX Statements
- append
- apply-imports
- apply-templates
- attribute
- attribute-set
- call
- copy-node
- copy-of
- decimal-format
- element
- else
- else if
- expr
- fallback
- for
- for-each
- function
- if
- import
- key
- match
- message
- mode
- mvar
- number
- output-method
- param
- preserve-space
- priority
- processing-instruction
- result
- set
- sort
- strip-space
- template
- terminate
- trace
- uexpr
- use-attribute-sets
- var
- version
- while
- with
- play_arrow The libslax Distribution for Automation Scripting
- libslax Distribution Overview
- libslax Library and Extension Libraries Overview
- Download and Install the libslax Distribution
- libslax Default Extension Libraries: bit, curl, db, os, and xutil
- Understanding the SLAX Processor (slaxproc)
- How to Use the SLAX Processor (slaxproc)
- SLAX Debugger, Profiler, and callflow
-
- play_arrow Automation Scripting Using Python
- play_arrow Python Overview
- Understanding Python Automation Scripts for Junos Devices
- Requirements for Executing Python Automation Scripts on Junos Devices
- Overview of Python Modules on Junos Devices
- How to Use Python Interactive Mode on Devices Running Junos OS
- How to Use the psutil Module to Retrieve Process and System Information on Devices Running Junos OS
- How to Use the Requests Library for Python on Devices Running Junos OS
- IPv6 Support in Python Automation Scripts
- How to Specify the Routing Instance in Python 3 Applications on Devices Running Junos OS Evolved
-
- play_arrow Automation Script Input
- play_arrow Global Parameters in Automation Scripts
-
- play_arrow Extension Functions and Named Templates for Automation Scripts
- play_arrow Extension Functions for Automation Scripting
- play_arrow Extension Functions in the jcs and slax Namespaces
- base64-decode() Function (SLAX)
- base64-encode() Function (SLAX)
- break-lines() Function (SLAX and XSLT)
- close() Function (SLAX and XSLT)
- dampen() Function (Python, SLAX, and XSLT)
- document() Function (SLAX)
- emit_error() Function (Python)
- emit_snmp_attributes Function (Python)
- emit_warning() Function (Python)
- empty() Function (SLAX and XSLT)
- evaluate() Function (SLAX)
- execute() Function (SLAX and XSLT)
- first-of() Function (SLAX and XSLT)
- get-command() Function (SLAX)
- get-hello() Function (SLAX and XSLT)
- get-input() Function (SLAX and XSLT) and get_input() (Python)
- get-protocol() Function (SLAX and XSLT)
- get-secret() Function (SLAX and XSLT) and get_secret() (Python)
- get_snmp_action() Function (Python)
- get_snmp_oid() Function (Python)
- hostname() Function (Python, SLAX, and XSLT)
- invoke() Function (SLAX and XSLT)
- open() Function (SLAX and XSLT)
- output() Function (Python, SLAX, and XSLT)
- parse-ip() Function (SLAX and XSLT) and parse_ip() (Python)
- printf() Function (Python, SLAX, and XSLT)
- progress() Function (Python, SLAX, and XSLT)
- regex() Function (SLAX and XSLT)
- set_routing_instance() Function (Python)
- sleep() Function (SLAX and XSLT)
- split() Function (SLAX and XSLT)
- sysctl() Function (Python, SLAX, and XSLT)
- syslog() Function (Python, SLAX, and XSLT)
- trace() Function (Python, SLAX, and XSLT)
- play_arrow Named Templates for Automation Scripting
- play_arrow Named Templates in the jcs Namespace
-
- play_arrow Manage Automation Scripts
- play_arrow Store and Enable Scripts
- play_arrow Configure a Remote Source for Scripts
- play_arrow Configure the Session Protocol for Scripts
- play_arrow Control Execution of Scripts
- play_arrow Synchronize Scripts Between Routing Engines
- play_arrow Convert Scripts Between SLAX and XSLT
-
- play_arrow Commit Scripts
- play_arrow Commit Scripts Overview
- play_arrow Create and Execute Commit Scripts
- Required Boilerplate for Commit Scripts
- XML Syntax for Common Commit Script Tasks
- Design Considerations for Commit Scripts
- How to Avoid Potential Conflicts When Using Multiple Commit Scripts
- Line-by-Line Explanation of Sample Commit Scripts
- Control the Execution of Commit Scripts During Commit Operations
- Control the Execution of Commit Scripts in the QFabric System
- Configure Checksum Hashes for a Commit Script
- How to Process Large Configurations Against Commit Scripts
- Example: Retrieve the Pre-Inheritance Candidate Configuration in a Commit Script
- play_arrow Generate a Custom Warning, Error, or System Log Message Using Commit Scripts
- Overview of Generating Custom Warning, Error, and System Log Messages
- Generate a Custom Warning, Error, or System Log Message in Commit Scripts
- SLAX and XSLT Commit Script Tag Elements to Use When Generating Messages
- Example: Generate a Custom Warning Message
- Example: Generate a Custom Error Message
- Example: Generate a Custom System Log Message
- play_arrow Generate Persistent or Transient Configuration Changes Using Commit Scripts
- Overview of Generating Persistent or Transient Configuration Changes Using Commit Scripts
- Generate a Persistent or Transient Configuration Change in SLAX and XSLT Commit Scripts
- Generate a Persistent or Transient Configuration Change in Python Commit Scripts
- SLAX and XSLT Commit Script Tag Elements to Use When Generating Persistent and Transient Configuration Changes
- Remove a Persistent or Transient Configuration Change Using Commit Scripts
- Example: Generate Persistent and Transient Configuration Changes Using Commit Scripts
- play_arrow Create Custom Configuration Syntax with Commit Script Macros
- Overview of Creating Custom Configuration Syntax with Commit Script Macros
- Create Custom Configuration Syntax with Commit Script Macros
- Create a Commit Script Macro to Read the Custom Syntax and Generate Related Configuration Statements
- Example: Creating Custom Configuration Syntax with Commit Script Macros
- play_arrow Commit Script Examples
- Example: Adding a Final then accept Term to a Firewall
- Example: Adding T1 Interfaces to a RIP Group
- Example: Assign a Classifier Using a Commit Script
- Example: Automatically Configure Logical Interfaces and IP Addresses
- Example: Configure Administrative Groups for LSPs
- Example: Configure a Default Encapsulation Type
- Example: Configure Dual Routing Engines
- Example: Configure an Interior Gateway Protocol on an Interface
- Example: Control IS-IS and MPLS Interfaces
- Example: Control LDP Configuration
- Example: Create a Complex Configuration Based on a Simple Interface Configuration
- Example: Impose a Minimum MTU Setting
- Example: Limit the Number of ATM Virtual Circuits
- Example: Limit the Number of E1 Interfaces
- Example: Load a Base Configuration
- Example: Prepend a Global Policy
- Example: Prevent Import of the Full Routing Table
- Example: Require Internal Clocking on T1 Interfaces
- Example: Require and Restrict Configuration Statements
- play_arrow Junos XML and XSLT Tag Elements Used in Commit Scripts
- play_arrow Troubleshoot Commit Scripts
-
- play_arrow Event Policies and Event Scripts
- play_arrow Event Policy Overview
- play_arrow Event Policy Triggers
- Use Correlated Events to Trigger an Event Policy
- Trigger an Event Policy Based on Event Count
- Example: Trigger an Event Policy Based on Event Count
- Use Regular Expressions to Refine the Set of Events That Trigger a Policy
- Example: Controlling Event Policy Using a Regular Expression
- Generate Internal Events to Trigger Event Policies
- Use Nonstandard System Log Messages to Trigger Event Policies
- Junos Logger Utility
- play_arrow Event Policy Actions
- Configure an Event Policy to Execute Operational Mode Commands
- Configure an Event Policy to Change the Configuration
- Example: Changing the Configuration Using an Event Policy
- Example: Changing the Interface Configuration in Response to an Event
- Execute Event Scripts in an Event Policy
- Change the Configuration Using an Event Script
- Configuring an Event Policy to Pass Arguments to an Event Script
- Configure Event Policies to Ignore an Event
- Example: Ignore Events Based on Receipt of Other Events
- Overview of Using Event Policies to Raise SNMP Traps
- Example: Raise an SNMP Trap in Response to an Event
- Understanding the Event System Log Priority in an Event Policy
- Example: Configuring the Event System Log Priority in an Event Policy
- Example: Limit Event Script Output Based on a Specific Event Type
- play_arrow Configure Event Policy File Archiving
- play_arrow Configure Event Policy Privileges
- play_arrow Event Scripts Overview
- play_arrow Create and Execute Event Scripts
- play_arrow Troubleshoot Event Policies and Event Scripts
-
- play_arrow SNMP Scripts
- play_arrow SNMP Scripts Overview
- play_arrow Create and Execute SNMP Scripts
- play_arrow SNMP Script Example
- play_arrow Troubleshoot SNMP Scripts
-
- play_arrow Configuration Statements and Operational Commands
Example: Configure Service Template Automation
This example shows how to use service template automation to provision services across similar platforms running Junos OS.
Overview
This example uses service template automation to provision services on an MX Series router. To use the service template automation service-builder.slax script, you must first copy the script to the /var/db/scripts/op or /config/scripts/op directory and enable the script on the device.
The following process outlines how to use service template automation to provision services:
Create a service template definition.
Execute the service-builder.slax script, and define service-specific instance parameters.
Generate the service interface.
Enable the service interface on each device where the service is required.
Provision systems by invoking the service interface using NETCONF and supplying the service parameter values.
This example creates a new VPN service interface on an MX Series device running Junos OS Release 12.3 and provisions the service on a second MX Series device running Junos OS Release 12.3. You configure service template definitions under the [edit groups]
hierarchy level. For this example, the service name is vpn-service
, and the template group name is vpn-service-template-group
. The load merge terminal
configuration mode command loads the service template configuration hierarchies into the candidate configuration, which is then committed.
Once you create the initial service template, you execute the service-builder.slax script. The script prompts for the service name and the template group name, and then reads the service template configuration from the committed configuration.
The service-builder.slax script interface consists of two menus: Main Menu
and Hierarchies Menu
. Within the Main Menu
, you can review the variables defined in the service template configuration, or you can build or enable the service API. The Build Service API
menu option displays the Hierarchies Menu
, which steps you through the parameterization of the variables. The default is to parameterize every variable, or you can choose to parameterize selected variables. If you must exit the service-builder.slax script while building the service API, you must finish configuring all the parameters for the current hierarchy in order to save that hierarchy configuration when you exit using the Quit
option. Then you can finish configuring any incomplete hierarchies at a later time. This example parameterizes two variables: the interface name and the interface description. After the parameters are specified, the service builder script generates the service script.
The Enable Service API
menu option enables the service script on the local device. To enable the service script on the second MX Series device, the generated service script is copied to the /var/db/scripts/op directory on the second device, and the script is enabled in the configuration. If the load-scripts-from-flash
statement is configured, the script must be copied to the corresponding directory on the flash drive instead.
NETCONF is used to provision the service on the remote MX Series device. The NETCONF remote procedure call (RPC) action depends on whether the service is a new service or an existing service. Supported actions include create
, update
, and delete
. This example creates a new service. If the given service is already provisioned on the device and you are updating or deleting the service parameters, you can alter the RPC to perform these actions.
Configuration
- Storing and Enabling the Service Builder Script
- Configuring the Service Template Definition
- Configuring and Generating the Service Interface
- Verifying the Service Interface
- Enabling the Service Interface
- Provisioning the Service Using NETCONF
- Updating or Deleting Services Using NETCONF
Storing and Enabling the Service Builder Script
Step-by-Step Procedure
The Junos OS installation includes the service-builder.slax script, which is stored in the /usr/libexec/scripts/op/ directory on the device. To use the service-builder.slax script, you must first copy it to the op scripts directory and enable it in the configuration. Only users in the Junos OS superuser login class can access and edit files in these directories.
Copy the service-builder.slax script to the /var/db/scripts/op directory on the hard disk or the /config/scripts/op directory on the flash drive.
content_copy zoom_out_mapuser@host> file copy /usr/libexec/scripts/op/service-builder.slax /var/db/scripts/op
Verify that the script is in the correct directory by using the
file list
operational mode command.content_copy zoom_out_mapuser@host> file list /var/db/scripts/op /var/db/scripts/op: service-builder.slax*
Enable the script in the configuration.
content_copy zoom_out_map[edit] user@host# set system scripts op file service-builder.slax
If you store scripts in and load them from flash, configure the
load-scripts-from-flash
statement, if it is not already configured.content_copy zoom_out_map[edit] user@host# set system scripts load-scripts-from-flash
Commit the configuration.
content_copy zoom_out_map[edit] user@host# commit
Configuring the Service Template Definition
Step-by-Step Procedure
To create a new service template on a device running Junos OS:
Select a service name.
This example uses
vpn-service
.In configuration mode, create a new group, which will contain the hierarchies for the actual service to be provisioned.
content_copy zoom_out_map[edit] user@host# set groups vpn-service-template-group
Configure the hierarchies for the service.
For this example, the pre-constructed configuration hierarchies are loaded into the candidate configuration using the
load merge terminal
command.content_copy zoom_out_map[edit] user@host# load merge terminal groups { vpn-service-template-group { interfaces { ge-2/2/6 { description "connected to customer3-site-1"; unit 0 { family bridge { interface-mode access; vlan-id 300; } } } } protocols { rstp { interface ge-2/3/0; } mvrp { interface ge-2/3/0; } } bridge-domains { bd { vlan-id-list 100; } } } } [Ctrl+D]
Verify that the configuration syntax is correct.
content_copy zoom_out_map[edit] user@host# commit check configuration check succeeds
Commit the configuration.
content_copy zoom_out_map[edit] user@host# commit
Configuring and Generating the Service Interface
Step-by-Step Procedure
To configure and generate the service interface:
In operational mode, execute the service-builder.slax script, which starts an interactive Service Builder session.
content_copy zoom_out_mapuser@host> op service-builder Welcome to Service Builder Script: (v1.0) - Enter the service name :
Enter the service name that was defined in Configuring the Service Template Definition.
content_copy zoom_out_mapEnter the service name : vpn-service
Enter the group name under which the service hierarchies are configured.
This example uses the group name
vpn-service-template-group
. The script reads the configuration specified in thevpn-service-template-group
hierarchy and then displays the main menu.content_copy zoom_out_mapEnter the group name : vpn-service-template-group .. reading [edit group vpn-service-template-group] .. [Op Script Builder - Main Menu] ----------------------------------- 1. Show Variables 2. Build Service API 3. Enable Service API Q. Quit ----------------------------------- Enter Selection:>
(Optional) To review the service template variables that you can parameterize, select the
Show Variables
option.The script translates the template definition in the candidate configuration into a general parameter list grouped by hierarchy level.
content_copy zoom_out_map[Op Script Builder - Main Menu] ----------------------------------- 1. Show Variables 2. Build Service API 3. Enable Service API Q. Quit ----------------------------------- Enter Selection:> 1 List of variables under each hierarchy to parameterize: - 1. [ edit groups vpn-service-template-group interfaces ] 1.1. interface/name 1.2. interface/description 1.3. interface/unit/name 1.4. interface/unit/family/bridge/interface-mode 1.5. interface/unit/family/bridge/vlan-id - 2. [ edit groups vpn-service-template-group protocols ] 2.1. rstp/interface/name 2.2. mvrp/interface/name - 3. [ edit groups vpn-service-template-group bridge-domains ] 3.1. domain/name 3.2. domain/vlan-id-list -
To build the Service API, select the
Build Service API
option.content_copy zoom_out_map[Op Script Builder - Main Menu] ----------------------------------- 1. Show Variables 2. Build Service API 3. Enable Service API Q. Quit ----------------------------------- Enter Selection:> 2
From the
Hierarchies Menu
, enter the menu selections for the hierarchies that have variables you want to parameterize, or press Enter to select all hierarchies.content_copy zoom_out_map[Op Script Builder - Hierarchies Menu] ----------------------------------- 1. interfaces 2. protocols 3. bridge-domains Q. Quit ----------------------------------- Please enter multiple selections separated by a comma (,) only. ----------------------------------- Enter Selection:> [default:all] 1
From the variables list, enter the menu selections for the variables you want to parameterize for the service interface, or press Enter to parameterize all variables within that hierarchy.
content_copy zoom_out_mapList of variables to parameterize: ... [ edit groups vpn-service-template-group interfaces ] ----------------------------------- 1. interfaces/interface/name 2. interfaces/interface/description 3. interfaces/interface/unit/name 4. interfaces/interface/unit/family/bridge/interface-mode 5. interfaces/interface/unit/family/bridge/vlan-id Q. Quit Please enter multiple selections separated by a comma (,) only. ----------------------------------- Enter Selection:> [default:all] 1,2
Configure the selected parameters.
The system prompts for the required information. This example configures the interface name parameter as
ifname
and the interface description parameter asifdesc
.content_copy zoom_out_mapEnter parameter name for: 1.interfaces/interface/name **************************** [ edit groups vpn-service-template-group interfaces ] Name for this parameter? ifname Do you want to revise 'ifname'? (yes/no)[no]: no Enter parameter name for: 2.interfaces/interface/description **************************** [ edit groups vpn-service-template-group interfaces ] Name for this parameter? ifdesc Do you want to revise 'ifdesc'? (yes/no)[no]: no
Configure the selected parameters at each hierarchy level.
The script iterates over each selected hierarchy and the specified parameters. If you must exit the service-builder.slax script while building the service API, you must finish configuring all the parameters for the current hierarchy in order to save that hierarchy configuration when you exit using the
Quit
option.Generate the service interface, which creates the service script.
Once all parameters are configured, the script automatically prompts you to generate the service interface. Press Enter or type yes to generate the service interface.
content_copy zoom_out_mapDo you want to commit the previously selected options to create vpn-service script? (yes/no)[yes]: yes Created service script: /var/db/scripts/op/vpn-service.slax
Verifying the Service Interface
Purpose
Verify the creation of the service script. If the load-scripts-from-flash
statement is configured, the generated file is stored in flash memory. Otherwise, the generated file is stored on the hard disk.
Action
Issue the file list
operational mode command. For this example, the vpn-service.slax script should be present in the /var/db/scripts/op directory. The service-builder.slax script also generates the utility.slax script in the /var/db/scripts/op directory and the vpn-service-builder-info.xml file in the /var/db/scripts/lib directory. These files are used by the service-builder.slax script and should not be deleted.
user@host> file list /var/db/scripts/op /var/db/scripts/op: service-builder.slax utility.slax vpn-service.slax user@host> file list /var/db/scripts/lib /var/db/scripts/lib: vpn-service-builder-info.xml
Enabling the Service Interface
Step-by-Step Procedure
To enable the service interface on a remote device:
Copy the generated service script to the device where you are provisioning the new service.
If the
load-scripts-from-flash
statement is not configured, copy the service script to the /var/db/scripts/op directory on the second device. Otherwise, the script must be copied to the corresponding directory on the flash drive instead.Enable the op script in the configuration.
content_copy zoom_out_map[edit] user@host2# set system scripts op file vpn-service.slax
Commit the configuration.
content_copy zoom_out_map[edit] user@host2# commit commit complete
In operational mode, verify that the script is enabled and that the service parameters display as arguments for the script.
content_copy zoom_out_mapuser@host2> op vpn-service ? Possible completions: <[Enter]> Execute this command <name> Argument name action Please enter either create/delete/update detail Display detailed output ifdesc Text description of interface ifname Name of interface service-id Service Name | Pipe through a command
Provisioning the Service Using NETCONF
Step-by-Step Procedure
To provision the service:
If it is not already configured, configure NETCONF service over SSH on any devices where you are provisioning the new service.
content_copy zoom_out_map[edit] user@host2# set system services netconf ssh user@host2# commit
From a configuration management server, establish a NETCONF session with the device where you are provisioning the service.
content_copy zoom_out_map%ssh -p 830 -s user@host2 netconf user@host2's password: <!-- user user, class super-user --> <hello> <capabilities> <capability>urn:ietf:params:xml:ns:netconf:base:1.0</capability> <capability> urn:ietf:params:xml:ns:netconf:capability:candidate:1.0 </capability> <capability> urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0 </capability> <capability> urn:ietf:params:xml:ns:netconf:capability:validate:1.0 </capability> <capability> urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file </capability> <capability>http://xml.juniper.net/netconf/junos/1.0</capability> <capability>http://xml.juniper.net/dmi/system/1.0</capability> </capabilities> <session-id>28898</session-id> </hello> ]]>]]>
If you are provisioning a new service on the device, enter a remote procedure call (RPC) that calls the service op script using the
create
action, and include values for all parameters that require configuring.The value for the
service-id
parameter should be identical to the service name.content_copy zoom_out_map<rpc> <op-script> <script>vpn-service</script> <action>create</action> <service-id>vpn-service</service-id> <ifname>ge-2/0/5,ge-2/0/6</ifname> <ifdesc>connected to customer1-site-1,connected to customer3-site-2</ifdesc> </op-script> </rpc>
Updating or Deleting Services Using NETCONF
Step-by-Step Procedure
To update or delete an existing service:
If it is not already configured, configure NETCONF service over SSH on any devices where you are updating or deleting the service.
content_copy zoom_out_map[edit] user@host2# set system services netconf ssh user@host2# commit
From a configuration management server, establish a NETCONF session with the device where you are provisioning the service.
content_copy zoom_out_map%ssh -p 830 -s user@host2 netconf user@host2's password: <!-- user user, class super-user --> <hello> <capabilities> <capability>urn:ietf:params:xml:ns:netconf:base:1.0</capability> <capability> urn:ietf:params:xml:ns:netconf:capability:candidate:1.0 </capability> <capability> urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0 </capability> <capability> urn:ietf:params:xml:ns:netconf:capability:validate:1.0 </capability> <capability> urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file </capability> <capability>http://xml.juniper.net/netconf/junos/1.0</capability> <capability>http://xml.juniper.net/dmi/system/1.0</capability> </capabilities> <session-id>28898</session-id> </hello> ]]>]]>
If the given service is already provisioned on the device and you are updating the service, enter an RPC that calls the service op script using the
update
action, and include values for all parameters that require updating.content_copy zoom_out_map<rpc> <op-script> <script>vpn-service</script> <action>update</action> <service-id>vpn-service</service-id> <ifname>ge-2/0/5</ifname> <ifdesc>connected to customer1-site-2</ifdesc> </op-script> </rpc>
If the given service is already provisioned on the device and you are deleting some or all of the service parameters, enter an RPC that calls the service op script using the
delete
action, and include any parameters that need to be deleted.content_copy zoom_out_map<rpc> <op-script> <script>vpn-service</script> <action>update</action> <service-id>vpn-service</service-id> <ifname>ge-2/0/6</ifname> </op-script> </rpc>
Verification
Confirm that the configuration is updated.
Verifying the Commit
Purpose
Verify that the commit is successful.
Action
Issue the show system commit
operational mode command to view the recent commits. The most recent commit entry shows that a commit was made through the NETCONF server by user
.
user@host2> show system commit 0 2012-05-21 12:15:08 PDT by user via junoscript 1 2012-05-18 09:47:40 PDT by user via other ...
Verifying the Service Configuration
Purpose
Verify that the service configuration is present in the active configuration.
Action
Issue the show configuration | compare rollback num
operational mode command to view configuration changes.
user@host2> show configuration | compare rollback 1 [edit interfaces] + ge-2/0/5 { + description "connected to customer1-site-1"; + } + ge-2/0/6 { + description "connected to customer3-site-2"; + }
Meaning
A comparison of the current configuration with the previous configuration shows that the interfaces and interface descriptions were added to the configuration.
Troubleshooting
Troubleshooting a Failed Commit
Problem
You see the following message when creating, updating, or deleting a service on a device through a NETCONF session:
<output> configuration database modified </output>
The configuration has previously uncommitted changes, and the service script cannot commit the service configuration changes.
Solution
Commit the previous changes or roll back the configuration as appropriate, and then resubmit the service configuration changes.
Troubleshooting a Failed Attempt to Delete Service Parameters
Problem
You see the following message when deleting a service parameter on a device through NETCONF:
<xnm:error xmlns:xnm="http://xml.juniper.net/xnm/1.1/xnm"> <source-daemon> op-script </source-daemon> <message> xsl:attribute: Cannot add attributes to an element if children have been already added to the element. </message> </xnm:error>
Solution
The RPC might include both the parameter and a child element. Remove the child element from the RPC.