Replies: 4 comments 2 replies
-
#4881 is open and just waiting for a volunteer. |
Beta Was this translation helpful? Give feedback.
-
In the end I solved this via CSV export and import, although some work is required because the formats are very different (#5952). I made a new export template (which also turned up issue #7813):
Then a manual search-replace to change the endpoint device name and the port number format; delete the old cables; import the new cables. |
Beta Was this translation helpful? Give feedback.
-
I am shortly about to have to move another whole bunch of cables from one device to another. I am considering writing a custom script for this. But my question from before was unanswered:
That is, is there any defined way in Python code to change a single cable endpoint, or would this leave the database in an inconsistent state? The model is too complex for me to understand all the potential knock-on effects. |
Beta Was this translation helpful? Give feedback.
-
I see all open issues were closed by the bot, so cannot comment there. Would it be easier and possible to:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've just installed a new switch and moved about 2 dozen cables from the old one to the new one. This time, I really want to avoid the tedium of deleting cables and individually creating new ones, where everything is identical to the old one apart from one endpoint.
I am wondering: if I use nbshell or a custom script to change termination_a or termination_b and save back to the database, will this trigger all the necessary dependent changes? Specifically I'm thinking of the CablePath, and the various columns on the dcim_interface table from CableTerminatino and PathEndpoint (
cable_id
,_cable_peer_id
,_cable_peer_type_id
,_path_id
)Or would running
manage.py trace_paths [--force]
fix all these? From the code I expect that it would fix CablePath but I'm not sure about the attributes on Interface.Beta Was this translation helpful? Give feedback.
All reactions