diff options
| author | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2022-12-05 17:06:04 +0100 |
|---|---|---|
| committer | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-08-04 09:29:16 +0200 |
| commit | eb918dbd25cef3d721c59e65917371806e1019d3 (patch) | |
| tree | 5fd0c60044d577259e91e531d3ba43668e6f222f | |
| parent | e2e42102677710ed042ba4e47e4c8a96b5ce79a2 (diff) | |
isisd: Add nb command to show if SRv6 is enabled
Add a northbound command to show whether SRv6 is enabled or not.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
| -rw-r--r-- | isisd/isis_cli.c | 9 | ||||
| -rw-r--r-- | isisd/isis_nb.c | 1 | ||||
| -rw-r--r-- | isisd/isis_nb.h | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c index 6f53ab479f..b455352699 100644 --- a/isisd/isis_cli.c +++ b/isisd/isis_cli.c @@ -2037,6 +2037,15 @@ void cli_show_isis_prefix_sid_algorithm(struct vty *vty, vty_out(vty, "\n"); } +void cli_show_isis_srv6_enabled(struct vty *vty, const struct lyd_node *dnode, + bool show_defaults) +{ + if (!yang_dnode_get_bool(dnode, NULL)) + vty_out(vty, " no"); + + vty_out(vty, " segment-routing srv6\n"); +} + /* * XPath: /frr-isisd:isis/instance/fast-reroute/level-{1,2}/lfa/priority-limit */ diff --git a/isisd/isis_nb.c b/isisd/isis_nb.c index dd0b79b95b..4c42d18eb7 100644 --- a/isisd/isis_nb.c +++ b/isisd/isis_nb.c @@ -864,6 +864,7 @@ const struct frr_yang_module_info frr_isisd_info = { .xpath = "/frr-isisd:isis/instance/segment-routing-srv6/enabled", .cbs = { .modify = isis_instance_segment_routing_srv6_enabled_modify, + .cli_show = cli_show_isis_srv6_enabled, }, }, { diff --git a/isisd/isis_nb.h b/isisd/isis_nb.h index 1cc4a5ddb4..7289677000 100644 --- a/isisd/isis_nb.h +++ b/isisd/isis_nb.h @@ -324,6 +324,8 @@ int isis_instance_flex_algo_affinity_mapping_value_destroy( struct nb_cb_destroy_args *args); int isis_instance_segment_routing_srv6_enabled_modify( struct nb_cb_modify_args *args); +void cli_show_isis_srv6_enabled(struct vty *vty, const struct lyd_node *dnode, + bool show_defaults); int isis_instance_mpls_ldp_sync_destroy(struct nb_cb_destroy_args *args); int isis_instance_mpls_ldp_sync_create(struct nb_cb_create_args *args); int isis_instance_mpls_ldp_sync_holddown_modify(struct nb_cb_modify_args *args); |
