atlanticwave-sdx / datamodel

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

Link that has a port with no label range #108

Open sajith opened 1 year ago

sajith commented 1 year ago

Of the three main static topology files, there's a link that has one port that has no label_range:

https://github.com/atlanticwave-sdx/datamodel/blob/1a6404a653510341e41218bb2f663aa2f16a9749/src/sdx_datamodel/data/topologies/zaoxi.json#L16-L21

I think this is the only such one. Should this be treated like an error? If so, I believe schema should be updated accordingly, and error handling should be updated accordingly.

YufengXin commented 1 year ago

This may be a (intentional or unintentional) mistake.(1) It may be interpreted as 'all vlans' are available'; or (2) an error. Otherwise, it would prevent your code find a vlan assignment along a path, right?

sajith commented 1 year ago

Yes, this makes VLAN assignment a little more tricky. I am leaning towards treating this as an error, unless we have a reason to interpret it otherwise.

YufengXin commented 1 year ago

Sure. Then please add a vlan range to this port so your code can work. Later, in practice, let's see how the real topology from OXPs would show up.

sajith commented 1 year ago

After thinking about this a little more, I think not adding a label_range here makes sense, at least for now. Because of this particular missing label_range, an error case was surfaced in pce, and by handling that we're able to make pce a little more robust (I hope!). We can't assume perfectly well-formed topology data, at least until we have stricter validation in place.