atlanticwave-sdx / sdx-controller

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

Add end point to list all connections #264

Closed congwang09 closed 2 months ago

congwang09 commented 2 months ago

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

Add end point to list all connections. Also use ["topologies", "connections", "domains", "links"] collections to store different types of data. So we can grab all data from connections collection to get all connections.

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 8987515069

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
sdx_controller/messaging/rpc_queue_consumer.py 3 4 75.0%
sdx_controller/utils/db_utils.py 12 15 80.0%
sdx_controller/controllers/connection_controller.py 3 7 42.86%
sdx_controller/handlers/lc_message_handler.py 0 5 0.0%
<!-- Total: 19 32 59.38% -->
Files with Coverage Reduction New Missed Lines %
sdx_controller/handlers/lc_message_handler.py 1 22.22%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 8879267390: 0.07%
Covered Lines: 714
Relevant Lines: 1429

💛 - Coveralls
congwang09 commented 2 months ago

looks fine except for one thing: the return of the /connections Get

The function returns a list of connections, (1) would this list be serialized correctly in response? (2) in swagger.yaml, the schema is specified to use the '#/components/schemas/connection', which is a single connection object.

Maybe it is ok, just check what the test shows.

Yes, that's a great find. the return should be a list of connections. Updated.