Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

jcs:load-configuration Template

 

SLAX Syntax

XSLT Syntax

Description

Make structured changes to the Junos OS configuration using an op script or event script. When called, the template locks the configuration database, loads the configuration changes, commits the configuration, and then unlocks the configuration database.

The jcs:load-configuration template makes changes to the configuration in configure exclusive mode. In this mode, Junos OS locks the candidate global configuration for as long as the script accesses the shared database and makes changes to the configuration without interference from other users.

Parameters

actionSpecifies how to load the configuration changes with respect to the candidate configuration. The following options are supported:
  • merge—Combine the candidate configuration and the incoming configuration changes. If the candidate configuration and the incoming configuration contain conflicting statements, the incoming statements override those in the candidate configuration.

  • override—Replace the entire candidate configuration.

  • replace—Replace existing statements in the candidate configuration with the tags of the same name that are marked with replace: in the incoming configuration. If there is no existing statement of the same name in the candidate configuration, the statement is added to the candidate configuration.

commit-optionsNode set defining options that customize the commit operation. The default value is null. Supported commit options are:
  • check—Check the correctness of the candidate configuration syntax, but do not commit the changes.

  • force-synchronize—Force the commit on the other Routing Engine (ignore any warnings).

  • log—Write the specified message to the commit log.

  • synchronize—Synchronize the commit on both Routing Engines.

configurationXML configuration changes. The configuration changes are incorporated into the candidate configuration as specified by the action parameter.
connectionConnection handle generated by a call to the jcs:open() function.
rescueLoad and commit the rescue configuration, if one exists. The only acceptable value for this parameter is "rescue". The rescue parameter is available starting in Junos OS Release 20.1R1.
rollbackRevert to a previously committed configuration. Specify the rollback number of the configuration. The rollback parameter is available starting in Junos OS Release 12.2.