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

JSON import of circuit with terminations fails without error #12402

Closed
candlerb opened this issue Apr 30, 2023 · 4 comments
Closed

JSON import of circuit with terminations fails without error #12402

candlerb opened this issue Apr 30, 2023 · 4 comments
Assignees
Labels
pending closure Requires immediate attention to avoid being closed for inactivity severity: medium Results in substantial degraded or broken functionality for specfic workflows type: bug A confirmed report of unexpected behavior in the application

Comments

@candlerb
Copy link
Contributor

candlerb commented Apr 30, 2023

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.

@candlerb candlerb added the type: bug A confirmed report of unexpected behavior in the application label Apr 30, 2023
@candlerb candlerb changed the title JSON import of circuits fails without error JSON import of circuit with terminations fails without error Apr 30, 2023
@candlerb
Copy link
Contributor Author

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
Copy link
Contributor Author

candlerb commented 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.

@kkthxbye-code kkthxbye-code added the status: accepted This issue has been accepted for implementation label May 1, 2023
@kkthxbye-code kkthxbye-code self-assigned this May 1, 2023
@jeremystretch jeremystretch added the severity: medium Results in substantial degraded or broken functionality for specfic workflows label Jun 23, 2023
@jeremystretch jeremystretch removed their assignment Dec 27, 2023
@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: accepted This issue has been accepted for implementation labels Dec 27, 2023
Copy link
Contributor

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 github-actions bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Mar 27, 2024
@arthanson arthanson self-assigned this Apr 17, 2024
@arthanson arthanson removed the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Apr 17, 2024
@arthanson
Copy link
Collaborator

@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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pending closure Requires immediate attention to avoid being closed for inactivity severity: medium Results in substantial degraded or broken functionality for specfic workflows type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
4 participants