You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation for ip-extended-access-lists, specifically the source_ports_match and destination_ports_match fields should mention the dependency on source_ports and destination ports field respectively.
Which component of AVD is impacted
eos_cli_config_gen
Use case example
In my use case I am generating these input variable schema from my model data. I then supply the input schema to pyavd utility that helps me generate eos cli.
While I was implementing the mapping from my data to these structured configs I was providing all the fields that i had in my data model, eg: sequence number, action, protocol, source, destination and so forth. In this I was also providing source_ports/destination ports which were sometimes empty lists. But because I included the "source_ports" key and a respective empty value, avd while generating eos config added the source_ports_match with a default value of "eq" which is incorrect cause that results to a config like
80 permit udp any eq
where eq is followed by no source ports.
I then corrected my logic to add "source_ports" key only when source ports exist so that source_ports_match does not get added by default.
Describe the solution you would like
The documentation could explicitly mention that source_ports_match key gets added with a default value when source_ports key is found, and if you do not want that then do not add the source_ports key itself when source_ports are empty (cause technically adding empty source ports is not incorrect so users could do that and run into this issue).
Alternatively in the logic over here where avd adds the source_port_match by default when source_port key is found, change it to add the source_port_match when actual non none value of source port is found (instead of just depending on presence/absence of source port key).
Describe alternatives you have considered
No response
Additional context
No response
Contributing Guide
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
yep agreed, just being cautious and mentioning again that this does not mean making it a required argument but instead just that if the field is set it should be non empty.
Enhancement summary
The documentation for ip-extended-access-lists, specifically the source_ports_match and destination_ports_match fields should mention the dependency on source_ports and destination ports field respectively.
Which component of AVD is impacted
eos_cli_config_gen
Use case example
In my use case I am generating these input variable schema from my model data. I then supply the input schema to pyavd utility that helps me generate eos cli.
While I was implementing the mapping from my data to these structured configs I was providing all the fields that i had in my data model, eg: sequence number, action, protocol, source, destination and so forth. In this I was also providing source_ports/destination ports which were sometimes empty lists. But because I included the "source_ports" key and a respective empty value, avd while generating eos config added the source_ports_match with a default value of "eq" which is incorrect cause that results to a config like
80 permit udp any eq
where eq is followed by no source ports.
I then corrected my logic to add "source_ports" key only when source ports exist so that source_ports_match does not get added by default.
Describe the solution you would like
The documentation could explicitly mention that source_ports_match key gets added with a default value when source_ports key is found, and if you do not want that then do not add the source_ports key itself when source_ports are empty (cause technically adding empty source ports is not incorrect so users could do that and run into this issue).
Alternatively in the logic over here where avd adds the source_port_match by default when source_port key is found, change it to add the source_port_match when actual non none value of source port is found (instead of just depending on presence/absence of source port key).
Describe alternatives you have considered
No response
Additional context
No response
Contributing Guide
The text was updated successfully, but these errors were encountered: