atlanticwave-sdx / sdx-controller

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

use the new tagged pce with the enhanced user port support in breakdown #269

Closed YufengXin closed 2 months ago

YufengXin commented 2 months ago

(This was not a bug as the previous version will always, not sometimes, generate the breakdowns starting and ending with the OXP port, even the request has user port in it. The previous assumption is that user ports, esp. the vlan resource is not managed by sdx-controller.)

This enhancement extended the scope to include the user ports in breakdown.

It comes with unittests to cover this user case that include (1) intra-oxp request and (2) cross-oxp request with mixed (1) user port and (2) OXP port

TBD: Currently the user port is assumed to have the full vlan range and in the vlan assignment procedure, it is given the vlan picked from the corresponding OXP port. This policy can be changed if OXPs want to

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 9103885816

Details


Files with Coverage Reduction New Missed Lines %
sdx_controller/controllers/connection_controller.py 1 87.93%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 9063439419: -0.1%
Covered Lines: 724
Relevant Lines: 1433

💛 - Coveralls
YufengXin commented 2 months ago

@italovalcy and @congwang09 There is one unittest failure: TestConnectionController::test_z100_getconnection_by_id_success

My understanding is that it's not related PCE or datamodel? Please help resolve. I'll run more tests later

sajith commented 2 months ago

The line below should be self.assertStatus(response, 404) (because each test starts with a fresh call to create_app(), and the app gets destroyed at the end of the test -- meaning, the app will have no pre-existing topologies or connection requests):

https://github.com/atlanticwave-sdx/sdx-controller/blob/f2c914af9fe40b14c9c380a6305dce8f828e5d97/sdx_controller/test/test_connection_controller.py#L266

We could add some separate tests for GET /connection/:connection_id that do the necessary setup for successful connection requests.

YufengXin commented 2 months ago

I am going to make this unittest pass to merge this PR. Then create a new issue for this particular unittest.