netbox-community / netbox-topology-views

A netbox plugin that draws topology views
Apache License 2.0
696 stars 61 forks source link

Pull 462 causes export xml to fail and crashes if circuits are added while showing terminations #463

Closed ManifestFailure closed 3 months ago

ManifestFailure commented 4 months ago

NetBox version

v3.7.2

Topology Views version

github develop

Steps to Reproduce

Install the development version of topology views to the netbox venv then run python3 manage.py migrate netbox_topology_views and python3 manage.py collectstatic --no-input

Download XML issue

Attempt to Download XML on any topology regardless of if any nodes are present

Circuit issue

  1. Create an Organization -> Sites with any details.
  2. Create a dummy Device for the site with at least 1 interface.
  3. Create a Circuits -> Providers entering only a Name and the Slug.
  4. Create a Circuits -> Circuit Type entering only a Name and the Slug.
  5. Create a Circuits -> Circuits selecting the Provider and Circuit Type created above. Set the Circuit ID to any number.
  6. In the Circuit, set Termination A to the Site, then connect it to the Interface for the Device. Termination Z can be left empty.
  7. Attempt to filter the Topology to the site, selecting Show Circuit Terminations.

Expected Behavior

Be able to download the XML topology and view the topology when Show Circuit Terminations is selected

Observed Behavior

When trying to download the XML Topology, it downloads topology.xml that contains the html code for the server error.

image

When attempting to filter Topology with Show Circuit Terminations, the site goes to the below server error page.

image

dreng commented 3 months ago

Fixed in #466 . Thanks for reporting!