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

Unable to Create Circuit Terminations with interface via API #2528

Closed
ohthateverest opened this issue Oct 18, 2018 · 1 comment
Closed

Unable to Create Circuit Terminations with interface via API #2528

ohthateverest opened this issue Oct 18, 2018 · 1 comment
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@ohthateverest
Copy link

ohthateverest commented Oct 18, 2018

Issue type

[ ] Feature request
[X] Bug report
[ ] Documentation

Environment

  • Python version: 3.6.3
  • NetBox version: 2.4.4

Steps to Reproduce

Create new circuit termination via the api (/api/circuits/circuit-terminations/) using the following POST Body:

{   "circuit" : 28,
    "term_side": "A",
    "interface": 161,
    "site" : 11,
    "port_speed" : "1000"
}

Also attempted it with a dictionary for the interface after getting the first error using the following body:

{   "circuit" : 28,
    "term_side": "A",
    "interface": {
        "id": 161,
        "device": 91,
        "name": "irb.884"
    },
    "site" : 11,
    "port_speed" : "1000"
}

Expected Behavior

Prior to 2.4 (2.3.6 specifically) the following POST Body would create an A side termination and return the ID and relevant information in the response body.

Observed Behavior

The API returns the following reponse:

{
    "interface": {
        "non_field_errors": [
            "Invalid data. Expected a dictionary, but got int."
        ]
    }
}

Trying the Second the body with the interface dictionary returns the following response.

{
    "interface": {
        "non_field_errors": [
            "The fields device, name must make a unique set."
        ]
    }
}

I can create the termination without the interface just fine and can create it via the Web UI without an issue either, I have looked at the DCIM.Interfaces Serializer and Models but my level of understanding in Django is not as deep as I would like to be able to identify what is causing this.

@ohthateverest ohthateverest changed the title Unable Creating Circuit Terminations with interface via API Unable to Create Circuit Terminations with interface via API Oct 24, 2018
@ohthateverest
Copy link
Author

I applied the patch from PR #2539 and verified its working fine now. Ive applied it to our dev environment for now but will more than likely apply it to prod manually until the PR is merged.

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation labels Nov 5, 2018
jeremystretch added a commit that referenced this issue Nov 5, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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

Successfully merging a pull request may close this issue.

2 participants