Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Script to translate a Junos configuration file into a list of 'set' commands

License

Notifications You must be signed in to change notification settings

JuniperChris929/juniper_display_set

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Juniper display set

This script converts standard Juniper config into a list of 'set' commands which you can use to configure a Juniper device

Changelog 06.05.2019

Migrated Script to python3 (junos-converter-30.py)

Usage

The input is a standard Juniper configuration file like:

/* my configuration */
version 19.1R1;
system {
    host-name vSRX3.0;
    root-authentication {
        encrypted-password "$1$YJ7i1337Vpo8$myuAjTW/tkWlm6EudqcP4/"; ## SECRET-DATA
    }
    login {
        user dev {
            uid 1337;
            class super-user;
            authentication {
                encrypted-password "$1$YJ7i1337Vpo8$myuAjTW/tkWlm6EudqcP4/"; ## SECRET-DATA
            }
        }
    }
}
interfaces {
    ge-0/0/1 {
        vlan-tagging;
    }
    ge-0/0/2 {
        vlan-tagging;
    }
}

Run the Script with the example-non-set command as input file: junos-converter30.py example-in.conf The output will be set-commands that you can use for your JunOS Device

Notes

  • Annotations will be lost (like /* my configuration */)
  • Inactive blocks are supported (like "system syslog" in the example)
  • Protect blocks are supported as well (like "system services" in the example)
  • only non-set to set. The other way is currently a WIP

About

Script to translate a Junos configuration file into a list of 'set' commands

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%