From the course: Python 3 SSH Network Automation Quick Start

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Program multiple switches using a file

Program multiple switches using a file

- [Instructor] Now rather than having your Cisco commands in your Python script like this, you may want to separate the Cisco commands from the Python script. As an example, if you've got many commands such as this example, you may want to have your Cisco commands in a separate file or multiple files depending on which device you're configuring. But this is a configuration that I've taken and adapted from one of Cisco's campus design guides. In the real world, we may not want to do things like this, but I simply want to show you that you can configure a switch with multiple commands in global configuration. You can create vlans and then apply a configuration on a range of interfaces. Commands such as these are applied to interfaces. These are global configuration commands. This command is part of the IP version six and neighbor discovery policy. This command is a description on an SVI, or switch virtual interface. These commands are applied on vlans. So there's a long list of commands…

Contents