Blogs

How can I get transient changes included in configuration results?

By Erdem posted 08-11-2015 09:20

  

Junos OS on-box Scripts and Including Transient Changes in Configuration Results

 

Junos OS on-box scripts commonly use the <get-configuration> RPC to retrieve the current device configuration. However, the returned configuration might not be the actual configuration running on the device if commit scripts are deployed and they made transient configuration changes.

 

This divergence is possible because, rather than being reflected in the committed configuration, transient configuration changes only affect the configuration that is provided to daemons. This means that when the <get-configuration> RPC pulls the committed configuration, it will not see the transient changes introduced by commit scripts because they never actually appear in that configuration.

 

As of Junos OS Release 12.1, two new values have been added for the commit-scripts attribute of the <get-configuration> RPC to solve the configuration divergence:

 

  • "apply"
  • "apply-no-transients"

Of the two attributes, the "apply" option is useful in this scenario. It processes any configured commit scripts before returning the configuration, allowing the modified configuration to be viewed by scripts, including both transient and permanent changes.

 

For more information and examples, see Including Transient Changes in Configuration Results


#on-box
#JunosOS
#commitscript
#
#How-To
#Slax