Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'CircuitTermination' object has no attribute 'provider_network' #593

Open
NordloSydost-Pajje opened this issue Jan 10, 2025 · 5 comments
Open
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@NordloSydost-Pajje
Copy link

NetBox version

4.2.1

Topology Views version

4.2.0

Steps to Reproduce

Display topology

Expected Behavior

Topology to be displayed.

Observed Behavior

<class 'AttributeError'>

'CircuitTermination' object has no attribute 'provider_network'

Python version: 3.10.12
NetBox version: 4.2.1
Plugins:
netbox_ipcalculator: 1.4.9
netbox_lists: 4.0.1
netbox_topology_views: 4.2.0

@NordloSydost-Pajje NordloSydost-Pajje added the type: bug A confirmed report of unexpected behavior in the application label Jan 10, 2025
@ibuclaw
Copy link
Contributor

ibuclaw commented Jan 10, 2025

Workaround is to untick "Show Circuit Terminations" for now.

@mattieserver
Copy link
Collaborator

How does your circuit look like? Both terminations on an interface?

@ibuclaw
Copy link
Contributor

ibuclaw commented Jan 10, 2025

The Z side is a provider network.

To circle back round to this comment #590 (comment)

elif circuit_termination.provider_network is not None:
if (
circuit_termination.provider_network_id
not in nodes_provider_networks
):
nodes_provider_networks[
circuit_termination.provider_network.pk
] = circuit_termination.provider_network

I think this should instead be:

 elif circuit_termination._provider_network is not None: 
     if ( 
         circuit_termination._provider_network_id 
         not in nodes_provider_networks 
     ): 
         nodes_provider_networks[ 
             circuit_termination._provider_network.pk 
         ] = circuit_termination._provider_network 

Saying that, I don't see nodes_provider_networks being referenced anywhere else, is this a half implemented feature (#454)?

@MFisherIT
Copy link

After upgrading Netbox from 4.0.9 to 4.2.1 and Topology Views from 4.0.9 to 4.2.0
I am having the same error. I may have had the same error after the Netbox upgrade, but before updating Topology Views.

<class 'AttributeError'>
'CircuitTermination' object has no attribute 'provider_network'
Python version: 3.12.8
NetBox version: 4.2.1
Plugins:
netbox_topology_views: 4.2.0

The same workaround @ibuclaw mentioned works for me.
No, only Z side of the circuit is terminated on an interface.

Circuit: "63.VLXP.931492..CBCL"
Termination side: A
Termination type: Circuits > Provider Network
Provider Network: "Internet"
Marked connected: False

Termination side: Z
Termination type: DCIM > Location
Provider Network: "Main Office"
Marked connected: False
Port speed: 80000
Upstream speed: 80000

Connection:

A side
Device: "MEN_deviceName_"
Interface: eth0

B Side
type: Circuit Termination
Circuit "63.VLXP.931492..CBCL"
Side: "63.VLXP.931492..CBCL: Termination Z"
Status: Connected

Below is a cable trace related to the Circuit.
image

NetBox release NetBox Community v4.2.1 (2025-01-08)
Python version 3.12.8
Django version 5.1.4
PostgreSQL version PostgreSQL 13.18 on x86_64-redhat-linux-gnu, compiled by gcc
Database name netbox
Database size 30 MB
RQ workers 1 (default queue)
System time 2025-01-11 03:28:33 UTC

@MFisherIT
Copy link

Also and issue with all other termination types.
There is an error is the termination is not connected and the location, site, region is not empty.
There is no error is the termination is not connected and the location, site, region is are empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

4 participants