PythonDeviceManagement
- Reading the SSH Output
Reading the SSH Output – about 20 minutes Our next step is conceptually pretty straightforward, but the details are a bit complicated. We’re using Paramiko to pretend programmatically like we are a hu
- Getting started
Getting started – about 10 minutes We’ll start by writing a little program to that can test out whether we can successfully connect to an SSH host device. This will be a short program but it will lay
- Merging SSH connectivity and database access
Merging SSH connectivity and database access – about 10 minutes We already have some amazingly useful functionality. Now we can start to tie things together. We have the code to connect to an SSH host
- Saving the SSH command results
Saving the SSH command results – about 10 minutes Way back in the beginning we talked about this project being able to save config info locally. And then we talked a bunch about databases, SSH connect
- Moving from low class to high class
Moving from low class to high class – about 15 minutes Our class has done a reasonable job of wrapping up our concept of a host. We can make some improvements to the class that make it a little easier
- Base class
Base class – 30-40 minutes This can be a confusing topic if you don’t already have experience with object-oriented programming. It takes some reading, some thinking, maybe some re-reading, and the con
- Speaking more languages
Speaking more languages – 15 minutes Since we have refactored some code into a base class and have now implemented the SSH class, we’re ready to add a new protocol. Let’s get this bad boy talking over
- Speaking telnet better
Speaking telnet better – 10 minutes In our last iteration of the program we introduced the TelnetHost class. However, the class didn’t really fully implement Telnet communications. It just executed a
- Refactoring
Refactoring – 5 minutes When we consider what’s going on in these classes there are some subtle improvements we can make. For example, our TelnetHost and our SSHHost classes each have their own send_c
- Efficiency
Efficiency – 5 minutes There’s no need to recreate the database every time we run our program. So let’s check whether the database exists and only create a database if it doesn’t exists. We can start
- Adding a little class to our project
Adding a little class to our project – about 30 minutes We actually have a pretty useful little utility at this point. It can keep a list of devices, connect to all of those devices, and save the outp
- Adding a little database
Adding a little database – about 15 minutes We want to be able to have our application back up information from the host devices on our network. Devices, plural. And I think that if I had to list out
- Setting Up Your Environment
Setting Up Your Environment – about 20 minutes Python Itself We’ll presume you’re using a civilized operating system and that you already have Python installed. If you’re not in this situation then yo
- Using Python to Automate Network Administration Task
Using Python to Automate Network Administration Task So I rolled into work, grabbed my second cup of coffee for the day and sat down at my desk. I had to make some network config changes, but I had pu
