Skip to content

Unable to trace cables after import, manual data fixing #223

@andrewimeson

Description

@andrewimeson

Environment

  • Python version: 3.12.11
  • Nautobot version: v2.4.11
  • nautobot-netbox-importer version: v2.2.0

Expected Behavior

Cables to be traceable in the UI

Observed Behavior

Only one side shows up when you click the trace button on an interface.

Steps to Reproduce

  1. Import data
nautobot-server import_netbox \
    --bypass-data-validation \
    --fix-powerfeed-locations \
    --tag-issues \
    --save-text-summary=/tmp/output-$(date +"%Y-%m-%d_%H-%M-%S").txt \
    /tmp/netbox_data.json
  1. Navigate to a device and interface and click "trace" button

Workaround

If I manually add some data to a few of the tables, I can trace cables again.

-- 13 = interface
UPDATE dcim_interface SET _cable_peer_type_id = 13;
UPDATE dcim_interface
SET _cable_peer_id = c.termination_a_id
FROM dcim_cable c
WHERE c.termination_b_id = dcim_interface.id;

UPDATE dcim_interface
SET _cable_peer_id = c.termination_b_id
FROM dcim_cable c
WHERE c.termination_a_id = dcim_interface.id;
UPDATE dcim_cablepath
SET destination_id = c.termination_a_id
FROM dcim_cable c
WHERE c.termination_b_id = dcim_cablepath.origin_id;

UPDATE dcim_cablepath
SET destination_id = c.termination_b_id
FROM dcim_cable c
WHERE c.termination_a_id = dcim_cablepath.origin_id;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions