-
Notifications
You must be signed in to change notification settings - Fork 3
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
Handle connection deletions in PCE #225
Merged
Merged
Conversation
This file contains 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
Pull Request Test Coverage Report for Build 8756575986Details
💛 - Coveralls |
sajith
force-pushed
the
224.delete-connection
branch
from
February 7, 2024 21:51
7426981
to
6ad7aa3
Compare
Message queue is needed when publishing breakdowns -- we do not mock this stuff.
We probably should use MQ_PORT; will revisit this later.
Since we pass on connection_id to DELETE and GET, not request_id
congwang09
reviewed
Apr 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Sajith!
They should be strings or perhaps UUIDs
Datamodel spec does not specify connection ID format; datamodel schema simply says it has to be a string; and the test requests so far have not used UUIDs
When placing a connection, the client MUST provide a connection ID in the request body. Requests without an ID will be rejected even before we get to the controller method, so there's no point in it generating an ID.
sajith
changed the title
Handle connection deletions
Handle connection deletions in PCE
Apr 19, 2024
congwang09
approved these changes
Apr 19, 2024
Seems that connexion simply ignores `format: uuid`, but hopefully this will act as a documentation hint.
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.
Resolves #224, but only somewhat (deletions are propagated to only PCE, not down to local controllers). I hope we can consider this an initial sketch.
These are the changes:
POST /connection
handler now generates a UUID for connection requests, and returns a response of this form:Note that this response is not consistent with the API definition (and it wasn't consistent before too). Issue filed: #251.
Consequently,
GET /connection/:connection_id
andDELETE /connection/:connection_id
accepts strings in UUID format. This doesn't seem to matter for API proper (it still can accept integers), but Swagger UI rejects connection IDs that are not UUIDs. There's an issue (SDX delete connection should accept both integer and connection GUID #234) that @congwang09 filed related to this; if we also want integer connection IDs let us resolve it separately there.Tests has been expanded to exercise connection requests when topologies are fully set up and nothing is set up at all. Ideally we should return 404 when a connection ID is not found, but we do not do that yet. This is something to be addressed in a follow-up, probably when addressing Test
GET /connection
more #252.Per discussion on Use request connection id when saving to db #258, since clients are expected to supply connection ID, and since requests without an ID will be rejected by connexion, dropped UUID generation.
This is stacked on top of #209 (because we need a handle toTEManager
instance), which is in draft state right now. I will update this PR when #209 gets merged.