Requirement – Connect to a MX device to commit a configuration on the Device, if there is any un-committed configuration, Script should hold and display the un-committed configuration.

Basically,

JNPR.JUNOS – Device – helps us to connect to device

JNPR.JUNOS – Util.Config – helps to issue config related (Rollback/Config) etc

\033 – Helps the print statement to display in colored Format, [91m – Red , [1m – Bold , [0m indicates to end the color format

 

 

I have some uncommitted configuration on the device and hence we expect the script to indicate us the uncommitted configuration

 

 

Once i Fix the config, on the device, lets see if the configuration from the script gets fixed

 

This is an Intro to how we can start deploying or to check any devices which has any UnCommitted configuration on the Devices and Proceed Accordingly.

 

-Rakesh