The script does not supply a host parameter when creating the Device instance, which causes the open() method to establish a connection with the local device. The config_xml variable is an XML string that defines the configuration changes. The interface to disable, and stores the interface name in the interface variable. The script calls the jcs.get_input() extension function, which prompts the user to enter the name of On the CLI so that the user can verify the purpose for that script. When the script is executed, the script outputs the usage description Is initialized with a general description of the script’s function. Script to execute supported extension functions The connection with the device running Junos OSĬonfiguration mode commands on the target deviceĮxceptions encountered when managing devices running Junos OS The Python op script imports the following: To disable an interface on the local device. Python op script in this example demonstrates how to update the configuration For more informationĪbout using Junos PyEZ to configure devices running Junos OS, see Using Junos PyEZ to Configure Devices Running Junos OS. The configuration, and unlock the configuration. Provides instance methods to lock the configuration, load the configurationĭata and specify how to integrate it into the configuration, commit Python op scripts can make changes to the Junos OS configuration
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |