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

'ProviderNetwork' object has no attribute 'device' #350

Closed
SimonFischer04 opened this issue Jul 11, 2023 · 4 comments
Closed

'ProviderNetwork' object has no attribute 'device' #350

SimonFischer04 opened this issue Jul 11, 2023 · 4 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@SimonFischer04
Copy link

NetBox version

v3.5.6

Topology Views version

v3.6.1

Steps to Reproduce

  1. create a circuit including termination (z side in my case) to provider network
  2. open the "Topology" view

Expected Behavior

Topology to be displayed.

Observed Behavior

<class 'AttributeError'>

'ProviderNetwork' object has no attribute 'device'

Python version: 3.10.6
NetBox version: 3.5.6
@SimonFischer04 SimonFischer04 added the type: bug A confirmed report of unexpected behavior in the application label Jul 11, 2023
@SimonFischer04
Copy link
Author

Seems to be related to: #294 as this was also the issue for me before updating to v3.6

@dreng dreng added the status: revisions needed This issue requires additional information to be actionable label Jul 11, 2023
@dreng
Copy link
Collaborator

dreng commented Jul 11, 2023

Please provide the exact steps to reproduce and your exact settings for the topology view as I am not able to reproduce this.

@SimonFischer04
Copy link
Author

narrowed it down to:
Settings (only this two enabled still results in the issue):

  • "Show Logical Connections" AND
  • "Show Neighbors"
    if I disable either one the issue is resolved.

The circuit I have:
Screenshot_20230711_184938
Screenshot_20230711_185133
Screenshot_20230711_185217

@mattieserver mattieserver self-assigned this Jul 11, 2023
@mattieserver mattieserver added status: accepted This issue has been accepted for implementation and removed status: revisions needed This issue requires additional information to be actionable labels Jul 11, 2023
@dreng
Copy link
Collaborator

dreng commented Jul 20, 2023

The problem lies in views.py, line 355. A device.id is expected, which is true for e.g. Interfaces but not for ProviderNetworks.

device_ids.append(connected_endpoint.device.id)

We need to check if connected_endpoint is of a supported class type.

@dreng dreng self-assigned this Sep 28, 2023
@dreng dreng closed this as completed Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants