Python Forum
How to automate loop test check on Network device - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: How to automate loop test check on Network device (/thread-40890.html)



How to automate loop test check on Network device - jpc230 - Oct-09-2023

Hi All,

I'm an experienced Network Engineer but a beginner in python, I have the basics in python, I know how to write basic script with list, dictionnary, json file, loop etc ...
I'm currently following a training session on UDEMY.
I would like to create a new application under Python which does the following :
Everytime when I install a new switch with 48 ports I ask our technician to run the precabling in an adjacent rack, that way any new connection on the switch is connected on the patch panel.
This is mainly to avoid the technician to mess up the cable on the device side when they add new connection. There is something I have to do before the switch can go under production, I have to validate the precabling to ensure everything is precabled as expected, for that, I ask the technician to put a physical loop on each port of the patch panel and I check if the port on the switch is up. so if port 1 on the patch panel is looped, then port 1 on the device should come up, if not it means the SFP is faulty, or the cable is broken, or there is an error on the cabling. All this is fine to do when it's one switch with 48 ports.
but for a big deployment where we have more than 700 network interfaces to check this is a long long long time for me. So what I would like is to create a script that will check the interface status and send a green light when the port is up and even If I can integrate a voice saying "interface 1/1/1 is up" that would be great. that way the technician can check all 700 ports without me being on the phone to verify on the device.
I imagine something like : a Web GUI where the technician can load an excel file with the network device name and the list of port to test. I'm wondering if Django can help me here.
Also how can I create a representation of the port layout on the Web GUI which shows the device ports, and adding some green light when the port is up, this is helpful because the technician and the device are not in the same room.
the technician can not visually check if the port is up. I don't know where to start, hence any idea is welcomed, Especially on the GUI side especially the interaction between the python script and the Web GUI.


RE: How to automate loop test check on Network device - Larz60+ - Oct-09-2023

Obviously, there will be a lot of events that will need to be handled in your application.

Here's a component that can possibly be used for that small but important part.
At least worth taking a look at.