atlanticwave-sdx / sdx-controller

Central Controller for AtlanticWave SDX.
https://www.atlanticwave-sdx.net
MIT License
1 stars 3 forks source link

Use request connection id when saving to db #258

Closed congwang09 closed 3 months ago

congwang09 commented 3 months ago

Resolves: https://github.com/atlanticwave-sdx/sdx-controller/issues/256

Use connection ID instead of hard coded db key name.

Also if we cannot generate a graph, it should not be 400, because it's not due to bad request. Would 500 make sense?

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 8695242743

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
sdx_controller/handlers/connection_handler.py 0 1 0.0%
sdx_controller/controllers/connection_controller.py 7 10 70.0%
<!-- Total: 7 11 63.64% -->
Totals Coverage Status
Change from base Build 8664224346: 50.9%
Covered Lines: 708
Relevant Lines: 1421

💛 - Coveralls
congwang09 commented 3 months ago

When no 'id' in body, should the newly generated 'id' be also added to the body?

Sure. Added that. Actually id is a required field enforced by swagger, so this probably is not very useful anyway.

YufengXin commented 3 months ago

it's good that you catch it, maybe also adding a log somewhere earlier.

Looks like I can't review it again? @sajith pls review/approve.