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

api/dcim/interface-connections allows duplicate connections via opposing directionality #1313

Closed
lampwins opened this issue Jul 3, 2017 · 1 comment
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@lampwins
Copy link
Contributor

lampwins commented Jul 3, 2017

Issue type: bug report

Python version: 2.7
NetBox version: 2.0.7

Given two interfaces, create two connections by reversing interface_a and interface_b. The api allows this, thus creating the same connection twice but in different directions. I would expect the second request to fail saying one or both of these interfaces is already connected.

curl -X POST  -d '{ \ 
   "interface_b": "1970", \ 
   "interface_a": "1945" \ 
 }' 'http://netbox-dev.nw.cougars.int/api/dcim/interface-connections/'
curl -X POST -d '{ \ 
   "interface_b": "1945", \ 
   "interface_a": "1970" \ 
 }' 'http://netbox-dev.nw.cougars.int/api/dcim/interface-connections/'

screen shot 2017-07-03 at 1 00 12 pm

@jeremystretch
Copy link
Member

This stems from the same root issue as #1285 (lack of model validation via the API). I'm going to close this issue to concentrate any discussion on the matter there.

@jeremystretch jeremystretch added the type: bug A confirmed report of unexpected behavior in the application label Jul 6, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants