JSON import of circuit with terminations fails without error #7968

Closed
opened 2025-12-29 20:30:35 +01:00 by adam · 4 comments
Owner

Originally created by @candlerb on GitHub (Apr 30, 2023).

Originally assigned to: @arthanson on GitHub.

NetBox version

v3.4.10

Python version

3.8

Steps to Reproduce

  1. Create circuit type and provider (I am using "Internet" and "Cerberus" in the example below)
  2. Go to Circuits > Import
  3. Paste in the following:
[
    {
        "cid": "ID-TEST",
        "commit_rate": 200000,
        "description": "Testing Import",
        "provider": "Cerberus",
        "status": "decommissioned",
        "terminations": [
            {
                "site": {
                    "name": "Test"
                }
            }
        ],
        "type": "Internet"
    }
]

Expected Behavior

Either the import to complete successfully, or an error message to be displayed.

Observed Behavior

Netbox returns to the import page, without showing any error, and without completing the import.

Aside 1: if I give a provider name or circuit type that doesn't exist, this is correctly reported as an error.

Aside 2: I can find no documented example of the correct format for this, so I'm just going by guesswork - but if my guess is wrong, I think Netbox should at least say what's wrong.

Related issues: #11469, #11204, #815.

Originally created by @candlerb on GitHub (Apr 30, 2023). Originally assigned to: @arthanson on GitHub. ### NetBox version v3.4.10 ### Python version 3.8 ### Steps to Reproduce 1. Create circuit type and provider (I am using "Internet" and "Cerberus" in the example below) 2. Go to Circuits > Import 3. Paste in the following: ``` [ { "cid": "ID-TEST", "commit_rate": 200000, "description": "Testing Import", "provider": "Cerberus", "status": "decommissioned", "terminations": [ { "site": { "name": "Test" } } ], "type": "Internet" } ] ``` ### Expected Behavior *Either* the import to complete successfully, *or* an error message to be displayed. ### Observed Behavior Netbox returns to the import page, without showing any error, and without completing the import. Aside 1: if I give a provider name or circuit type that doesn't exist, this *is* correctly reported as an error. Aside 2: I can find no documented example of the correct format for this, so I'm just going by guesswork - but if my guess is wrong, I think Netbox should at least say what's wrong. Related issues: #11469, #11204, #815.
adam added the type: bugpending closureseverity: medium labels 2025-12-29 20:30:35 +01:00
adam closed this issue 2025-12-29 20:30:35 +01:00
Author
Owner

@candlerb commented on GitHub (Apr 30, 2023):

If I set `"terminations": []" or omit the 'terminations' member entirely, then import succeeds. So this does appear to be something to do with processing the terminations.

@candlerb commented on GitHub (Apr 30, 2023): If I set `"terminations": []" or omit the 'terminations' member entirely, then import succeeds. So this does appear to be something to do with processing the terminations.
Author
Owner

@candlerb commented on GitHub (Apr 30, 2023):

I was able to find a structure which works:

[

{
"cid": "ID-TEST",
"provider": "Cerberus",
"type": "Internet",
"commit_rate": 200000,
"status":"decommissioned",
"description": "Testing Import",
"terminations": [{
"site": "Test",
"term_side": "A"
}]
}

]

Although the import confirmation screen shows no side A or side Z:

image

... in fact the circuit and termination were created correctly (so this is mainly a cosmetic issue - raised as #12409).

The main issue still stands though: if I change the import so the termination is invalid, for example by changing the "site" to a non-existent name, there is no error feedback.

@candlerb commented on GitHub (Apr 30, 2023): I was able to find a structure which works: ``` [ { "cid": "ID-TEST", "provider": "Cerberus", "type": "Internet", "commit_rate": 200000, "status":"decommissioned", "description": "Testing Import", "terminations": [{ "site": "Test", "term_side": "A" }] } ] ``` Although the import confirmation screen shows no side A or side Z: ![image](https://user-images.githubusercontent.com/44789/235372302-49833adc-501a-4699-bc92-cdcdc948ab56.png) ... in fact the circuit *and* termination were created correctly (so this is mainly a cosmetic issue - raised as #12409). The main issue still stands though: if I change the import so the termination is invalid, for example by changing the "site" to a non-existent name, there is no error feedback.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 27, 2024):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Mar 27, 2024): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@arthanson commented on GitHub (Apr 17, 2024):

@candlerb This looks like it has been fixed, I tried with NetBox v3.7 and it correctly throws an error popup both about the format and the site not existing. Closing now as it looks fixed, but please let me know if you still have an issue.

@arthanson commented on GitHub (Apr 17, 2024): @candlerb This looks like it has been fixed, I tried with NetBox v3.7 and it correctly throws an error popup both about the format and the site not existing. Closing now as it looks fixed, but please let me know if you still have an issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7968