diff options
Diffstat (limited to 'isisd/isis_cli.c')
| -rw-r--r-- | isisd/isis_cli.c | 102 |
1 files changed, 91 insertions, 11 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c index 26ae2024b9..ee51e46858 100644 --- a/isisd/isis_cli.c +++ b/isisd/isis_cli.c @@ -440,6 +440,29 @@ void cli_show_isis_overload_on_startup(struct vty *vty, } /* + * XPath: /frr-isisd:isis/instance/advertise-high-metrics + */ +DEFPY_YANG(advertise_high_metrics, advertise_high_metrics_cmd, + "[no] advertise-high-metrics", + NO_STR "Advertise high metric value on all interfaces\n") +{ + nb_cli_enqueue_change(vty, "./advertise-high-metrics", NB_OP_MODIFY, + no ? "false" : "true"); + + return nb_cli_apply_changes(vty, NULL); +} + +void cli_show_advertise_high_metrics(struct vty *vty, + const struct lyd_node *dnode, + bool show_defaults) +{ + if (yang_dnode_get_bool(dnode, NULL)) + vty_out(vty, " advertise-high-metrics\n"); + else if (show_defaults) + vty_out(vty, " no advertise-high-metrics\n"); +} + +/* * XPath: /frr-isisd:isis/instance/attach-send */ DEFPY_YANG(attached_bit_send, attached_bit_send_cmd, "[no] attached-bit send", @@ -892,6 +915,29 @@ void cli_show_isis_lsp_mtu(struct vty *vty, const struct lyd_node *dnode, } /* + * XPath: /frr-isisd:isis/instance/advertise-passive-only + */ +DEFPY_YANG(advertise_passive_only, advertise_passive_only_cmd, + "[no] advertise-passive-only", + NO_STR "Advertise prefixes of passive interfaces only\n") +{ + nb_cli_enqueue_change(vty, "./advertise-passive-only", NB_OP_MODIFY, + no ? "false" : "true"); + + return nb_cli_apply_changes(vty, NULL); +} + +void cli_show_advertise_passive_only(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, " advertise-passive-only\n"); +} + +/* * XPath: /frr-isisd:isis/instance/spf/minimum-interval */ DEFPY_YANG(spf_interval, spf_interval_cmd, @@ -2216,15 +2262,22 @@ void cli_show_ip_isis_threeway_shake(struct vty *vty, /* * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/padding */ -DEFPY_YANG(isis_hello_padding, isis_hello_padding_cmd, "[no] isis hello padding", - NO_STR - "IS-IS routing protocol\n" - "Add padding to IS-IS hello packets\n" - "Pad hello packets\n") +DEFPY_YANG(isis_hello_padding, isis_hello_padding_cmd, + "[no] isis hello padding [during-adjacency-formation]$padding_type", + NO_STR + "IS-IS routing protocol\n" + "Type of padding for IS-IS hello packets\n" + "Pad hello packets\n" + "Add padding to hello packets during adjacency formation only.\n") { - nb_cli_enqueue_change(vty, "./frr-isisd:isis/hello/padding", - NB_OP_MODIFY, no ? "false" : "true"); - + if (no) { + nb_cli_enqueue_change(vty, "./frr-isisd:isis/hello/padding", + NB_OP_MODIFY, "disabled"); + } else { + nb_cli_enqueue_change(vty, "./frr-isisd:isis/hello/padding", + NB_OP_MODIFY, + padding_type ? padding_type : "always"); + } return nb_cli_apply_changes(vty, NULL); } @@ -2232,10 +2285,13 @@ void cli_show_ip_isis_hello_padding(struct vty *vty, const struct lyd_node *dnode, bool show_defaults) { - if (!yang_dnode_get_bool(dnode, NULL)) + int hello_padding_type = yang_dnode_get_enum(dnode, NULL); + if (hello_padding_type == ISIS_HELLO_PADDING_DISABLED) vty_out(vty, " no"); - - vty_out(vty, " isis hello padding\n"); + vty_out(vty, " isis hello padding"); + if (hello_padding_type == ISIS_HELLO_PADDING_DURING_ADJACENCY_FORMATION) + vty_out(vty, " during-adjacency-formation"); + vty_out(vty, "\n"); } /* @@ -2970,6 +3026,26 @@ void cli_show_isis_log_adjacency(struct vty *vty, const struct lyd_node *dnode, } /* + * XPath: /frr-isisd:isis/instance/log-pdu-drops + */ +DEFPY_YANG(log_pdu_drops, log_pdu_drops_cmd, "[no] log-pdu-drops", + NO_STR "Log any dropped PDUs\n") +{ + nb_cli_enqueue_change(vty, "./log-pdu-drops", NB_OP_MODIFY, + no ? "false" : "true"); + + return nb_cli_apply_changes(vty, NULL); +} + +void cli_show_isis_log_pdu_drops(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, " log-pdu-drops\n"); +} + +/* * XPath: /frr-isisd:isis/instance/mpls/ldp-sync */ DEFPY(isis_mpls_ldp_sync, isis_mpls_ldp_sync_cmd, "mpls ldp-sync", @@ -3137,6 +3213,8 @@ void isis_cli_init(void) install_element(ISIS_NODE, &metric_style_cmd); install_element(ISIS_NODE, &no_metric_style_cmd); + install_element(ISIS_NODE, &advertise_high_metrics_cmd); + install_element(ISIS_NODE, &area_passwd_cmd); install_element(ISIS_NODE, &domain_passwd_cmd); install_element(ISIS_NODE, &no_area_passwd_cmd); @@ -3151,6 +3229,7 @@ void isis_cli_init(void) install_element(ISIS_NODE, &no_lsp_timers_cmd); install_element(ISIS_NODE, &area_lsp_mtu_cmd); install_element(ISIS_NODE, &no_area_lsp_mtu_cmd); + install_element(ISIS_NODE, &advertise_passive_only_cmd); install_element(ISIS_NODE, &spf_interval_cmd); install_element(ISIS_NODE, &no_spf_interval_cmd); @@ -3231,6 +3310,7 @@ void isis_cli_init(void) install_element(INTERFACE_NODE, &isis_ti_lfa_cmd); install_element(ISIS_NODE, &log_adj_changes_cmd); + install_element(ISIS_NODE, &log_pdu_drops_cmd); install_element(ISIS_NODE, &isis_mpls_ldp_sync_cmd); install_element(ISIS_NODE, &no_isis_mpls_ldp_sync_cmd); |
