diff options
Diffstat (limited to 'lib/routemap_cli.c')
| -rw-r--r-- | lib/routemap_cli.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c index ec9033b3aa..045a8cddd8 100644 --- a/lib/routemap_cli.c +++ b/lib/routemap_cli.c @@ -124,6 +124,7 @@ void route_map_instance_show(struct vty *vty, struct lyd_node *dnode, void route_map_instance_show_end(struct vty *vty, struct lyd_node *dnode) { + vty_out(vty, "exit\n"); vty_out(vty, "!\n"); } @@ -1194,6 +1195,34 @@ void route_map_action_show(struct vty *vty, struct lyd_node *dnode, yang_dnode_get_string( dnode, "./rmap-set-action/frr-bgp-route-map:extcommunity-soo")); + } else if (IS_SET_EXTCOMMUNITY_LB(action)) { + enum ecommunity_lb_type lb_type; + char str[VTY_BUFSIZ]; + uint16_t bandwidth; + + lb_type = yang_dnode_get_enum( + dnode, + "./rmap-set-action/frr-bgp-route-map:extcommunity-lb/lb-type"); + switch (lb_type) { + case EXPLICIT_BANDWIDTH: + bandwidth = yang_dnode_get_uint16( + dnode, + "./rmap-set-action/frr-bgp-route-map:extcommunity-lb/bandwidth"); + snprintf(str, sizeof(str), "%d", bandwidth); + break; + case CUMULATIVE_BANDWIDTH: + snprintf(str, sizeof(str), "%s", "cumulative"); + break; + case COMPUTED_BANDWIDTH: + snprintf(str, sizeof(str), "%s", "num-multipaths"); + } + + if (yang_dnode_get_bool( + dnode, + "./rmap-set-action/frr-bgp-route-map:extcommunity-lb/two-octet-as-specific")) + strlcat(str, " non-transitive", sizeof(str)); + + vty_out(vty, " set extcommunity bandwidth %s\n", str); } else if (IS_SET_AGGREGATOR(action)) { vty_out(vty, " set aggregator as %s %s\n", yang_dnode_get_string( |
