Skip to content

Posted circuit terminations not appearing in circuit detail view  #7643

@ghost

Description

NetBox version

v3.0.8

Python version

3.9

Steps to Reproduce

Start fresh netbox instance.
Populate netbox db with testdata: (create all attrbutes with only the required fields.)

  • Create a Provider
  • Create a Site
  • Create a Circuit Type
  • Create a Circuit (with the provider and circuit type just created)
  • Create a Provider Network
  • Create a token from the admin dashboard. (I put this in .env file under variable NETBOX_TOKEN)

Since this is a fresh NetBox instance all ids should start on id: int = 1.

By using requests we post termination Z & A to the newly created circuit:

from decouple import config
import requests
import json


headers = {
    'Authorization': f'Token {config("NETBOX_TOKEN")}',
    'Content-Type': 'application/json',
    "Accept": "application/json; indent=4"
}

data = [
{'circuit': 1, 'site': 1, 'term_side': 'A'}, 
{'circuit': 1, 'provider_network': 1, 'term_side': 'Z'}
]

response = requests.post(
  f'{netbox_env}/api/circuits/circuit-terminations/', 
  headers=headers,
  data=json.dumps(data)
  )
# output is indeed a 201 response.

Expected Behavior

Both circuit termination points (A & Z) to be linked to the circuit with id: 1, and appearing in the circuit view under: /circuits/circuits/1/.

Observed Behavior

Both circuit terminations are indeed in the /api/circuits/circuit-terminations/ endpoint. However, if we go to: /circuits/circuits/1/, only the termination Z side appears. Picture to illustrate:
image

If I also visit the terminal checking this specific circuit instance (id:1) I found that there is no termination_a_side. ref: (terminal screen shot)
image

Finally, the posted data is tested being posted as singles. This also works fine.

Thank you for taking the time to read this!

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions