-
Notifications
You must be signed in to change notification settings - Fork 756
net/frr: Add BGP remove-private-AS to neighbors #5090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Monviech
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I can see the issue with this. I think we can simplify it. Nice effort :)
| {% if 'asoverride' in neighbor and neighbor.asoverride == '1' %} | ||
| neighbor {{ neighbor.address }} as-override | ||
| {% endif %} | ||
| {% if 'removeprivateas' in neighbor and neighbor.removeprivateas == '1' %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% if 'removeprivateas' in neighbor and neighbor.removeprivateas %}
neighbor {{ neighbor.address }} {{ neighbor.removeprivateas }}
{% endif %}
We could replace all of the conditions with these three lines and construct all of neighbor.removeprivateas in the model since there arent too many combinations possible here. This could get rid off the checkbox in favor of only an option field.
| </connecttimer> | ||
| <defaultoriginate type="BooleanField"/> | ||
| <asoverride type="BooleanField"/> | ||
| <removeprivateas type="BooleanField"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the booleanfield and create just the option field with that name.
plugins/net/frr/src/opnsense/mvc/app/models/OPNsense/Quagga/BGP.xml
Lines 40 to 50 in 420efa0
| <bestpath type="OptionField"> | |
| <OptionValues> | |
| <as_path_confed value="as-path confed">as-path confed</as_path_confed> | |
| <as_path_multipath_relax value="as-path multipath-relax">as-path multipath-relax</as_path_multipath_relax> | |
| <compare_routerid value="compare-routerid">compare-routerid</compare_routerid> | |
| <peer_type_multipath_relax value="peer-type multipath-relax">peer-type multipath-relax</peer_type_multipath_relax> | |
| <aigp>aigp</aigp> | |
| <med_missing_as_worst value="med missing-as-worst">med missing-as-worst</med_missing_as_worst> | |
| </OptionValues> | |
| <Multiple>Y</Multiple> | |
| </bestpath> |
If you put all combinations into value its really easy. Without multiple, users can only select one of these combinations.
The value will then be inside {{ neighbor.removeprivateas }}.
| </grid_view> | ||
| </field> | ||
| <field> | ||
| <id>neighbor.removeprivateas</id> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove one of these, we can do this with only one new field.
Thanks for the feedback and the bit of direction on how best to represent the option combinations. I'll modify as needed to present the combinations in a single option field. |
No description provided.