Closed YufengXin closed 3 months ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
sdx_controller/models/l2vpn_body.py | 10 | 13 | 76.92% | ||
sdx_controller/models/l2vpn_service_id_body.py | 10 | 13 | 76.92% | ||
sdx_controller/models/connection_v2_notifications.py | 14 | 20 | 70.0% | ||
sdx_controller/controllers/l2vpn_controller.py | 9 | 18 | 50.0% | ||
sdx_controller/models/connection_qos_unit.py | 18 | 27 | 66.67% | ||
sdx_controller/models/connection_scheduling.py | 18 | 27 | 66.67% | ||
sdx_controller/models/connection_v2_endpoints.py | 18 | 27 | 66.67% | ||
sdx_controller/models/connection_v2.py | 107 | 133 | 80.45% | ||
sdx_controller/models/connection_qos_metrics.py | 47 | 77 | 61.04% | ||
<!-- | Total: | 251 | 355 | 70.7% | --> |
Totals | |
---|---|
Change from base Build 10351089160: | 4.4% |
Covered Lines: | 1038 |
Relevant Lines: | 1858 |
there are a few "unused" classes in models: for v2 and other future implementation
there are a few "unused" classes in models: for v2 and other future implementation
It probably might be better to not use the generated models at all? A better way might be to write the models using pydantic in datamodel, and use them in the handlers and tests. That way we will be using Swagger Studio (or other tools) only to design the OpenAPI spec. I wrote up an issue about this: https://github.com/atlanticwave-sdx/datamodel/issues/144.
From my quick testing, I think pydantic might work just fine for us. This might also solve https://github.com/atlanticwave-sdx/datamodel/issues/92 in an elegant way.
Right! I'll learn and do...Thx
I am only weakly proposing this for now, to see if there is anything that I am missing because I have no experience with the current workflow (of generating code and updating it in sdx-controller and elsewhere). I will try writing some code with pydantic and see how well things work, and then propose changes more strongly if my assumptions about how things might work turn out to be true. :-)
We have higher priority things to do for now anyway. So this might be after October or so.
spec v2: