kytos-ng / mef_eline

Kytos NApp to create and manage point-to-point L2 circuits
https://kytos-ng.github.io/api/mef_eline.html
MIT License
0 stars 8 forks source link

Review TAG instantiation and validation in link_from_dict #242

Open italovalcy opened 1 year ago

italovalcy commented 1 year ago

Hi,

The way TAG is being instantiated and validated in _link_from_dict() seems to be unuseful: https://github.com/kytos-ng/mef_eline/blob/master/main.py#L895-L898

The TAG instantiation won't return False in the kytos core lib. So, we should review how mef_eline is using this.

Ktmi commented 1 year ago

Another thing to note, is that TAG may throw a ValueError if the TAGType is outside of the expected range. This may lead to some unexpected behaviour, but I am uncertain. Additionally, there is no check if the value of the TAG is set to None, which doesn't seem correct either.