I'm writing a script that can help me documenting our network rooms.
The idea behind that script is that a room is a list, that contains several lists for the racks. The rack lists contain lists called module with the servers/switches/etc. in the module list are the actual ports with the cable numbers.
For example:
[04/02, [MM02, [1, #1992, 2, #1993, 3, #1567 ....], MM03, [1, #1234 .....]], 04/03, [MM01, .........]]]
04/02
= First Rack
MM02
= First module in that rack
1
= Port number
#1992
= Cable number
I hope you get the idea.
The script I wrote compares the cable numbers in the room list, and looks if there are duplicates. Now it gets tricky: It should then replace the cable number with the rack and module of the other port. That should be pretty easy, because module and rack are the first elements of those lists that contain the port, but I don't know how to get access to the information. (I'm a noob in programming)