cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
522
Views
0
Helpful
2
Replies

Cisco show command automatizer CSA

gagat.b
Level 1
Level 1

After 20 years break I created my first  app in python. There is many such as, but this is mine!

App is graphical tool working as below:

Take list of devices, list of commands, user and password, connect to each device via ssh with credentials, execute command, repeat.

I find it really useful when I do lot of shows command  on list of routers/switches, but it can be used to many tasks. Because limitation of paramiko library- configuration mode is not supported, but can be fix in future- if I decided so. I used it mostly to catch BGP tables from routers, if you are interested how big is internet BGP table- so, in Nov 2022, it is  444226 KB  of text, and you need to wait ~45 min to catch it ( I used public access  route server rviews.kanren.net).

Source file in python and .exe for win10 you can download from :

https://github.com/bartoszgagat/CSA/tree/beta1

Because it is my first python app - I think it can be better- some constructive criticism is needed. 

 

 

2 Replies 2

Alexander Stevenson
Cisco Employee
Cisco Employee

Hi @gagat.b,

 

This is a very good script, especially for your first one!

 

I found these were excellent:

- detailed commenting

- variable names match purpose

-function names match purpose

- good exception handling

 

If I had to pick one thing to improve, it would be to eliminate some of the empty lines, for example:

AlexStevenson_0-1669820547401.png

Personally, I don't mind it, but some people want the fewest lines possible (while still maintaining readability). They like to see just one empty line between functions.

 

 

 

 

Hi @Alex . Thank you for review.  I created some apps when I was young ,mostly in C and dialects, so it was funny to try Python and re-enable all  "programmer" cells  in my brain. Good to know this still is working I will definitely remove empty lines.