-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I wrote a Custom Script a while back which lets you connect cables in bulk: However it creates a single cable for each port connection; it doesn't create half the number of cables with 2 terminations on each. If you need to do it that way, you could use this code as a starting point. Another option would be to prepare a list for CSV import, but importing a cable with multiple terminations also looks to be tricky / undocumented, and I couldn't work out how to do it. You should be able to do it via the REST API though: see #12830 and #13280. Finally, if all your patch panels are just linked back to back, an alternative approach is to use a multi-position rear port in your device type:
Then you just need to create a single cable between the rear ports of two patch panels, job done. Note that this isn't entirely accurate, even if you have a single MPO-MPO cable it may have crossed pairs (1-2 to 2-1, 3-4 to 4-3 etc). Since Netbox doesn't distinguish between TX and RX legs on a cable, and doesn't even model separate TX/RX legs on an interface, this is unlikely to be a major problem. |
Beta Was this translation helpful? Give feedback.
-
hi @candlerb thanks a lot for your answer, in fact my use case is the easiest one of the ones you wrote, because all the cables are 1 to 1
Thanks a lot |
Beta Was this translation helpful? Give feedback.
I wrote a Custom Script a while back which lets you connect cables in bulk:
https://github.com/netbox-community/customizations/blob/master/scripts/multi_connect.py
However it creates a single cable for each port connection; it doesn't create half the number of cables with 2 terminations on each. If you need to do it that way, you could use this code as a starting point.
Another option would be to prepare a list for CSV import, but importing a cable with multiple terminations also looks to be tricky / undocumented, and I couldn't work out how to do it. You should be able to do it via the REST API though: see #12830 and #13280.
Finally, if all your patch panels are just linked back to back,…