DAN-49 - Route map add match by local-preference#1
Conversation
Signed-off-by: bbs2web <bbs2web@hotmail.com>
|
Thank you for your contribution! We are still finalizing all the logistics around accepting contributions. The process will be documented here. |
Signed-off-by: bbs2web <bbs2web@hotmail.com>
|
Thanks once again for your contribution to DANOS @bbs2web! Unfortunately we can't add these nodes unconditionally to the vyatta-policy-route-v1 module as it is also used in DANOS derivatives which do not use FRR, and therefore may not support these options. There are a couple of ways we can re-work your changes to avoid this issue:
I'm favourable to the approach of using YANG features as this will allow DANOS derivatives to enable the functionality down the line as they are able to, without duplicate YANG modelling. Whatever the chosen approach we can guide you along making the necessary changes to your PRs. @jsouthworth, @JammyStuff, do you have any preference here? Or alternative solutions (YANG deviations perhaps)? cc @dewi-morgan |
|
@deastoe I think you're right, YANG features seems like the way to go to me. We just need to make sure that the feature is specified in a separate package list that can be left disabled in derivatives. |
|
To move this PR towards a state where it can be merged we'll need to make these nodes conditional. Below are the steps for using YANG features to do this:
I would suggest two features eg.
So this would be done on each leaf with the corresponding feature, eg:
These represent features defined by the vyatta-policy-route-v1 module. Next we need to define the package for both features. I'll give the package definition for Packages are defined in Clearly we need to update the package name, its dependency, and description; something like this would work: Now we need to declare what will be contained in our new package. In this case we can do so with a simple .install file. So we create a .install for our package, When the vyatta-route-map-set-source-feature package is installed
For this final step all that's required is to list our two new feature Debian packages in the correct package list. In this case the correct package list is |
| type types:ipv4-address; | ||
| type types:ipv6-address; | ||
| } | ||
| configd:help "Preferred source address"; |
There was a problem hiding this comment.
Please also add a description statement, you can re-use the text eg.
description "Preferred source address";
| } | ||
| leaf local-preference { | ||
| type uint32; | ||
| configd:help "Border Gateway Protocol (BGP) local preference attribute"; |
There was a problem hiding this comment.
Please also add a description statement.
| description "IS-IS level"; | ||
| configd:help "IS-IS level"; | ||
| } | ||
| leaf src { |
There was a problem hiding this comment.
I think source would be better as it is not much longer and is consistent with other nodes in this module (eg. access lists).
| configd:help "IS-IS level"; | ||
| } | ||
| leaf src { | ||
| type union { |
There was a problem hiding this comment.
There is an existing type definition for this in vyatta-types-v1-yang. The advantage of the existing type is that it also ensures values are normalized into a canonical form.
vyatta-types-v1 is already imported, so you can use the type like so:
type types:ip-address;
|
A further point on YANG module changes, for info. We require a new or updated revision statement for pretty much any change made to a module (including those made in this PR). At a minimum a new revision statement must be added to any module changed between DANOS releases as this ensures proper interaction with NMSs (Network Management System). In this case, as we have not yet reached a final process for accepting community contributions, we can take care of adding the necessary revision statements. These requirements will be documented in due course, as this process is defined. |
Signed-off-by: bbs2web bbs2web@hotmail.com