diff options
| author | Hiroki Shirokura <hiroki.shirokura@linecorp.com> | 2021-12-12 11:56:44 +0000 |
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2023-04-18 10:11:53 +0200 |
| commit | cc4926c1284ea7950c12e9fab89c7276e8370fb8 (patch) | |
| tree | 3db14747edb78ed8c195a10607b5932550e5227c /isisd/isis_cli.c | |
| parent | d4f58e0b8497626d2f5ce5ec4a140d19a92bd283 (diff) | |
isisd,yang: add algorithm-prefix-sid configuration tree
Add the ability to configure a Segment-Routing prefix SID for a given
algorithm. For example:
> segment-routing prefix 10.10.10.10/32 algorithm 128 index 100
Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'isisd/isis_cli.c')
| -rw-r--r-- | isisd/isis_cli.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c index ee51e46858..e752103415 100644 --- a/isisd/isis_cli.c +++ b/isisd/isis_cli.c @@ -1769,6 +1769,44 @@ void cli_show_isis_prefix_sid(struct vty *vty, const struct lyd_node *dnode, vty_out(vty, "\n"); } +/* + * XPath: + * /frr-isisd:isis/instance/segment-routing/algorithm-prefix-sids/algorithm-prefix-sid + */ +void cli_show_isis_prefix_sid_algorithm(struct vty *vty, + const struct lyd_node *dnode, + bool show_defaults) +{ + const char *prefix; + const char *lh_behavior; + const char *sid_value_type; + const char *sid_value; + bool n_flag_clear; + uint32_t algorithm; + + prefix = yang_dnode_get_string(dnode, "./prefix"); + sid_value_type = yang_dnode_get_string(dnode, "./sid-value-type"); + sid_value = yang_dnode_get_string(dnode, "./sid-value"); + algorithm = yang_dnode_get_uint32(dnode, "./algo"); + lh_behavior = yang_dnode_get_string(dnode, "./last-hop-behavior"); + n_flag_clear = yang_dnode_get_bool(dnode, "./n-flag-clear"); + + vty_out(vty, " segment-routing prefix %s", prefix); + vty_out(vty, " algorithm %u", algorithm); + if (strmatch(sid_value_type, "absolute")) + vty_out(vty, " absolute"); + else + vty_out(vty, " index"); + vty_out(vty, " %s", sid_value); + + if (strmatch(lh_behavior, "no-php")) + vty_out(vty, " no-php-flag"); + else if (strmatch(lh_behavior, "explicit-null")) + vty_out(vty, " explicit-null"); + if (n_flag_clear) + vty_out(vty, " n-flag-clear"); + vty_out(vty, "\n"); +} /* * XPath: /frr-isisd:isis/instance/fast-reroute/level-{1,2}/lfa/priority-limit |
