Repository navigation
Limits the number of network interfaces per instance - #816
Merged
Merged
Conversation
Collaborator
Author
|
This will address #810 when merged. This adds a subquery to the interface-creation query that assigns the lowest available slot, or fails a table check constraint otherwise. I've added a test that exercises this limit check, but there's another aspect that is actually difficult to test with the current code: testing that we assign the lowest available slot. To do that, I:
I had to resurrect the Create an instance: Add two interfaces: Delete the middle interface: And add one back, seeing that it takes slot 1. |
Collaborator
Author
|
Actually, this might be a more useful view of the table in the final state: |
jmpesp
approved these changes
Mar 28, 2022
- Limits interfaces to 8 inline with RFD 135 - Adds check against this limit in instance create saga - Adds subquery to the interface creation query that checks this limit too. This works by assigning each NIC a slot on the device, and assigns the lowest available slot, up to the limit. - Add test against the total per-instance limit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
too. This works by assigning each NIC a slot on the device, and
assigns the lowest available slot, up to the limit.