Closed sajith closed 4 months ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
sdx_controller/controllers/connection_controller.py | 9 | 12 | 75.0% | ||
<!-- | Total: | 9 | 12 | 75.0% | --> |
Totals | |
---|---|
Change from base Build 8743534762: | 0.03% |
Covered Lines: | 708 |
Relevant Lines: | 1420 |
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 (#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 #252.
Per discussion on #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.