netbox icon indicating copy to clipboard operation
netbox copied to clipboard

Cable bulk import when importing circuit terminations

Open Sergii-Lucky opened this issue 1 year ago • 16 comments

Deployment Type

Self-hosted

Triage priority

I volunteer to perform this work (if approved)

NetBox Version

v.4.1.6

Python Version

3.12

Steps to Reproduce

When trying to use the bulk cable import feature to import cables with circuit terminations, I'm getting the error "Record 1 side_a_device: Object not found:397718".

To reproduce: I have an existing device NTT-ODF1 with a port X01. I have an existing circuit, 397718 and I'm trying to connect to Termination A

Import data: side_a_device,side_a_type,side_a_name,side_b_device,side_b_type,side_b_name 397718,circuits.circuittermination,A,NTT-ODF1,dcim.rearport,X01

Expected Behavior

Should be able to import cables connected to circuit terminations.

Observed Behavior

Screenshot 2024-11-07 at 16 50 17 Screenshot 2024-11-07 at 16 46 55 Screenshot 2024-11-07 at 16 46 22

Sergii-Lucky avatar Nov 07 '24 15:11 Sergii-Lucky

I noticed the same today. I have found the culprit and would be willing to submit a fix for it @bctiemann @Sergii-Lucky,

_clean_side is missing the use-case of circuitterminations and this could probably be added easily.

If @Sergii-Lucky would like me to take this issue, just let me know and I'll start working on a fix.

jsenecal avatar Nov 11 '24 19:11 jsenecal

@jsenecal Yes, of course. Let me know if you need additional information or any help from my side.

Sergii-Lucky avatar Nov 11 '24 21:11 Sergii-Lucky

Thanks @jsenecal, I've assigned this to you.

jeremystretch avatar Nov 12 '24 13:11 jeremystretch

While this is being fixed for circuit terminations, I believe there is currently a similar issue for Power Feed type terminations, which should probably also be addressed.

sleepinggenius2 avatar Nov 12 '24 22:11 sleepinggenius2

While this is being fixed for circuit terminations, I believe there is currently a similar issue for Power Feed type terminations, which should probably also be addressed.

This is another issue with a similar fix. Can you link the issue so I can submit a different PR @sleepinggenius2 ?

jsenecal avatar Nov 13 '24 14:11 jsenecal

I'm not aware of a Github issue opened for that at this time. Can it be included as part of this one or should I open a new one and link it here?

sleepinggenius2 avatar Nov 13 '24 15:11 sleepinggenius2

I'm not aware of a Github issue opened for that at this time. Can it be included as part of this one or should I open a new one and link it here?

Please open a new one. I am not sure if it's necessary to link it here.

Sergii-Lucky avatar Nov 13 '24 17:11 Sergii-Lucky

I have opened #18008 for the power feed use case.

sleepinggenius2 avatar Nov 13 '24 17:11 sleepinggenius2

@jeremystretch, not sure if you noticed but I submitted a PR for this bug

jsenecal avatar Nov 22 '24 03:11 jsenecal

Waht would be the best way to progress this?

pobk avatar Jun 20 '25 16:06 pobk

This was discussed in my original attempt to fix this @pobk, please go ahead and read through https://github.com/netbox-community/netbox/pull/17995

jsenecal avatar Jun 23 '25 11:06 jsenecal

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

github-actions[bot] avatar Sep 22 '25 04:09 github-actions[bot]

There is 2 ways this can be achieved I think via circuit termination bulk upload

  • add the ability to point to an interface and a circuit and not just circuit provider, region, sitegroup, site and location via connections Bulk cable upload
  • i think there is a bug here - we have termination type - circuits.circuittermination - but no specific object that relates to the circuit.

jjoves73 avatar Oct 07 '25 14:10 jjoves73

@jjoves73 are you volunteering to own this?

jeremystretch avatar Oct 07 '25 15:10 jeremystretch

I’m sorry but I am not a coder myself. Just a netbox user who just wanting this feature and issue resolved as well. I am more like a user tester. I wish I knew how to code…

jjoves73 avatar Oct 07 '25 17:10 jjoves73

So, I gave it another go in #20843, this would solve #18008 as well

jsenecal avatar Nov 20 '25 08:11 jsenecal