atlanticwave-sdx / datamodel

Parsing and validation library for AtlanticWave SDX.
https://www.atlanticwave-sdx.net
MIT License
0 stars 1 forks source link

Fix inconsistencies on example topologies and add backward compatibility to Port.vlan_range #141

Closed italovalcy closed 1 month ago

italovalcy commented 1 month ago

Related to https://github.com/atlanticwave-sdx/pce/issues/200

Description of the change

This pull request fix a few inconsistencies on the example topologies (amlight.json, sax.json and sdx.json). Most of the inconsistencies consist of:

Because of those errors, the breakdowns failed to be computed, as well as VLAN reservations and other cases.

Additionally, I've also added backward compatibility for Port.vlan_range on Topology v1: if the vlan_range is not defined on the port but label_range is, PortHandler will leverage the former.

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 10331104302

Details


Totals Coverage Status
Change from base Build 10324380079: 0.03%
Covered Lines: 1349
Relevant Lines: 1656

💛 - Coveralls
sajith commented 1 month ago

@italovalcy Actually, on second thoughts, there are some *_v2.json files under src/sdx_datamodel/data/topologies: ampath_v2.json, sax_v2.json, and zaoxi_v2.json. Going forward, I believe those are the ones that we should be using, because they are the ones that are supposed to conform to datamodel v2 spec. Would you be able to check those for inconsistencies? I tried using them in pce tests but could not make much progress. Perhaps you will have better ideas.

I am also unsure if we should keep the old topology files around. They are likely to cause confusion.

italovalcy commented 1 month ago

@italovalcy Actually, on second thoughts, there are some *_v2.json files under src/sdx_datamodel/data/topologies: ampath_v2.json, sax_v2.json, and zaoxi_v2.json. Going forward, I believe those are the ones that we should be using, because they are the ones that are supposed to conform to datamodel v2 spec. Would you be able to check those for inconsistencies? I tried using them in pce tests but could not make much progress. Perhaps you will have better ideas.

I am also unsure if we should keep the old topology files around. They are likely to cause confusion.

Good point, @sajith ! I've opened issue https://github.com/atlanticwave-sdx/datamodel/issues/142 for us to handle that. Thanks for your review!