Merge pull request #6727 from opensourcerouting/nb-cfg-backoff

lib: introduce configuration back-off timer for YANG-modeled commands
This commit is contained in:
Donald Sharp 2020-08-04 13:54:55 -04:00 committed by GitHub
commit 070d9eb9c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 472 additions and 325 deletions

View File

@ -55,7 +55,7 @@
/* /*
* Functions. * Functions.
*/ */
DEFPY_NOSH( DEFPY_YANG_NOSH(
bfd_enter, bfd_enter_cmd, bfd_enter, bfd_enter_cmd,
"bfd", "bfd",
"Configure BFD peers\n") "Configure BFD peers\n")
@ -70,7 +70,7 @@ DEFPY_NOSH(
return ret; return ret;
} }
DEFUN( DEFUN_YANG(
bfd_config_reset, bfd_config_reset_cmd, bfd_config_reset, bfd_config_reset_cmd,
"no bfd", "no bfd",
NO_STR NO_STR
@ -93,7 +93,7 @@ void bfd_cli_show_header_end(struct vty *vty,
vty_out(vty, "!\n"); vty_out(vty, "!\n");
} }
DEFPY_NOSH( DEFPY_YANG_NOSH(
bfd_peer_enter, bfd_peer_enter_cmd, bfd_peer_enter, bfd_peer_enter_cmd,
"peer <A.B.C.D|X:X::X:X> [{multihop$multihop|local-address <A.B.C.D|X:X::X:X>|interface IFNAME$ifname|vrf NAME}]", "peer <A.B.C.D|X:X::X:X> [{multihop$multihop|local-address <A.B.C.D|X:X::X:X>|interface IFNAME$ifname|vrf NAME}]",
PEER_STR PEER_STR
@ -150,7 +150,7 @@ DEFPY_NOSH(
return ret; return ret;
} }
DEFPY( DEFPY_YANG(
bfd_no_peer, bfd_no_peer_cmd, bfd_no_peer, bfd_no_peer_cmd,
"no peer <A.B.C.D|X:X::X:X> [{multihop$multihop|local-address <A.B.C.D|X:X::X:X>|interface IFNAME$ifname|vrf NAME}]", "no peer <A.B.C.D|X:X::X:X> [{multihop$multihop|local-address <A.B.C.D|X:X::X:X>|interface IFNAME$ifname|vrf NAME}]",
NO_STR NO_STR
@ -244,7 +244,7 @@ void bfd_cli_show_peer_end(struct vty *vty,
vty_out(vty, " !\n"); vty_out(vty, " !\n");
} }
DEFPY( DEFPY_YANG(
bfd_peer_shutdown, bfd_peer_shutdown_cmd, bfd_peer_shutdown, bfd_peer_shutdown_cmd,
"[no] shutdown", "[no] shutdown",
NO_STR NO_STR
@ -265,7 +265,7 @@ void bfd_cli_show_shutdown(struct vty *vty, struct lyd_node *dnode,
yang_dnode_get_bool(dnode, NULL) ? "" : "no "); yang_dnode_get_bool(dnode, NULL) ? "" : "no ");
} }
DEFPY( DEFPY_YANG(
bfd_peer_mult, bfd_peer_mult_cmd, bfd_peer_mult, bfd_peer_mult_cmd,
"detect-multiplier (2-255)$multiplier", "detect-multiplier (2-255)$multiplier",
"Configure peer detection multiplier\n" "Configure peer detection multiplier\n"
@ -287,7 +287,7 @@ void bfd_cli_show_mult(struct vty *vty, struct lyd_node *dnode,
yang_dnode_get_string(dnode, NULL)); yang_dnode_get_string(dnode, NULL));
} }
DEFPY( DEFPY_YANG(
bfd_peer_rx, bfd_peer_rx_cmd, bfd_peer_rx, bfd_peer_rx_cmd,
"receive-interval (10-60000)$interval", "receive-interval (10-60000)$interval",
"Configure peer receive interval\n" "Configure peer receive interval\n"
@ -316,7 +316,7 @@ void bfd_cli_show_rx(struct vty *vty, struct lyd_node *dnode,
} }
} }
DEFPY( DEFPY_YANG(
bfd_peer_tx, bfd_peer_tx_cmd, bfd_peer_tx, bfd_peer_tx_cmd,
"transmit-interval (10-60000)$interval", "transmit-interval (10-60000)$interval",
"Configure peer transmit interval\n" "Configure peer transmit interval\n"
@ -345,7 +345,7 @@ void bfd_cli_show_tx(struct vty *vty, struct lyd_node *dnode,
} }
} }
DEFPY( DEFPY_YANG(
bfd_peer_echo, bfd_peer_echo_cmd, bfd_peer_echo, bfd_peer_echo_cmd,
"[no] echo-mode", "[no] echo-mode",
NO_STR NO_STR
@ -366,7 +366,7 @@ void bfd_cli_show_echo(struct vty *vty, struct lyd_node *dnode,
yang_dnode_get_bool(dnode, NULL) ? "" : "no "); yang_dnode_get_bool(dnode, NULL) ? "" : "no ");
} }
DEFPY( DEFPY_YANG(
bfd_peer_echo_interval, bfd_peer_echo_interval_cmd, bfd_peer_echo_interval, bfd_peer_echo_interval_cmd,
"echo-interval (10-60000)$interval", "echo-interval (10-60000)$interval",
"Configure peer echo interval\n" "Configure peer echo interval\n"
@ -398,7 +398,7 @@ void bfd_cli_show_echo_interval(struct vty *vty, struct lyd_node *dnode,
/* /*
* Profile commands. * Profile commands.
*/ */
DEFPY_NOSH(bfd_profile, bfd_profile_cmd, DEFPY_YANG_NOSH(bfd_profile, bfd_profile_cmd,
"profile WORD$name", "profile WORD$name",
BFD_PROFILE_STR BFD_PROFILE_STR
BFD_PROFILE_NAME_STR) BFD_PROFILE_NAME_STR)
@ -419,7 +419,7 @@ DEFPY_NOSH(bfd_profile, bfd_profile_cmd,
return CMD_SUCCESS; return CMD_SUCCESS;
} }
DEFPY(no_bfd_profile, no_bfd_profile_cmd, DEFPY_YANG(no_bfd_profile, no_bfd_profile_cmd,
"no profile BFDPROF$name", "no profile BFDPROF$name",
NO_STR NO_STR
BFD_PROFILE_STR BFD_PROFILE_STR
@ -442,37 +442,37 @@ void bfd_cli_show_profile(struct vty *vty, struct lyd_node *dnode,
vty_out(vty, " profile %s\n", yang_dnode_get_string(dnode, "./name")); vty_out(vty, " profile %s\n", yang_dnode_get_string(dnode, "./name"));
} }
ALIAS(bfd_peer_mult, bfd_profile_mult_cmd, ALIAS_YANG(bfd_peer_mult, bfd_profile_mult_cmd,
"detect-multiplier (2-255)$multiplier", "detect-multiplier (2-255)$multiplier",
"Configure peer detection multiplier\n" "Configure peer detection multiplier\n"
"Configure peer detection multiplier value\n") "Configure peer detection multiplier value\n")
ALIAS(bfd_peer_tx, bfd_profile_tx_cmd, ALIAS_YANG(bfd_peer_tx, bfd_profile_tx_cmd,
"transmit-interval (10-60000)$interval", "transmit-interval (10-60000)$interval",
"Configure peer transmit interval\n" "Configure peer transmit interval\n"
"Configure peer transmit interval value in milliseconds\n") "Configure peer transmit interval value in milliseconds\n")
ALIAS(bfd_peer_rx, bfd_profile_rx_cmd, ALIAS_YANG(bfd_peer_rx, bfd_profile_rx_cmd,
"receive-interval (10-60000)$interval", "receive-interval (10-60000)$interval",
"Configure peer receive interval\n" "Configure peer receive interval\n"
"Configure peer receive interval value in milliseconds\n") "Configure peer receive interval value in milliseconds\n")
ALIAS(bfd_peer_shutdown, bfd_profile_shutdown_cmd, ALIAS_YANG(bfd_peer_shutdown, bfd_profile_shutdown_cmd,
"[no] shutdown", "[no] shutdown",
NO_STR NO_STR
"Disable BFD peer\n") "Disable BFD peer\n")
ALIAS(bfd_peer_echo, bfd_profile_echo_cmd, ALIAS_YANG(bfd_peer_echo, bfd_profile_echo_cmd,
"[no] echo-mode", "[no] echo-mode",
NO_STR NO_STR
"Configure echo mode\n") "Configure echo mode\n")
ALIAS(bfd_peer_echo_interval, bfd_profile_echo_interval_cmd, ALIAS_YANG(bfd_peer_echo_interval, bfd_profile_echo_interval_cmd,
"echo-interval (10-60000)$interval", "echo-interval (10-60000)$interval",
"Configure peer echo interval\n" "Configure peer echo interval\n"
"Configure peer echo interval value in milliseconds\n") "Configure peer echo interval value in milliseconds\n")
DEFPY(bfd_peer_profile, bfd_peer_profile_cmd, DEFPY_YANG(bfd_peer_profile, bfd_peer_profile_cmd,
"[no] profile BFDPROF$pname", "[no] profile BFDPROF$pname",
NO_STR NO_STR
"Use BFD profile settings\n" "Use BFD profile settings\n"

View File

@ -37,7 +37,7 @@
/* /*
* XPath: /frr-eigrpd:eigrpd/instance * XPath: /frr-eigrpd:eigrpd/instance
*/ */
DEFPY_NOSH( DEFPY_YANG_NOSH(
router_eigrp, router_eigrp,
router_eigrp_cmd, router_eigrp_cmd,
"router eigrp (1-65535)$as [vrf NAME]", "router eigrp (1-65535)$as [vrf NAME]",
@ -61,7 +61,7 @@ DEFPY_NOSH(
return rv; return rv;
} }
DEFPY( DEFPY_YANG(
no_router_eigrp, no_router_eigrp,
no_router_eigrp_cmd, no_router_eigrp_cmd,
"no router eigrp (1-65535)$as [vrf NAME]", "no router eigrp (1-65535)$as [vrf NAME]",
@ -101,7 +101,7 @@ void eigrp_cli_show_end_header(struct vty *vty, struct lyd_node *dnode)
/* /*
* XPath: /frr-eigrpd:eigrpd/instance/router-id * XPath: /frr-eigrpd:eigrpd/instance/router-id
*/ */
DEFPY( DEFPY_YANG(
eigrp_router_id, eigrp_router_id,
eigrp_router_id_cmd, eigrp_router_id_cmd,
"eigrp router-id A.B.C.D$addr", "eigrp router-id A.B.C.D$addr",
@ -113,7 +113,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_eigrp_router_id, no_eigrp_router_id,
no_eigrp_router_id_cmd, no_eigrp_router_id_cmd,
"no eigrp router-id [A.B.C.D]", "no eigrp router-id [A.B.C.D]",
@ -137,7 +137,7 @@ void eigrp_cli_show_router_id(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-eigrpd:eigrpd/instance/passive-interface * XPath: /frr-eigrpd:eigrpd/instance/passive-interface
*/ */
DEFPY( DEFPY_YANG(
eigrp_passive_interface, eigrp_passive_interface,
eigrp_passive_interface_cmd, eigrp_passive_interface_cmd,
"[no] passive-interface IFNAME", "[no] passive-interface IFNAME",
@ -166,7 +166,7 @@ void eigrp_cli_show_passive_interface(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-eigrpd:eigrpd/instance/active-time * XPath: /frr-eigrpd:eigrpd/instance/active-time
*/ */
DEFPY( DEFPY_YANG(
eigrp_timers_active, eigrp_timers_active,
eigrp_timers_active_cmd, eigrp_timers_active_cmd,
"timers active-time <(1-65535)$timer|disabled$disabled>", "timers active-time <(1-65535)$timer|disabled$disabled>",
@ -184,7 +184,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_eigrp_timers_active, no_eigrp_timers_active,
no_eigrp_timers_active_cmd, no_eigrp_timers_active_cmd,
"no timers active-time [<(1-65535)|disabled>]", "no timers active-time [<(1-65535)|disabled>]",
@ -209,7 +209,7 @@ void eigrp_cli_show_active_time(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-eigrpd:eigrpd/instance/variance * XPath: /frr-eigrpd:eigrpd/instance/variance
*/ */
DEFPY( DEFPY_YANG(
eigrp_variance, eigrp_variance,
eigrp_variance_cmd, eigrp_variance_cmd,
"variance (1-128)$variance", "variance (1-128)$variance",
@ -220,7 +220,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_eigrp_variance, no_eigrp_variance,
no_eigrp_variance_cmd, no_eigrp_variance_cmd,
"no variance [(1-128)]", "no variance [(1-128)]",
@ -243,7 +243,7 @@ void eigrp_cli_show_variance(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-eigrpd:eigrpd/instance/maximum-paths * XPath: /frr-eigrpd:eigrpd/instance/maximum-paths
*/ */
DEFPY( DEFPY_YANG(
eigrp_maximum_paths, eigrp_maximum_paths,
eigrp_maximum_paths_cmd, eigrp_maximum_paths_cmd,
"maximum-paths (1-32)$maximum_paths", "maximum-paths (1-32)$maximum_paths",
@ -255,7 +255,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_eigrp_maximum_paths, no_eigrp_maximum_paths,
no_eigrp_maximum_paths_cmd, no_eigrp_maximum_paths_cmd,
"no maximum-paths [(1-32)]", "no maximum-paths [(1-32)]",
@ -283,7 +283,7 @@ void eigrp_cli_show_maximum_paths(struct vty *vty, struct lyd_node *dnode,
* XPath: /frr-eigrpd:eigrpd/instance/metric-weights/K5 * XPath: /frr-eigrpd:eigrpd/instance/metric-weights/K5
* XPath: /frr-eigrpd:eigrpd/instance/metric-weights/K6 * XPath: /frr-eigrpd:eigrpd/instance/metric-weights/K6
*/ */
DEFPY( DEFPY_YANG(
eigrp_metric_weights, eigrp_metric_weights,
eigrp_metric_weights_cmd, eigrp_metric_weights_cmd,
"metric weights (0-255)$k1 (0-255)$k2 (0-255)$k3 (0-255)$k4 (0-255)$k5 [(0-255)$k6]", "metric weights (0-255)$k1 (0-255)$k2 (0-255)$k3 (0-255)$k4 (0-255)$k5 [(0-255)$k6]",
@ -308,7 +308,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_eigrp_metric_weights, no_eigrp_metric_weights,
no_eigrp_metric_weights_cmd, no_eigrp_metric_weights_cmd,
"no metric weights [(0-255) (0-255) (0-255) (0-255) (0-255) (0-255)]", "no metric weights [(0-255) (0-255) (0-255) (0-255) (0-255) (0-255)]",
@ -359,7 +359,7 @@ void eigrp_cli_show_metrics(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-eigrpd:eigrpd/instance/network * XPath: /frr-eigrpd:eigrpd/instance/network
*/ */
DEFPY( DEFPY_YANG(
eigrp_network, eigrp_network,
eigrp_network_cmd, eigrp_network_cmd,
"[no] network A.B.C.D/M$prefix", "[no] network A.B.C.D/M$prefix",
@ -388,7 +388,7 @@ void eigrp_cli_show_network(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-eigrpd:eigrpd/instance/neighbor * XPath: /frr-eigrpd:eigrpd/instance/neighbor
*/ */
DEFPY( DEFPY_YANG(
eigrp_neighbor, eigrp_neighbor,
eigrp_neighbor_cmd, eigrp_neighbor_cmd,
"[no] neighbor A.B.C.D$addr", "[no] neighbor A.B.C.D$addr",
@ -423,7 +423,7 @@ void eigrp_cli_show_neighbor(struct vty *vty, struct lyd_node *dnode,
* XPath: /frr-eigrpd:eigrpd/instance/redistribute/metrics/load * XPath: /frr-eigrpd:eigrpd/instance/redistribute/metrics/load
* XPath: /frr-eigrpd:eigrpd/instance/redistribute/metrics/mtu * XPath: /frr-eigrpd:eigrpd/instance/redistribute/metrics/mtu
*/ */
DEFPY( DEFPY_YANG(
eigrp_redistribute_source_metric, eigrp_redistribute_source_metric,
eigrp_redistribute_source_metric_cmd, eigrp_redistribute_source_metric_cmd,
"[no] redistribute " FRR_REDIST_STR_EIGRPD "[no] redistribute " FRR_REDIST_STR_EIGRPD
@ -493,7 +493,7 @@ void eigrp_cli_show_redistribute(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/delay * XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/delay
*/ */
DEFPY( DEFPY_YANG(
eigrp_if_delay, eigrp_if_delay,
eigrp_if_delay_cmd, eigrp_if_delay_cmd,
"delay (1-16777215)$delay", "delay (1-16777215)$delay",
@ -505,7 +505,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_eigrp_if_delay, no_eigrp_if_delay,
no_eigrp_if_delay_cmd, no_eigrp_if_delay_cmd,
"no delay [(1-16777215)]", "no delay [(1-16777215)]",
@ -529,7 +529,7 @@ void eigrp_cli_show_delay(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/bandwidth * XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/bandwidth
*/ */
DEFPY( DEFPY_YANG(
eigrp_if_bandwidth, eigrp_if_bandwidth,
eigrp_if_bandwidth_cmd, eigrp_if_bandwidth_cmd,
"eigrp bandwidth (1-10000000)$bw", "eigrp bandwidth (1-10000000)$bw",
@ -542,7 +542,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_eigrp_if_bandwidth, no_eigrp_if_bandwidth,
no_eigrp_if_bandwidth_cmd, no_eigrp_if_bandwidth_cmd,
"no eigrp bandwidth [(1-10000000)]", "no eigrp bandwidth [(1-10000000)]",
@ -567,7 +567,7 @@ void eigrp_cli_show_bandwidth(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/hello-interval * XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/hello-interval
*/ */
DEFPY( DEFPY_YANG(
eigrp_if_ip_hellointerval, eigrp_if_ip_hellointerval,
eigrp_if_ip_hellointerval_cmd, eigrp_if_ip_hellointerval_cmd,
"ip hello-interval eigrp (1-65535)$hello", "ip hello-interval eigrp (1-65535)$hello",
@ -581,7 +581,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_eigrp_if_ip_hellointerval, no_eigrp_if_ip_hellointerval,
no_eigrp_if_ip_hellointerval_cmd, no_eigrp_if_ip_hellointerval_cmd,
"no ip hello-interval eigrp [(1-65535)]", "no ip hello-interval eigrp [(1-65535)]",
@ -608,7 +608,7 @@ void eigrp_cli_show_hello_interval(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/hold-time * XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/hold-time
*/ */
DEFPY( DEFPY_YANG(
eigrp_if_ip_holdinterval, eigrp_if_ip_holdinterval,
eigrp_if_ip_holdinterval_cmd, eigrp_if_ip_holdinterval_cmd,
"ip hold-time eigrp (1-65535)$hold", "ip hold-time eigrp (1-65535)$hold",
@ -622,7 +622,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_eigrp_if_ip_holdinterval, no_eigrp_if_ip_holdinterval,
no_eigrp_if_ip_holdinterval_cmd, no_eigrp_if_ip_holdinterval_cmd,
"no ip hold-time eigrp [(1-65535)]", "no ip hold-time eigrp [(1-65535)]",
@ -654,7 +654,7 @@ void eigrp_cli_show_hold_time(struct vty *vty, struct lyd_node *dnode,
* XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/instance * XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/instance
* XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/instance/summarize-addresses * XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/instance/summarize-addresses
*/ */
DEFPY( DEFPY_YANG(
eigrp_ip_summary_address, eigrp_ip_summary_address,
eigrp_ip_summary_address_cmd, eigrp_ip_summary_address_cmd,
"ip summary-address eigrp (1-65535)$as A.B.C.D/M$prefix", "ip summary-address eigrp (1-65535)$as A.B.C.D/M$prefix",
@ -676,7 +676,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_eigrp_ip_summary_address, no_eigrp_ip_summary_address,
no_eigrp_ip_summary_address_cmd, no_eigrp_ip_summary_address_cmd,
"no ip summary-address eigrp (1-65535)$as A.B.C.D/M$prefix", "no ip summary-address eigrp (1-65535)$as A.B.C.D/M$prefix",
@ -714,7 +714,7 @@ void eigrp_cli_show_summarize_address(struct vty *vty, struct lyd_node *dnode,
* XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/instance * XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/instance
* XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/instance/authentication * XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/instance/authentication
*/ */
DEFPY( DEFPY_YANG(
eigrp_authentication_mode, eigrp_authentication_mode,
eigrp_authentication_mode_cmd, eigrp_authentication_mode_cmd,
"ip authentication mode eigrp (1-65535)$as <md5|hmac-sha-256>$crypt", "ip authentication mode eigrp (1-65535)$as <md5|hmac-sha-256>$crypt",
@ -738,7 +738,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_eigrp_authentication_mode, no_eigrp_authentication_mode,
no_eigrp_authentication_mode_cmd, no_eigrp_authentication_mode_cmd,
"no ip authentication mode eigrp (1-65535)$as [<md5|hmac-sha-256>]", "no ip authentication mode eigrp (1-65535)$as [<md5|hmac-sha-256>]",
@ -778,7 +778,7 @@ void eigrp_cli_show_authentication(struct vty *vty, struct lyd_node *dnode,
* XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/instance * XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/instance
* XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/instance/keychain * XPath: /frr-interface:lib/interface/frr-eigrpd:eigrp/instance/keychain
*/ */
DEFPY( DEFPY_YANG(
eigrp_authentication_keychain, eigrp_authentication_keychain,
eigrp_authentication_keychain_cmd, eigrp_authentication_keychain_cmd,
"ip authentication key-chain eigrp (1-65535)$as WORD$name", "ip authentication key-chain eigrp (1-65535)$as WORD$name",
@ -801,7 +801,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_eigrp_authentication_keychain, no_eigrp_authentication_keychain,
no_eigrp_authentication_keychain_cmd, no_eigrp_authentication_keychain_cmd,
"no ip authentication key-chain eigrp (1-65535)$as [WORD]", "no ip authentication key-chain eigrp (1-65535)$as [WORD]",

View File

@ -46,7 +46,7 @@
/* /*
* XPath: /frr-isisd:isis/instance * XPath: /frr-isisd:isis/instance
*/ */
DEFPY_NOSH(router_isis, router_isis_cmd, "router isis WORD$tag", DEFPY_YANG_NOSH(router_isis, router_isis_cmd, "router isis WORD$tag",
ROUTER_STR ROUTER_STR
"ISO IS-IS\n" "ISO IS-IS\n"
"ISO Routing area tag\n") "ISO Routing area tag\n")
@ -72,7 +72,7 @@ DEFPY_NOSH(router_isis, router_isis_cmd, "router isis WORD$tag",
return ret; return ret;
} }
DEFPY(no_router_isis, no_router_isis_cmd, "no router isis WORD$tag", DEFPY_YANG(no_router_isis, no_router_isis_cmd, "no router isis WORD$tag",
NO_STR ROUTER_STR NO_STR ROUTER_STR
"ISO IS-IS\n" "ISO IS-IS\n"
"ISO Routing area tag\n") "ISO Routing area tag\n")
@ -126,7 +126,7 @@ void cli_show_router_isis(struct vty *vty, struct lyd_node *dnode,
* XPath: /frr-interface:lib/interface/frr-isisd:isis/ipv6-routing * XPath: /frr-interface:lib/interface/frr-isisd:isis/ipv6-routing
* XPath: /frr-isisd:isis/instance * XPath: /frr-isisd:isis/instance
*/ */
DEFPY(ip_router_isis, ip_router_isis_cmd, "ip router isis WORD$tag", DEFPY_YANG(ip_router_isis, ip_router_isis_cmd, "ip router isis WORD$tag",
"Interface Internet Protocol config commands\n" "Interface Internet Protocol config commands\n"
"IP router interface commands\n" "IP router interface commands\n"
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
@ -196,7 +196,7 @@ DEFPY(ip_router_isis, ip_router_isis_cmd, "ip router isis WORD$tag",
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(ip6_router_isis, ip6_router_isis_cmd, "ipv6 router isis WORD$tag", DEFPY_YANG(ip6_router_isis, ip6_router_isis_cmd, "ipv6 router isis WORD$tag",
"Interface Internet Protocol config commands\n" "Interface Internet Protocol config commands\n"
"IP router interface commands\n" "IP router interface commands\n"
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
@ -266,7 +266,7 @@ DEFPY(ip6_router_isis, ip6_router_isis_cmd, "ipv6 router isis WORD$tag",
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_ip_router_isis, no_ip_router_isis_cmd, DEFPY_YANG(no_ip_router_isis, no_ip_router_isis_cmd,
"no <ip|ipv6>$ip router isis [WORD]$tag", "no <ip|ipv6>$ip router isis [WORD]$tag",
NO_STR NO_STR
"Interface Internet Protocol config commands\n" "Interface Internet Protocol config commands\n"
@ -327,7 +327,7 @@ void cli_show_ip_isis_ipv6(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring * XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring
*/ */
DEFPY(isis_bfd, DEFPY_YANG(isis_bfd,
isis_bfd_cmd, isis_bfd_cmd,
"[no] isis bfd", "[no] isis bfd",
NO_STR PROTO_HELP NO_STR PROTO_HELP
@ -351,7 +351,7 @@ DEFPY(isis_bfd,
/* /*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring/profile * XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring/profile
*/ */
DEFPY(isis_bfd_profile, DEFPY_YANG(isis_bfd_profile,
isis_bfd_profile_cmd, isis_bfd_profile_cmd,
"[no] isis bfd profile WORD", "[no] isis bfd profile WORD",
NO_STR PROTO_HELP NO_STR PROTO_HELP
@ -394,7 +394,7 @@ void cli_show_ip_isis_bfd_monitoring(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/area-address * XPath: /frr-isisd:isis/instance/area-address
*/ */
DEFPY(net, net_cmd, "[no] net WORD", DEFPY_YANG(net, net_cmd, "[no] net WORD",
"Remove an existing Network Entity Title for this process\n" "Remove an existing Network Entity Title for this process\n"
"A Network Entity Title for this process (OSI only)\n" "A Network Entity Title for this process (OSI only)\n"
"XX.XXXX. ... .XXX.XX Network entity title (NET)\n") "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
@ -414,7 +414,7 @@ void cli_show_isis_area_address(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/is-type * XPath: /frr-isisd:isis/instance/is-type
*/ */
DEFPY(is_type, is_type_cmd, "is-type <level-1|level-1-2|level-2-only>$level", DEFPY_YANG(is_type, is_type_cmd, "is-type <level-1|level-1-2|level-2-only>$level",
"IS Level for this routing process (OSI only)\n" "IS Level for this routing process (OSI only)\n"
"Act as a station router only\n" "Act as a station router only\n"
"Act as both a station router and an area router\n" "Act as both a station router and an area router\n"
@ -427,7 +427,7 @@ DEFPY(is_type, is_type_cmd, "is-type <level-1|level-1-2|level-2-only>$level",
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_is_type, no_is_type_cmd, DEFPY_YANG(no_is_type, no_is_type_cmd,
"no is-type [<level-1|level-1-2|level-2-only>]", "no is-type [<level-1|level-1-2|level-2-only>]",
NO_STR NO_STR
"IS Level for this routing process (OSI only)\n" "IS Level for this routing process (OSI only)\n"
@ -461,7 +461,7 @@ void cli_show_isis_is_type(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/dynamic-hostname * XPath: /frr-isisd:isis/instance/dynamic-hostname
*/ */
DEFPY(dynamic_hostname, dynamic_hostname_cmd, "[no] hostname dynamic", DEFPY_YANG(dynamic_hostname, dynamic_hostname_cmd, "[no] hostname dynamic",
NO_STR NO_STR
"Dynamic hostname for IS-IS\n" "Dynamic hostname for IS-IS\n"
"Dynamic hostname\n") "Dynamic hostname\n")
@ -484,7 +484,7 @@ void cli_show_isis_dynamic_hostname(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/overload * XPath: /frr-isisd:isis/instance/overload
*/ */
DEFPY(set_overload_bit, set_overload_bit_cmd, "[no] set-overload-bit", DEFPY_YANG(set_overload_bit, set_overload_bit_cmd, "[no] set-overload-bit",
"Reset overload bit to accept transit traffic\n" "Reset overload bit to accept transit traffic\n"
"Set overload bit to avoid any transit traffic\n") "Set overload bit to avoid any transit traffic\n")
{ {
@ -505,7 +505,7 @@ void cli_show_isis_overload(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/attached * XPath: /frr-isisd:isis/instance/attached
*/ */
DEFPY(set_attached_bit, set_attached_bit_cmd, "[no] set-attached-bit", DEFPY_YANG(set_attached_bit, set_attached_bit_cmd, "[no] set-attached-bit",
"Reset attached bit\n" "Reset attached bit\n"
"Set attached bit to identify as L1/L2 router for inter-area traffic\n") "Set attached bit to identify as L1/L2 router for inter-area traffic\n")
{ {
@ -526,7 +526,7 @@ void cli_show_isis_attached(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/metric-style * XPath: /frr-isisd:isis/instance/metric-style
*/ */
DEFPY(metric_style, metric_style_cmd, DEFPY_YANG(metric_style, metric_style_cmd,
"metric-style <narrow|transition|wide>$style", "metric-style <narrow|transition|wide>$style",
"Use old-style (ISO 10589) or new-style packet formats\n" "Use old-style (ISO 10589) or new-style packet formats\n"
"Use old style of TLVs with narrow metric\n" "Use old style of TLVs with narrow metric\n"
@ -538,7 +538,7 @@ DEFPY(metric_style, metric_style_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_metric_style, no_metric_style_cmd, DEFPY_YANG(no_metric_style, no_metric_style_cmd,
"no metric-style [narrow|transition|wide]", "no metric-style [narrow|transition|wide]",
NO_STR NO_STR
"Use old-style (ISO 10589) or new-style packet formats\n" "Use old-style (ISO 10589) or new-style packet formats\n"
@ -572,7 +572,7 @@ void cli_show_isis_metric_style(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/area-password * XPath: /frr-isisd:isis/instance/area-password
*/ */
DEFPY(area_passwd, area_passwd_cmd, DEFPY_YANG(area_passwd, area_passwd_cmd,
"area-password <clear|md5>$pwd_type WORD$pwd [authenticate snp <send-only|validate>$snp]", "area-password <clear|md5>$pwd_type WORD$pwd [authenticate snp <send-only|validate>$snp]",
"Configure the authentication password for an area\n" "Configure the authentication password for an area\n"
"Clear-text authentication type\n" "Clear-text authentication type\n"
@ -611,7 +611,7 @@ void cli_show_isis_area_pwd(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/domain-password * XPath: /frr-isisd:isis/instance/domain-password
*/ */
DEFPY(domain_passwd, domain_passwd_cmd, DEFPY_YANG(domain_passwd, domain_passwd_cmd,
"domain-password <clear|md5>$pwd_type WORD$pwd [authenticate snp <send-only|validate>$snp]", "domain-password <clear|md5>$pwd_type WORD$pwd [authenticate snp <send-only|validate>$snp]",
"Set the authentication password for a routing domain\n" "Set the authentication password for a routing domain\n"
"Clear-text authentication type\n" "Clear-text authentication type\n"
@ -633,7 +633,7 @@ DEFPY(domain_passwd, domain_passwd_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_area_passwd, no_area_passwd_cmd, DEFPY_YANG(no_area_passwd, no_area_passwd_cmd,
"no <area-password|domain-password>$cmd", "no <area-password|domain-password>$cmd",
NO_STR NO_STR
"Configure the authentication password for an area\n" "Configure the authentication password for an area\n"
@ -662,7 +662,7 @@ void cli_show_isis_domain_pwd(struct vty *vty, struct lyd_node *dnode,
* XPath: /frr-isisd:isis/instance/lsp/timers/level-1/generation-interval * XPath: /frr-isisd:isis/instance/lsp/timers/level-1/generation-interval
* XPath: /frr-isisd:isis/instance/lsp/timers/level-2/generation-interval * XPath: /frr-isisd:isis/instance/lsp/timers/level-2/generation-interval
*/ */
DEFPY(lsp_gen_interval, lsp_gen_interval_cmd, DEFPY_YANG(lsp_gen_interval, lsp_gen_interval_cmd,
"lsp-gen-interval [level-1|level-2]$level (1-120)$val", "lsp-gen-interval [level-1|level-2]$level (1-120)$val",
"Minimum interval between regenerating same LSP\n" "Minimum interval between regenerating same LSP\n"
"Set interval for level 1 only\n" "Set interval for level 1 only\n"
@ -681,7 +681,7 @@ DEFPY(lsp_gen_interval, lsp_gen_interval_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_lsp_gen_interval, no_lsp_gen_interval_cmd, DEFPY_YANG(no_lsp_gen_interval, no_lsp_gen_interval_cmd,
"no lsp-gen-interval [level-1|level-2]$level [(1-120)]", "no lsp-gen-interval [level-1|level-2]$level [(1-120)]",
NO_STR NO_STR
"Minimum interval between regenerating same LSP\n" "Minimum interval between regenerating same LSP\n"
@ -705,7 +705,7 @@ DEFPY(no_lsp_gen_interval, no_lsp_gen_interval_cmd,
* XPath: /frr-isisd:isis/instance/lsp/timers/level-1/refresh-interval * XPath: /frr-isisd:isis/instance/lsp/timers/level-1/refresh-interval
* XPath: /frr-isisd:isis/instance/lsp/timers/level-2/refresh-interval * XPath: /frr-isisd:isis/instance/lsp/timers/level-2/refresh-interval
*/ */
DEFPY(lsp_refresh_interval, lsp_refresh_interval_cmd, DEFPY_YANG(lsp_refresh_interval, lsp_refresh_interval_cmd,
"lsp-refresh-interval [level-1|level-2]$level (1-65235)$val", "lsp-refresh-interval [level-1|level-2]$level (1-65235)$val",
"LSP refresh interval\n" "LSP refresh interval\n"
"LSP refresh interval for Level 1 only\n" "LSP refresh interval for Level 1 only\n"
@ -724,7 +724,7 @@ DEFPY(lsp_refresh_interval, lsp_refresh_interval_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_lsp_refresh_interval, no_lsp_refresh_interval_cmd, DEFPY_YANG(no_lsp_refresh_interval, no_lsp_refresh_interval_cmd,
"no lsp-refresh-interval [level-1|level-2]$level [(1-65235)]", "no lsp-refresh-interval [level-1|level-2]$level [(1-65235)]",
NO_STR NO_STR
"LSP refresh interval\n" "LSP refresh interval\n"
@ -749,7 +749,7 @@ DEFPY(no_lsp_refresh_interval, no_lsp_refresh_interval_cmd,
* XPath: /frr-isisd:isis/instance/lsp/timers/level-1/maximum-lifetime * XPath: /frr-isisd:isis/instance/lsp/timers/level-1/maximum-lifetime
*/ */
DEFPY(max_lsp_lifetime, max_lsp_lifetime_cmd, DEFPY_YANG(max_lsp_lifetime, max_lsp_lifetime_cmd,
"max-lsp-lifetime [level-1|level-2]$level (350-65535)$val", "max-lsp-lifetime [level-1|level-2]$level (350-65535)$val",
"Maximum LSP lifetime\n" "Maximum LSP lifetime\n"
"Maximum LSP lifetime for Level 1 only\n" "Maximum LSP lifetime for Level 1 only\n"
@ -768,7 +768,7 @@ DEFPY(max_lsp_lifetime, max_lsp_lifetime_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_max_lsp_lifetime, no_max_lsp_lifetime_cmd, DEFPY_YANG(no_max_lsp_lifetime, no_max_lsp_lifetime_cmd,
"no max-lsp-lifetime [level-1|level-2]$level [(350-65535)]", "no max-lsp-lifetime [level-1|level-2]$level [(350-65535)]",
NO_STR NO_STR
"Maximum LSP lifetime\n" "Maximum LSP lifetime\n"
@ -792,7 +792,7 @@ DEFPY(no_max_lsp_lifetime, no_max_lsp_lifetime_cmd,
* XPath: /frr-isisd:isis/instance/lsp/timers * XPath: /frr-isisd:isis/instance/lsp/timers
*/ */
DEFPY(lsp_timers, lsp_timers_cmd, DEFPY_YANG(lsp_timers, lsp_timers_cmd,
"lsp-timers [level-1|level-2]$level gen-interval (1-120)$gen refresh-interval (1-65235)$refresh max-lifetime (350-65535)$lifetime", "lsp-timers [level-1|level-2]$level gen-interval (1-120)$gen refresh-interval (1-65235)$refresh max-lifetime (350-65535)$lifetime",
"LSP-related timers\n" "LSP-related timers\n"
"LSP-related timers for Level 1 only\n" "LSP-related timers for Level 1 only\n"
@ -830,7 +830,7 @@ DEFPY(lsp_timers, lsp_timers_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_lsp_timers, no_lsp_timers_cmd, DEFPY_YANG(no_lsp_timers, no_lsp_timers_cmd,
"no lsp-timers [level-1|level-2]$level [gen-interval (1-120) refresh-interval (1-65235) max-lifetime (350-65535)]", "no lsp-timers [level-1|level-2]$level [gen-interval (1-120) refresh-interval (1-65235) max-lifetime (350-65535)]",
NO_STR NO_STR
"LSP-related timers\n" "LSP-related timers\n"
@ -902,7 +902,7 @@ void cli_show_isis_lsp_timers(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/lsp/mtu * XPath: /frr-isisd:isis/instance/lsp/mtu
*/ */
DEFPY(area_lsp_mtu, area_lsp_mtu_cmd, "lsp-mtu (128-4352)$val", DEFPY_YANG(area_lsp_mtu, area_lsp_mtu_cmd, "lsp-mtu (128-4352)$val",
"Configure the maximum size of generated LSPs\n" "Configure the maximum size of generated LSPs\n"
"Maximum size of generated LSPs\n") "Maximum size of generated LSPs\n")
{ {
@ -911,7 +911,7 @@ DEFPY(area_lsp_mtu, area_lsp_mtu_cmd, "lsp-mtu (128-4352)$val",
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_area_lsp_mtu, no_area_lsp_mtu_cmd, "no lsp-mtu [(128-4352)]", DEFPY_YANG(no_area_lsp_mtu, no_area_lsp_mtu_cmd, "no lsp-mtu [(128-4352)]",
NO_STR NO_STR
"Configure the maximum size of generated LSPs\n" "Configure the maximum size of generated LSPs\n"
"Maximum size of generated LSPs\n") "Maximum size of generated LSPs\n")
@ -930,7 +930,7 @@ void cli_show_isis_lsp_mtu(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/spf/minimum-interval * XPath: /frr-isisd:isis/instance/spf/minimum-interval
*/ */
DEFPY(spf_interval, spf_interval_cmd, DEFPY_YANG(spf_interval, spf_interval_cmd,
"spf-interval [level-1|level-2]$level (1-120)$val", "spf-interval [level-1|level-2]$level (1-120)$val",
"Minimum interval between SPF calculations\n" "Minimum interval between SPF calculations\n"
"Set interval for level 1 only\n" "Set interval for level 1 only\n"
@ -947,7 +947,7 @@ DEFPY(spf_interval, spf_interval_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_spf_interval, no_spf_interval_cmd, DEFPY_YANG(no_spf_interval, no_spf_interval_cmd,
"no spf-interval [level-1|level-2]$level [(1-120)]", "no spf-interval [level-1|level-2]$level [(1-120)]",
NO_STR NO_STR
"Minimum interval between SPF calculations\n" "Minimum interval between SPF calculations\n"
@ -982,7 +982,7 @@ void cli_show_isis_spf_min_interval(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/spf/ietf-backoff-delay * XPath: /frr-isisd:isis/instance/spf/ietf-backoff-delay
*/ */
DEFPY(spf_delay_ietf, spf_delay_ietf_cmd, DEFPY_YANG(spf_delay_ietf, spf_delay_ietf_cmd,
"spf-delay-ietf init-delay (0-60000) short-delay (0-60000) long-delay (0-60000) holddown (0-60000) time-to-learn (0-60000)", "spf-delay-ietf init-delay (0-60000) short-delay (0-60000) long-delay (0-60000) holddown (0-60000) time-to-learn (0-60000)",
"IETF SPF delay algorithm\n" "IETF SPF delay algorithm\n"
"Delay used while in QUIET state\n" "Delay used while in QUIET state\n"
@ -1012,7 +1012,7 @@ DEFPY(spf_delay_ietf, spf_delay_ietf_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_spf_delay_ietf, no_spf_delay_ietf_cmd, DEFPY_YANG(no_spf_delay_ietf, no_spf_delay_ietf_cmd,
"no spf-delay-ietf [init-delay (0-60000) short-delay (0-60000) long-delay (0-60000) holddown (0-60000) time-to-learn (0-60000)]", "no spf-delay-ietf [init-delay (0-60000) short-delay (0-60000) long-delay (0-60000) holddown (0-60000) time-to-learn (0-60000)]",
NO_STR NO_STR
"IETF SPF delay algorithm\n" "IETF SPF delay algorithm\n"
@ -1048,7 +1048,7 @@ void cli_show_isis_spf_ietf_backoff(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/purge-originator * XPath: /frr-isisd:isis/instance/purge-originator
*/ */
DEFPY(area_purge_originator, area_purge_originator_cmd, "[no] purge-originator", DEFPY_YANG(area_purge_originator, area_purge_originator_cmd, "[no] purge-originator",
NO_STR "Use the RFC 6232 purge-originator\n") NO_STR "Use the RFC 6232 purge-originator\n")
{ {
nb_cli_enqueue_change(vty, "./purge-originator", NB_OP_MODIFY, nb_cli_enqueue_change(vty, "./purge-originator", NB_OP_MODIFY,
@ -1068,7 +1068,7 @@ void cli_show_isis_purge_origin(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/mpls-te * XPath: /frr-isisd:isis/instance/mpls-te
*/ */
DEFPY(isis_mpls_te_on, isis_mpls_te_on_cmd, "mpls-te on", DEFPY_YANG(isis_mpls_te_on, isis_mpls_te_on_cmd, "mpls-te on",
MPLS_TE_STR "Enable the MPLS-TE functionality\n") MPLS_TE_STR "Enable the MPLS-TE functionality\n")
{ {
nb_cli_enqueue_change(vty, "./mpls-te", NB_OP_CREATE, nb_cli_enqueue_change(vty, "./mpls-te", NB_OP_CREATE,
@ -1077,7 +1077,7 @@ DEFPY(isis_mpls_te_on, isis_mpls_te_on_cmd, "mpls-te on",
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_isis_mpls_te_on, no_isis_mpls_te_on_cmd, "no mpls-te [on]", DEFPY_YANG(no_isis_mpls_te_on, no_isis_mpls_te_on_cmd, "no mpls-te [on]",
NO_STR NO_STR
"Disable the MPLS-TE functionality\n" "Disable the MPLS-TE functionality\n"
"Disable the MPLS-TE functionality\n") "Disable the MPLS-TE functionality\n")
@ -1097,7 +1097,7 @@ void cli_show_isis_mpls_te(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/mpls-te/router-address * XPath: /frr-isisd:isis/instance/mpls-te/router-address
*/ */
DEFPY(isis_mpls_te_router_addr, isis_mpls_te_router_addr_cmd, DEFPY_YANG(isis_mpls_te_router_addr, isis_mpls_te_router_addr_cmd,
"mpls-te router-address A.B.C.D", "mpls-te router-address A.B.C.D",
MPLS_TE_STR MPLS_TE_STR
"Stable IP address of the advertising router\n" "Stable IP address of the advertising router\n"
@ -1109,7 +1109,7 @@ DEFPY(isis_mpls_te_router_addr, isis_mpls_te_router_addr_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_isis_mpls_te_router_addr, no_isis_mpls_te_router_addr_cmd, DEFPY_YANG(no_isis_mpls_te_router_addr, no_isis_mpls_te_router_addr_cmd,
"no mpls-te router-address [A.B.C.D]", "no mpls-te router-address [A.B.C.D]",
NO_STR MPLS_TE_STR NO_STR MPLS_TE_STR
"Delete IP address of the advertising router\n" "Delete IP address of the advertising router\n"
@ -1128,7 +1128,7 @@ void cli_show_isis_mpls_te_router_addr(struct vty *vty, struct lyd_node *dnode,
yang_dnode_get_string(dnode, NULL)); yang_dnode_get_string(dnode, NULL));
} }
DEFPY(isis_mpls_te_inter_as, isis_mpls_te_inter_as_cmd, DEFPY_YANG(isis_mpls_te_inter_as, isis_mpls_te_inter_as_cmd,
"[no] mpls-te inter-as [level-1|level-1-2|level-2-only]", "[no] mpls-te inter-as [level-1|level-1-2|level-2-only]",
NO_STR MPLS_TE_STR NO_STR MPLS_TE_STR
"Configure MPLS-TE Inter-AS support\n" "Configure MPLS-TE Inter-AS support\n"
@ -1143,7 +1143,7 @@ DEFPY(isis_mpls_te_inter_as, isis_mpls_te_inter_as_cmd,
/* /*
* XPath: /frr-isisd:isis/instance/default-information-originate * XPath: /frr-isisd:isis/instance/default-information-originate
*/ */
DEFPY(isis_default_originate, isis_default_originate_cmd, DEFPY_YANG(isis_default_originate, isis_default_originate_cmd,
"[no] default-information originate <ipv4|ipv6>$ip <level-1|level-2>$level [always]$always [{metric (0-16777215)$metric|route-map WORD$rmap}]", "[no] default-information originate <ipv4|ipv6>$ip <level-1|level-2>$level [always]$always [{metric (0-16777215)$metric|route-map WORD$rmap}]",
NO_STR NO_STR
"Control distribution of default information\n" "Control distribution of default information\n"
@ -1219,7 +1219,7 @@ void cli_show_isis_def_origin_ipv6(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/redistribute * XPath: /frr-isisd:isis/instance/redistribute
*/ */
DEFPY(isis_redistribute, isis_redistribute_cmd, DEFPY_YANG(isis_redistribute, isis_redistribute_cmd,
"[no] redistribute <ipv4|ipv6>$ip " PROTO_REDIST_STR "[no] redistribute <ipv4|ipv6>$ip " PROTO_REDIST_STR
"$proto <level-1|level-2>$level [{metric (0-16777215)|route-map WORD}]", "$proto <level-1|level-2>$level [{metric (0-16777215)|route-map WORD}]",
NO_STR REDIST_STR NO_STR REDIST_STR
@ -1278,7 +1278,7 @@ void cli_show_isis_redistribute_ipv6(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/multi-topology * XPath: /frr-isisd:isis/instance/multi-topology
*/ */
DEFPY(isis_topology, isis_topology_cmd, DEFPY_YANG(isis_topology, isis_topology_cmd,
"[no] topology <ipv4-unicast|ipv4-mgmt|ipv6-unicast|ipv4-multicast|ipv6-multicast|ipv6-mgmt|ipv6-dstsrc>$topology [overload]$overload", "[no] topology <ipv4-unicast|ipv4-mgmt|ipv6-unicast|ipv4-multicast|ipv6-multicast|ipv6-mgmt|ipv6-dstsrc>$topology [overload]$overload",
NO_STR NO_STR
"Configure IS-IS topologies\n" "Configure IS-IS topologies\n"
@ -1379,7 +1379,7 @@ void cli_show_isis_mt_ipv6_dstsrc(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/segment-routing/enabled * XPath: /frr-isisd:isis/instance/segment-routing/enabled
*/ */
DEFPY (isis_sr_enable, DEFPY_YANG (isis_sr_enable,
isis_sr_enable_cmd, isis_sr_enable_cmd,
"segment-routing on", "segment-routing on",
SR_STR SR_STR
@ -1391,7 +1391,7 @@ DEFPY (isis_sr_enable,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY (no_isis_sr_enable, DEFPY_YANG (no_isis_sr_enable,
no_isis_sr_enable_cmd, no_isis_sr_enable_cmd,
"no segment-routing [on]", "no segment-routing [on]",
NO_STR NO_STR
@ -1416,7 +1416,7 @@ void cli_show_isis_sr_enabled(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/segment-routing/srgb * XPath: /frr-isisd:isis/instance/segment-routing/srgb
*/ */
DEFPY (isis_sr_global_block_label_range, DEFPY_YANG (isis_sr_global_block_label_range,
isis_sr_global_block_label_range_cmd, isis_sr_global_block_label_range_cmd,
"segment-routing global-block (16-1048575)$lower_bound (16-1048575)$upper_bound", "segment-routing global-block (16-1048575)$lower_bound (16-1048575)$upper_bound",
SR_STR SR_STR
@ -1432,7 +1432,7 @@ DEFPY (isis_sr_global_block_label_range,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY (no_isis_sr_global_block_label_range, DEFPY_YANG (no_isis_sr_global_block_label_range,
no_isis_sr_global_block_label_range_cmd, no_isis_sr_global_block_label_range_cmd,
"no segment-routing global-block [(16-1048575) (16-1048575)]", "no segment-routing global-block [(16-1048575) (16-1048575)]",
NO_STR NO_STR
@ -1460,7 +1460,7 @@ void cli_show_isis_srgb(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/segment-routing/srlb * XPath: /frr-isisd:isis/instance/segment-routing/srlb
*/ */
DEFPY (isis_sr_local_block_label_range, DEFPY_YANG (isis_sr_local_block_label_range,
isis_sr_local_block_label_range_cmd, isis_sr_local_block_label_range_cmd,
"segment-routing local-block (16-1048575)$lower_bound (16-1048575)$upper_bound", "segment-routing local-block (16-1048575)$lower_bound (16-1048575)$upper_bound",
SR_STR SR_STR
@ -1476,7 +1476,7 @@ DEFPY (isis_sr_local_block_label_range,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY (no_isis_sr_local_block_label_range, DEFPY_YANG (no_isis_sr_local_block_label_range,
no_isis_sr_local_block_label_range_cmd, no_isis_sr_local_block_label_range_cmd,
"no segment-routing local-block [(16-1048575) (16-1048575)]", "no segment-routing local-block [(16-1048575) (16-1048575)]",
NO_STR NO_STR
@ -1504,7 +1504,7 @@ void cli_show_isis_srlb(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/segment-routing/msd/node-msd * XPath: /frr-isisd:isis/instance/segment-routing/msd/node-msd
*/ */
DEFPY (isis_sr_node_msd, DEFPY_YANG (isis_sr_node_msd,
isis_sr_node_msd_cmd, isis_sr_node_msd_cmd,
"segment-routing node-msd (1-16)$msd", "segment-routing node-msd (1-16)$msd",
SR_STR SR_STR
@ -1517,7 +1517,7 @@ DEFPY (isis_sr_node_msd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY (no_isis_sr_node_msd, DEFPY_YANG (no_isis_sr_node_msd,
no_isis_sr_node_msd_cmd, no_isis_sr_node_msd_cmd,
"no segment-routing node-msd [(1-16)]", "no segment-routing node-msd [(1-16)]",
NO_STR NO_STR
@ -1541,7 +1541,7 @@ void cli_show_isis_node_msd(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/segment-routing/prefix-sid-map/prefix-sid * XPath: /frr-isisd:isis/instance/segment-routing/prefix-sid-map/prefix-sid
*/ */
DEFPY (isis_sr_prefix_sid, DEFPY_YANG (isis_sr_prefix_sid,
isis_sr_prefix_sid_cmd, isis_sr_prefix_sid_cmd,
"segment-routing prefix\ "segment-routing prefix\
<A.B.C.D/M|X:X::X:X/M>$prefix\ <A.B.C.D/M|X:X::X:X/M>$prefix\
@ -1580,7 +1580,7 @@ DEFPY (isis_sr_prefix_sid,
prefix_str); prefix_str);
} }
DEFPY (no_isis_sr_prefix_sid, DEFPY_YANG (no_isis_sr_prefix_sid,
no_isis_sr_prefix_sid_cmd, no_isis_sr_prefix_sid_cmd,
"no segment-routing prefix <A.B.C.D/M|X:X::X:X/M>$prefix\ "no segment-routing prefix <A.B.C.D/M|X:X::X:X/M>$prefix\
[<absolute$sid_type (16-1048575)|index (0-65535)> [<no-php-flag|explicit-null>]]", [<absolute$sid_type (16-1048575)|index (0-65535)> [<no-php-flag|explicit-null>]]",
@ -1632,7 +1632,7 @@ void cli_show_isis_prefix_sid(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/passive * XPath: /frr-interface:lib/interface/frr-isisd:isis/passive
*/ */
DEFPY(isis_passive, isis_passive_cmd, "[no] isis passive", DEFPY_YANG(isis_passive, isis_passive_cmd, "[no] isis passive",
NO_STR NO_STR
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
"Configure the passive mode for interface\n") "Configure the passive mode for interface\n")
@ -1655,7 +1655,7 @@ void cli_show_ip_isis_passive(struct vty *vty, struct lyd_node *dnode,
* XPath: /frr-interface:lib/interface/frr-isisd:isis/password * XPath: /frr-interface:lib/interface/frr-isisd:isis/password
*/ */
DEFPY(isis_passwd, isis_passwd_cmd, "isis password <md5|clear>$type WORD$pwd", DEFPY_YANG(isis_passwd, isis_passwd_cmd, "isis password <md5|clear>$type WORD$pwd",
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
"Configure the authentication password for a circuit\n" "Configure the authentication password for a circuit\n"
"HMAC-MD5 authentication\n" "HMAC-MD5 authentication\n"
@ -1672,7 +1672,7 @@ DEFPY(isis_passwd, isis_passwd_cmd, "isis password <md5|clear>$type WORD$pwd",
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_isis_passwd, no_isis_passwd_cmd, "no isis password [<md5|clear> WORD]", DEFPY_YANG(no_isis_passwd, no_isis_passwd_cmd, "no isis password [<md5|clear> WORD]",
NO_STR NO_STR
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
"Configure the authentication password for a circuit\n" "Configure the authentication password for a circuit\n"
@ -1697,7 +1697,7 @@ void cli_show_ip_isis_password(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/metric * XPath: /frr-interface:lib/interface/frr-isisd:isis/metric
*/ */
DEFPY(isis_metric, isis_metric_cmd, DEFPY_YANG(isis_metric, isis_metric_cmd,
"isis metric [level-1|level-2]$level (0-16777215)$met", "isis metric [level-1|level-2]$level (0-16777215)$met",
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
"Set default metric for circuit\n" "Set default metric for circuit\n"
@ -1715,7 +1715,7 @@ DEFPY(isis_metric, isis_metric_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_isis_metric, no_isis_metric_cmd, DEFPY_YANG(no_isis_metric, no_isis_metric_cmd,
"no isis metric [level-1|level-2]$level [(0-16777215)]", "no isis metric [level-1|level-2]$level [(0-16777215)]",
NO_STR NO_STR
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
@ -1751,7 +1751,7 @@ void cli_show_ip_isis_metric(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/interval * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/interval
*/ */
DEFPY(isis_hello_interval, isis_hello_interval_cmd, DEFPY_YANG(isis_hello_interval, isis_hello_interval_cmd,
"isis hello-interval [level-1|level-2]$level (1-600)$intv", "isis hello-interval [level-1|level-2]$level (1-600)$intv",
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
"Set Hello interval\n" "Set Hello interval\n"
@ -1771,7 +1771,7 @@ DEFPY(isis_hello_interval, isis_hello_interval_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_isis_hello_interval, no_isis_hello_interval_cmd, DEFPY_YANG(no_isis_hello_interval, no_isis_hello_interval_cmd,
"no isis hello-interval [level-1|level-2]$level [(1-600)]", "no isis hello-interval [level-1|level-2]$level [(1-600)]",
NO_STR NO_STR
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
@ -1809,7 +1809,7 @@ void cli_show_ip_isis_hello_interval(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/multiplier * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/multiplier
*/ */
DEFPY(isis_hello_multiplier, isis_hello_multiplier_cmd, DEFPY_YANG(isis_hello_multiplier, isis_hello_multiplier_cmd,
"isis hello-multiplier [level-1|level-2]$level (2-100)$mult", "isis hello-multiplier [level-1|level-2]$level (2-100)$mult",
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
"Set multiplier for Hello holding time\n" "Set multiplier for Hello holding time\n"
@ -1829,7 +1829,7 @@ DEFPY(isis_hello_multiplier, isis_hello_multiplier_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_isis_hello_multiplier, no_isis_hello_multiplier_cmd, DEFPY_YANG(no_isis_hello_multiplier, no_isis_hello_multiplier_cmd,
"no isis hello-multiplier [level-1|level-2]$level [(2-100)]", "no isis hello-multiplier [level-1|level-2]$level [(2-100)]",
NO_STR NO_STR
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
@ -1868,7 +1868,7 @@ void cli_show_ip_isis_hello_multi(struct vty *vty, struct lyd_node *dnode,
* XPath: * XPath:
* /frr-interface:lib/interface/frr-isisd:isis/disable-three-way-handshake * /frr-interface:lib/interface/frr-isisd:isis/disable-three-way-handshake
*/ */
DEFPY(isis_threeway_adj, isis_threeway_adj_cmd, "[no] isis three-way-handshake", DEFPY_YANG(isis_threeway_adj, isis_threeway_adj_cmd, "[no] isis three-way-handshake",
NO_STR NO_STR
"IS-IS commands\n" "IS-IS commands\n"
"Enable/Disable three-way handshake\n") "Enable/Disable three-way handshake\n")
@ -1891,7 +1891,7 @@ void cli_show_ip_isis_threeway_shake(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/padding * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/padding
*/ */
DEFPY(isis_hello_padding, isis_hello_padding_cmd, "[no] isis hello padding", DEFPY_YANG(isis_hello_padding, isis_hello_padding_cmd, "[no] isis hello padding",
NO_STR NO_STR
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
"Add padding to IS-IS hello packets\n" "Add padding to IS-IS hello packets\n"
@ -1915,7 +1915,7 @@ void cli_show_ip_isis_hello_padding(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/csnp-interval * XPath: /frr-interface:lib/interface/frr-isisd:isis/csnp-interval
*/ */
DEFPY(csnp_interval, csnp_interval_cmd, DEFPY_YANG(csnp_interval, csnp_interval_cmd,
"isis csnp-interval (1-600)$intv [level-1|level-2]$level", "isis csnp-interval (1-600)$intv [level-1|level-2]$level",
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
"Set CSNP interval in seconds\n" "Set CSNP interval in seconds\n"
@ -1935,7 +1935,7 @@ DEFPY(csnp_interval, csnp_interval_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_csnp_interval, no_csnp_interval_cmd, DEFPY_YANG(no_csnp_interval, no_csnp_interval_cmd,
"no isis csnp-interval [(1-600)] [level-1|level-2]$level", "no isis csnp-interval [(1-600)] [level-1|level-2]$level",
NO_STR NO_STR
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
@ -1973,7 +1973,7 @@ void cli_show_ip_isis_csnp_interval(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/psnp-interval * XPath: /frr-interface:lib/interface/frr-isisd:isis/psnp-interval
*/ */
DEFPY(psnp_interval, psnp_interval_cmd, DEFPY_YANG(psnp_interval, psnp_interval_cmd,
"isis psnp-interval (1-120)$intv [level-1|level-2]$level", "isis psnp-interval (1-120)$intv [level-1|level-2]$level",
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
"Set PSNP interval in seconds\n" "Set PSNP interval in seconds\n"
@ -1993,7 +1993,7 @@ DEFPY(psnp_interval, psnp_interval_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_psnp_interval, no_psnp_interval_cmd, DEFPY_YANG(no_psnp_interval, no_psnp_interval_cmd,
"no isis psnp-interval [(1-120)] [level-1|level-2]$level", "no isis psnp-interval [(1-120)] [level-1|level-2]$level",
NO_STR NO_STR
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
@ -2031,7 +2031,7 @@ void cli_show_ip_isis_psnp_interval(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/multi-topology * XPath: /frr-interface:lib/interface/frr-isisd:isis/multi-topology
*/ */
DEFPY(circuit_topology, circuit_topology_cmd, DEFPY_YANG(circuit_topology, circuit_topology_cmd,
"[no] isis topology<ipv4-unicast|ipv4-mgmt|ipv6-unicast|ipv4-multicast|ipv6-multicast|ipv6-mgmt|ipv6-dstsrc>$topology", "[no] isis topology<ipv4-unicast|ipv4-mgmt|ipv6-unicast|ipv4-multicast|ipv6-multicast|ipv6-mgmt|ipv6-dstsrc>$topology",
NO_STR NO_STR
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
@ -2116,7 +2116,7 @@ void cli_show_ip_isis_mt_ipv6_dstsrc(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/circuit-type * XPath: /frr-interface:lib/interface/frr-isisd:isis/circuit-type
*/ */
DEFPY(isis_circuit_type, isis_circuit_type_cmd, DEFPY_YANG(isis_circuit_type, isis_circuit_type_cmd,
"isis circuit-type <level-1|level-1-2|level-2-only>$type", "isis circuit-type <level-1|level-1-2|level-2-only>$type",
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
"Configure circuit type for interface\n" "Configure circuit type for interface\n"
@ -2131,7 +2131,7 @@ DEFPY(isis_circuit_type, isis_circuit_type_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_isis_circuit_type, no_isis_circuit_type_cmd, DEFPY_YANG(no_isis_circuit_type, no_isis_circuit_type_cmd,
"no isis circuit-type [level-1|level-1-2|level-2-only]", "no isis circuit-type [level-1|level-1-2|level-2-only]",
NO_STR NO_STR
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
@ -2209,7 +2209,7 @@ void cli_show_ip_isis_circ_type(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/network-type * XPath: /frr-interface:lib/interface/frr-isisd:isis/network-type
*/ */
DEFPY(isis_network, isis_network_cmd, "[no] isis network point-to-point", DEFPY_YANG(isis_network, isis_network_cmd, "[no] isis network point-to-point",
NO_STR NO_STR
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
"Set network type\n" "Set network type\n"
@ -2234,7 +2234,7 @@ void cli_show_ip_isis_network_type(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/priority * XPath: /frr-interface:lib/interface/frr-isisd:isis/priority
*/ */
DEFPY(isis_priority, isis_priority_cmd, DEFPY_YANG(isis_priority, isis_priority_cmd,
"isis priority (0-127)$prio [level-1|level-2]$level", "isis priority (0-127)$prio [level-1|level-2]$level",
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
"Set priority for Designated Router election\n" "Set priority for Designated Router election\n"
@ -2252,7 +2252,7 @@ DEFPY(isis_priority, isis_priority_cmd,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY(no_isis_priority, no_isis_priority_cmd, DEFPY_YANG(no_isis_priority, no_isis_priority_cmd,
"no isis priority [(0-127)] [level-1|level-2]$level", "no isis priority [(0-127)] [level-1|level-2]$level",
NO_STR NO_STR
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
@ -2288,7 +2288,7 @@ void cli_show_ip_isis_priority(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-isisd:isis/instance/log-adjacency-changes * XPath: /frr-isisd:isis/instance/log-adjacency-changes
*/ */
DEFPY(log_adj_changes, log_adj_changes_cmd, "[no] log-adjacency-changes", DEFPY_YANG(log_adj_changes, log_adj_changes_cmd, "[no] log-adjacency-changes",
NO_STR "Log changes in adjacency state\n") NO_STR "Log changes in adjacency state\n")
{ {
nb_cli_enqueue_change(vty, "./log-adjacency-changes", NB_OP_MODIFY, nb_cli_enqueue_change(vty, "./log-adjacency-changes", NB_OP_MODIFY,

View File

@ -904,6 +904,13 @@ static int cmd_execute_command_real(vector vline, enum cmd_filter_type filter,
> vty->candidate_config->version) > vty->candidate_config->version)
nb_config_replace(vty->candidate_config, nb_config_replace(vty->candidate_config,
running_config, true); running_config, true);
/*
* Perform pending commit (if any) before executing
* non-YANG command.
*/
if (matched_element->attr != CMD_ATTR_YANG)
nb_cli_pending_commit_check(vty);
} }
ret = matched_element->func(matched_element, vty, argc, argv); ret = matched_element->func(matched_element, vty, argc, argv);

View File

@ -257,6 +257,12 @@ struct cmd_node {
#define DEFPY_HIDDEN(funcname, cmdname, cmdstr, helpstr) \ #define DEFPY_HIDDEN(funcname, cmdname, cmdstr, helpstr) \
DEFPY_ATTR(funcname, cmdname, cmdstr, helpstr, CMD_ATTR_HIDDEN) DEFPY_ATTR(funcname, cmdname, cmdstr, helpstr, CMD_ATTR_HIDDEN)
#define DEFPY_YANG(funcname, cmdname, cmdstr, helpstr) \
DEFPY_ATTR(funcname, cmdname, cmdstr, helpstr, CMD_ATTR_YANG)
#define DEFPY_YANG_NOSH(funcname, cmdname, cmdstr, helpstr) \
DEFPY_YANG(funcname, cmdname, cmdstr, helpstr)
#define DEFUN(funcname, cmdname, cmdstr, helpstr) \ #define DEFUN(funcname, cmdname, cmdstr, helpstr) \
DEFUN_CMD_FUNC_DECL(funcname) \ DEFUN_CMD_FUNC_DECL(funcname) \
DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, 0, 0) \ DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, 0, 0) \
@ -270,10 +276,16 @@ struct cmd_node {
#define DEFUN_HIDDEN(funcname, cmdname, cmdstr, helpstr) \ #define DEFUN_HIDDEN(funcname, cmdname, cmdstr, helpstr) \
DEFUN_ATTR(funcname, cmdname, cmdstr, helpstr, CMD_ATTR_HIDDEN) DEFUN_ATTR(funcname, cmdname, cmdstr, helpstr, CMD_ATTR_HIDDEN)
#define DEFUN_YANG(funcname, cmdname, cmdstr, helpstr) \
DEFUN_ATTR(funcname, cmdname, cmdstr, helpstr, CMD_ATTR_YANG)
/* DEFUN_NOSH for commands that vtysh should ignore */ /* DEFUN_NOSH for commands that vtysh should ignore */
#define DEFUN_NOSH(funcname, cmdname, cmdstr, helpstr) \ #define DEFUN_NOSH(funcname, cmdname, cmdstr, helpstr) \
DEFUN(funcname, cmdname, cmdstr, helpstr) DEFUN(funcname, cmdname, cmdstr, helpstr)
#define DEFUN_YANG_NOSH(funcname, cmdname, cmdstr, helpstr) \
DEFUN_YANG(funcname, cmdname, cmdstr, helpstr)
/* DEFSH for vtysh. */ /* DEFSH for vtysh. */
#define DEFSH(daemon, cmdname, cmdstr, helpstr) \ #define DEFSH(daemon, cmdname, cmdstr, helpstr) \
DEFUN_CMD_ELEMENT(NULL, cmdname, cmdstr, helpstr, 0, daemon) DEFUN_CMD_ELEMENT(NULL, cmdname, cmdstr, helpstr, 0, daemon)
@ -282,6 +294,9 @@ struct cmd_node {
DEFUN_CMD_ELEMENT(NULL, cmdname, cmdstr, helpstr, CMD_ATTR_HIDDEN, \ DEFUN_CMD_ELEMENT(NULL, cmdname, cmdstr, helpstr, CMD_ATTR_HIDDEN, \
daemon) daemon)
#define DEFSH_YANG(daemon, cmdname, cmdstr, helpstr) \
DEFUN_CMD_ELEMENT(NULL, cmdname, cmdstr, helpstr, CMD_ATTR_YANG, daemon)
/* DEFUN + DEFSH */ /* DEFUN + DEFSH */
#define DEFUNSH(daemon, funcname, cmdname, cmdstr, helpstr) \ #define DEFUNSH(daemon, funcname, cmdname, cmdstr, helpstr) \
DEFUN_CMD_FUNC_DECL(funcname) \ DEFUN_CMD_FUNC_DECL(funcname) \
@ -302,6 +317,9 @@ struct cmd_node {
DEFUNSH_ATTR(daemon, funcname, cmdname, cmdstr, helpstr, \ DEFUNSH_ATTR(daemon, funcname, cmdname, cmdstr, helpstr, \
CMD_ATTR_DEPRECATED) CMD_ATTR_DEPRECATED)
#define DEFUNSH_YANG(daemon, funcname, cmdname, cmdstr, helpstr) \
DEFUNSH_ATTR(daemon, funcname, cmdname, cmdstr, helpstr, CMD_ATTR_YANG)
/* ALIAS macro which define existing command's alias. */ /* ALIAS macro which define existing command's alias. */
#define ALIAS(funcname, cmdname, cmdstr, helpstr) \ #define ALIAS(funcname, cmdname, cmdstr, helpstr) \
DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, 0, 0) DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, 0, 0)
@ -317,6 +335,9 @@ struct cmd_node {
DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, \ DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, \
CMD_ATTR_DEPRECATED, 0) CMD_ATTR_DEPRECATED, 0)
#define ALIAS_YANG(funcname, cmdname, cmdstr, helpstr) \
DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, CMD_ATTR_YANG, 0)
#define ALIAS_SH(daemon, funcname, cmdname, cmdstr, helpstr) \ #define ALIAS_SH(daemon, funcname, cmdname, cmdstr, helpstr) \
DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, 0, daemon) DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, 0, daemon)

View File

@ -74,6 +74,7 @@ enum cmd_token_type {
enum { CMD_ATTR_NORMAL, enum { CMD_ATTR_NORMAL,
CMD_ATTR_DEPRECATED, CMD_ATTR_DEPRECATED,
CMD_ATTR_HIDDEN, CMD_ATTR_HIDDEN,
CMD_ATTR_YANG,
}; };
/* Comamand token struct. */ /* Comamand token struct. */

View File

@ -140,6 +140,8 @@ SPECIAL [(),]
"DEFPY_NOSH" value = strdup(yytext); return DEFUNNY; "DEFPY_NOSH" value = strdup(yytext); return DEFUNNY;
"DEFPY_ATTR" value = strdup(yytext); return DEFUNNY; "DEFPY_ATTR" value = strdup(yytext); return DEFUNNY;
"DEFPY_HIDDEN" value = strdup(yytext); return DEFUNNY; "DEFPY_HIDDEN" value = strdup(yytext); return DEFUNNY;
"DEFPY_YANG" value = strdup(yytext); return DEFUNNY;
"DEFPY_YANG_NOSH" value = strdup(yytext); return DEFUNNY;
"ALIAS" value = strdup(yytext); return DEFUNNY; "ALIAS" value = strdup(yytext); return DEFUNNY;
"ALIAS_HIDDEN" value = strdup(yytext); return DEFUNNY; "ALIAS_HIDDEN" value = strdup(yytext); return DEFUNNY;
"install_element" value = strdup(yytext); return INSTALL; "install_element" value = strdup(yytext); return INSTALL;

View File

@ -169,7 +169,7 @@ static long acl_get_seq(struct vty *vty, const char *xpath)
/* /*
* Cisco (legacy) access lists. * Cisco (legacy) access lists.
*/ */
DEFPY( DEFPY_YANG(
access_list_std, access_list_std_cmd, access_list_std, access_list_std_cmd,
"access-list <(1-99)|(1300-1999)>$number [seq (1-4294967295)$seq] <deny|permit>$action <[host] A.B.C.D$host|A.B.C.D$host A.B.C.D$mask|any>", "access-list <(1-99)|(1300-1999)>$number [seq (1-4294967295)$seq] <deny|permit>$action <[host] A.B.C.D$host|A.B.C.D$host A.B.C.D$mask|any>",
ACCESS_LIST_STR ACCESS_LIST_STR
@ -220,7 +220,7 @@ DEFPY(
return nb_cli_apply_changes(vty, xpath_entry); return nb_cli_apply_changes(vty, xpath_entry);
} }
DEFPY( DEFPY_YANG(
no_access_list_std, no_access_list_std_cmd, no_access_list_std, no_access_list_std_cmd,
"no access-list <(1-99)|(1300-1999)>$number [seq (1-4294967295)$seq] <deny|permit>$action <[host] A.B.C.D$host|A.B.C.D$host A.B.C.D$mask|any>", "no access-list <(1-99)|(1300-1999)>$number [seq (1-4294967295)$seq] <deny|permit>$action <[host] A.B.C.D$host|A.B.C.D$host A.B.C.D$mask|any>",
NO_STR NO_STR
@ -280,7 +280,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
access_list_ext, access_list_ext_cmd, access_list_ext, access_list_ext_cmd,
"access-list <(100-199)|(2000-2699)>$number [seq (1-4294967295)$seq] <deny|permit>$action ip <A.B.C.D$src A.B.C.D$src_mask|host A.B.C.D$src|any> <A.B.C.D$dst A.B.C.D$dst_mask|host A.B.C.D$dst|any>", "access-list <(100-199)|(2000-2699)>$number [seq (1-4294967295)$seq] <deny|permit>$action ip <A.B.C.D$src A.B.C.D$src_mask|host A.B.C.D$src|any> <A.B.C.D$dst A.B.C.D$dst_mask|host A.B.C.D$dst|any>",
ACCESS_LIST_STR ACCESS_LIST_STR
@ -351,7 +351,7 @@ DEFPY(
return nb_cli_apply_changes(vty, xpath_entry); return nb_cli_apply_changes(vty, xpath_entry);
} }
DEFPY( DEFPY_YANG(
no_access_list_ext, no_access_list_ext_cmd, no_access_list_ext, no_access_list_ext_cmd,
"no access-list <(100-199)|(2000-2699)>$number [seq (1-4294967295)$seq] <deny|permit>$action ip <A.B.C.D$src A.B.C.D$src_mask|host A.B.C.D$src|any> <A.B.C.D$dst A.B.C.D$dst_mask|host A.B.C.D$dst|any>", "no access-list <(100-199)|(2000-2699)>$number [seq (1-4294967295)$seq] <deny|permit>$action ip <A.B.C.D$src A.B.C.D$src_mask|host A.B.C.D$src|any> <A.B.C.D$dst A.B.C.D$dst_mask|host A.B.C.D$dst|any>",
NO_STR NO_STR
@ -436,7 +436,7 @@ DEFPY(
/* /*
* Zebra access lists. * Zebra access lists.
*/ */
DEFPY( DEFPY_YANG(
access_list, access_list_cmd, access_list, access_list_cmd,
"access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <A.B.C.D/M$prefix [exact-match$exact]|any>", "access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <A.B.C.D/M$prefix [exact-match$exact]|any>",
ACCESS_LIST_STR ACCESS_LIST_STR
@ -482,7 +482,7 @@ DEFPY(
return nb_cli_apply_changes(vty, xpath_entry); return nb_cli_apply_changes(vty, xpath_entry);
} }
DEFPY( DEFPY_YANG(
no_access_list, no_access_list_cmd, no_access_list, no_access_list_cmd,
"no access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <A.B.C.D/M$prefix [exact-match$exact]|any>", "no access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <A.B.C.D/M$prefix [exact-match$exact]|any>",
NO_STR NO_STR
@ -539,7 +539,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_access_list_all, no_access_list_all_cmd, no_access_list_all, no_access_list_all_cmd,
"no access-list WORD$name", "no access-list WORD$name",
NO_STR NO_STR
@ -555,7 +555,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
access_list_remark, access_list_remark_cmd, access_list_remark, access_list_remark_cmd,
"access-list WORD$name remark LINE...", "access-list WORD$name remark LINE...",
ACCESS_LIST_STR ACCESS_LIST_STR
@ -579,7 +579,7 @@ DEFPY(
return rv; return rv;
} }
DEFPY( DEFPY_YANG(
no_access_list_remark, no_access_list_remark_cmd, no_access_list_remark, no_access_list_remark_cmd,
"no access-list WORD$name remark", "no access-list WORD$name remark",
NO_STR NO_STR
@ -606,7 +606,7 @@ ALIAS(
ACCESS_LIST_REMARK_STR ACCESS_LIST_REMARK_STR
ACCESS_LIST_REMARK_LINE_STR) ACCESS_LIST_REMARK_LINE_STR)
DEFPY( DEFPY_YANG(
ipv6_access_list, ipv6_access_list_cmd, ipv6_access_list, ipv6_access_list_cmd,
"ipv6 access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <X:X::X:X/M$prefix [exact-match$exact]|any>", "ipv6 access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <X:X::X:X/M$prefix [exact-match$exact]|any>",
IPV6_STR IPV6_STR
@ -653,7 +653,7 @@ DEFPY(
return nb_cli_apply_changes(vty, xpath_entry); return nb_cli_apply_changes(vty, xpath_entry);
} }
DEFPY( DEFPY_YANG(
no_ipv6_access_list, no_ipv6_access_list_cmd, no_ipv6_access_list, no_ipv6_access_list_cmd,
"no ipv6 access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <X:X::X:X/M$prefix [exact-match$exact]|any>", "no ipv6 access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <X:X::X:X/M$prefix [exact-match$exact]|any>",
NO_STR NO_STR
@ -711,7 +711,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_ipv6_access_list_all, no_ipv6_access_list_all_cmd, no_ipv6_access_list_all, no_ipv6_access_list_all_cmd,
"no ipv6 access-list WORD$name", "no ipv6 access-list WORD$name",
NO_STR NO_STR
@ -728,7 +728,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
ipv6_access_list_remark, ipv6_access_list_remark_cmd, ipv6_access_list_remark, ipv6_access_list_remark_cmd,
"ipv6 access-list WORD$name remark LINE...", "ipv6 access-list WORD$name remark LINE...",
IPV6_STR IPV6_STR
@ -753,7 +753,7 @@ DEFPY(
return rv; return rv;
} }
DEFPY( DEFPY_YANG(
no_ipv6_access_list_remark, no_ipv6_access_list_remark_cmd, no_ipv6_access_list_remark, no_ipv6_access_list_remark_cmd,
"no ipv6 access-list WORD$name remark", "no ipv6 access-list WORD$name remark",
NO_STR NO_STR
@ -782,7 +782,7 @@ ALIAS(
ACCESS_LIST_REMARK_STR ACCESS_LIST_REMARK_STR
ACCESS_LIST_REMARK_LINE_STR) ACCESS_LIST_REMARK_LINE_STR)
DEFPY( DEFPY_YANG(
mac_access_list, mac_access_list_cmd, mac_access_list, mac_access_list_cmd,
"mac access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <X:X:X:X:X:X$mac|any>", "mac access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <X:X:X:X:X:X$mac|any>",
MAC_STR MAC_STR
@ -825,7 +825,7 @@ DEFPY(
return nb_cli_apply_changes(vty, xpath_entry); return nb_cli_apply_changes(vty, xpath_entry);
} }
DEFPY( DEFPY_YANG(
no_mac_access_list, no_mac_access_list_cmd, no_mac_access_list, no_mac_access_list_cmd,
"no mac access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <X:X:X:X:X:X$prefix|any>", "no mac access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <X:X:X:X:X:X$prefix|any>",
NO_STR NO_STR
@ -882,7 +882,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_mac_access_list_all, no_mac_access_list_all_cmd, no_mac_access_list_all, no_mac_access_list_all_cmd,
"no mac access-list WORD$name", "no mac access-list WORD$name",
NO_STR NO_STR
@ -899,7 +899,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
mac_access_list_remark, mac_access_list_remark_cmd, mac_access_list_remark, mac_access_list_remark_cmd,
"mac access-list WORD$name remark LINE...", "mac access-list WORD$name remark LINE...",
MAC_STR MAC_STR
@ -924,7 +924,7 @@ DEFPY(
return rv; return rv;
} }
DEFPY( DEFPY_YANG(
no_mac_access_list_remark, no_mac_access_list_remark_cmd, no_mac_access_list_remark, no_mac_access_list_remark_cmd,
"no mac access-list WORD$name remark", "no mac access-list WORD$name remark",
NO_STR NO_STR
@ -1182,7 +1182,7 @@ static int plist_remove(struct vty *vty, const char *iptype, const char *name,
return rv; return rv;
} }
DEFPY( DEFPY_YANG(
ip_prefix_list, ip_prefix_list_cmd, ip_prefix_list, ip_prefix_list_cmd,
"ip prefix-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <any|A.B.C.D/M$prefix [{ge (0-32)$ge|le (0-32)$le}]>", "ip prefix-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <any|A.B.C.D/M$prefix [{ge (0-32)$ge|le (0-32)$le}]>",
IP_STR IP_STR
@ -1239,7 +1239,7 @@ DEFPY(
return nb_cli_apply_changes(vty, xpath_entry); return nb_cli_apply_changes(vty, xpath_entry);
} }
DEFPY( DEFPY_YANG(
no_ip_prefix_list, no_ip_prefix_list_cmd, no_ip_prefix_list, no_ip_prefix_list_cmd,
"no ip prefix-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <any|A.B.C.D/M$prefix [{ge (0-32)|le (0-32)}]>", "no ip prefix-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <any|A.B.C.D/M$prefix [{ge (0-32)|le (0-32)}]>",
NO_STR NO_STR
@ -1259,7 +1259,7 @@ DEFPY(
(struct prefix *)prefix, ge, le); (struct prefix *)prefix, ge, le);
} }
DEFPY( DEFPY_YANG(
no_ip_prefix_list_seq, no_ip_prefix_list_seq_cmd, no_ip_prefix_list_seq, no_ip_prefix_list_seq_cmd,
"no ip prefix-list WORD$name seq (1-4294967295)$seq", "no ip prefix-list WORD$name seq (1-4294967295)$seq",
NO_STR NO_STR
@ -1271,7 +1271,7 @@ DEFPY(
return plist_remove(vty, "ipv4", name, seq_str, NULL, NULL, 0, 0); return plist_remove(vty, "ipv4", name, seq_str, NULL, NULL, 0, 0);
} }
DEFPY( DEFPY_YANG(
no_ip_prefix_list_all, no_ip_prefix_list_all_cmd, no_ip_prefix_list_all, no_ip_prefix_list_all_cmd,
"no ip prefix-list WORD$name", "no ip prefix-list WORD$name",
NO_STR NO_STR
@ -1288,7 +1288,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
ip_prefix_list_remark, ip_prefix_list_remark_cmd, ip_prefix_list_remark, ip_prefix_list_remark_cmd,
"ip prefix-list WORD$name description LINE...", "ip prefix-list WORD$name description LINE...",
IP_STR IP_STR
@ -1313,7 +1313,7 @@ DEFPY(
return rv; return rv;
} }
DEFPY( DEFPY_YANG(
no_ip_prefix_list_remark, no_ip_prefix_list_remark_cmd, no_ip_prefix_list_remark, no_ip_prefix_list_remark_cmd,
"no ip prefix-list WORD$name description", "no ip prefix-list WORD$name description",
NO_STR NO_STR
@ -1342,7 +1342,7 @@ ALIAS(
ACCESS_LIST_REMARK_STR ACCESS_LIST_REMARK_STR
ACCESS_LIST_REMARK_LINE_STR) ACCESS_LIST_REMARK_LINE_STR)
DEFPY( DEFPY_YANG(
ipv6_prefix_list, ipv6_prefix_list_cmd, ipv6_prefix_list, ipv6_prefix_list_cmd,
"ipv6 prefix-list WORD$name [seq (1-4294967295)] <deny|permit>$action <any|X:X::X:X/M$prefix [{ge (0-128)$ge|le (0-128)$le}]>", "ipv6 prefix-list WORD$name [seq (1-4294967295)] <deny|permit>$action <any|X:X::X:X/M$prefix [{ge (0-128)$ge|le (0-128)$le}]>",
IPV6_STR IPV6_STR
@ -1399,7 +1399,7 @@ DEFPY(
return nb_cli_apply_changes(vty, xpath_entry); return nb_cli_apply_changes(vty, xpath_entry);
} }
DEFPY( DEFPY_YANG(
no_ipv6_prefix_list, no_ipv6_prefix_list_cmd, no_ipv6_prefix_list, no_ipv6_prefix_list_cmd,
"no ipv6 prefix-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <any|X:X::X:X/M$prefix [{ge (0-128)$ge|le (0-128)$le}]>", "no ipv6 prefix-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <any|X:X::X:X/M$prefix [{ge (0-128)$ge|le (0-128)$le}]>",
NO_STR NO_STR
@ -1419,7 +1419,7 @@ DEFPY(
(struct prefix *)prefix, ge, le); (struct prefix *)prefix, ge, le);
} }
DEFPY( DEFPY_YANG(
no_ipv6_prefix_list_seq, no_ipv6_prefix_list_seq_cmd, no_ipv6_prefix_list_seq, no_ipv6_prefix_list_seq_cmd,
"no ipv6 prefix-list WORD$name seq (1-4294967295)$seq", "no ipv6 prefix-list WORD$name seq (1-4294967295)$seq",
NO_STR NO_STR
@ -1431,7 +1431,7 @@ DEFPY(
return plist_remove(vty, "ipv6", name, seq_str, NULL, NULL, 0, 0); return plist_remove(vty, "ipv6", name, seq_str, NULL, NULL, 0, 0);
} }
DEFPY( DEFPY_YANG(
no_ipv6_prefix_list_all, no_ipv6_prefix_list_all_cmd, no_ipv6_prefix_list_all, no_ipv6_prefix_list_all_cmd,
"no ipv6 prefix-list WORD$name", "no ipv6 prefix-list WORD$name",
NO_STR NO_STR
@ -1448,7 +1448,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
ipv6_prefix_list_remark, ipv6_prefix_list_remark_cmd, ipv6_prefix_list_remark, ipv6_prefix_list_remark_cmd,
"ipv6 prefix-list WORD$name description LINE...", "ipv6 prefix-list WORD$name description LINE...",
IPV6_STR IPV6_STR
@ -1473,7 +1473,7 @@ DEFPY(
return rv; return rv;
} }
DEFPY( DEFPY_YANG(
no_ipv6_prefix_list_remark, no_ipv6_prefix_list_remark_cmd, no_ipv6_prefix_list_remark, no_ipv6_prefix_list_remark_cmd,
"no ipv6 prefix-list WORD$name description", "no ipv6 prefix-list WORD$name description",
NO_STR NO_STR

View File

@ -1321,7 +1321,7 @@ void if_link_params_free(struct interface *ifp)
/* /*
* XPath: /frr-interface:lib/interface * XPath: /frr-interface:lib/interface
*/ */
DEFPY_NOSH (interface, DEFPY_YANG_NOSH (interface,
interface_cmd, interface_cmd,
"interface IFNAME [vrf NAME$vrf_name]", "interface IFNAME [vrf NAME$vrf_name]",
"Select an interface to configure\n" "Select an interface to configure\n"
@ -1384,6 +1384,7 @@ DEFPY_NOSH (interface,
* all interface-level commands are converted to the new * all interface-level commands are converted to the new
* northbound model. * northbound model.
*/ */
nb_cli_pending_commit_check(vty);
ifp = if_lookup_by_name(ifname, vrf_id); ifp = if_lookup_by_name(ifname, vrf_id);
if (ifp) if (ifp)
VTY_PUSH_CONTEXT(INTERFACE_NODE, ifp); VTY_PUSH_CONTEXT(INTERFACE_NODE, ifp);
@ -1392,7 +1393,7 @@ DEFPY_NOSH (interface,
return ret; return ret;
} }
DEFPY (no_interface, DEFPY_YANG (no_interface,
no_interface_cmd, no_interface_cmd,
"no interface IFNAME [vrf NAME$vrf_name]", "no interface IFNAME [vrf NAME$vrf_name]",
NO_STR NO_STR
@ -1427,7 +1428,7 @@ static void cli_show_interface(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/description * XPath: /frr-interface:lib/interface/description
*/ */
DEFPY (interface_desc, DEFPY_YANG (interface_desc,
interface_desc_cmd, interface_desc_cmd,
"description LINE...", "description LINE...",
"Interface specific description\n" "Interface specific description\n"
@ -1444,7 +1445,7 @@ DEFPY (interface_desc,
return ret; return ret;
} }
DEFPY (no_interface_desc, DEFPY_YANG (no_interface_desc,
no_interface_desc_cmd, no_interface_desc_cmd,
"no description", "no description",
NO_STR NO_STR

View File

@ -53,6 +53,106 @@ static void vty_show_nb_errors(struct vty *vty, int error, const char *errmsg)
vty_out(vty, "Error description: %s\n", errmsg); vty_out(vty, "Error description: %s\n", errmsg);
} }
static int nb_cli_classic_commit(struct vty *vty)
{
struct nb_context context = {};
char errmsg[BUFSIZ] = {0};
int ret;
context.client = NB_CLIENT_CLI;
context.user = vty;
ret = nb_candidate_commit(&context, vty->candidate_config, true, NULL,
NULL, errmsg, sizeof(errmsg));
if (ret != NB_OK && ret != NB_ERR_NO_CHANGES) {
vty_out(vty, "%% Configuration failed.\n\n");
vty_show_nb_errors(vty, ret, errmsg);
if (vty->t_pending_commit)
vty_out(vty,
"The following commands were dynamically grouped into the same transaction and rejected:\n%s",
vty->pending_cmds_buf);
/* Regenerate candidate for consistency. */
nb_config_replace(vty->candidate_config, running_config, true);
return CMD_WARNING_CONFIG_FAILED;
}
return CMD_SUCCESS;
}
static void nb_cli_pending_commit_clear(struct vty *vty)
{
THREAD_TIMER_OFF(vty->t_pending_commit);
vty->backoff_cmd_count = 0;
XFREE(MTYPE_TMP, vty->pending_cmds_buf);
vty->pending_cmds_buflen = 0;
vty->pending_cmds_bufpos = 0;
}
static int nb_cli_pending_commit_cb(struct thread *thread)
{
struct vty *vty = THREAD_ARG(thread);
(void)nb_cli_classic_commit(vty);
nb_cli_pending_commit_clear(vty);
return 0;
}
void nb_cli_pending_commit_check(struct vty *vty)
{
if (vty->t_pending_commit) {
(void)nb_cli_classic_commit(vty);
nb_cli_pending_commit_clear(vty);
}
}
static bool nb_cli_backoff_start(struct vty *vty)
{
struct timeval now, delta;
/*
* Start the configuration backoff timer only if 100 YANG-modeled
* commands or more were entered within the last second.
*/
monotime(&now);
if (monotime_since(&vty->backoff_start, &delta) >= 1000000) {
vty->backoff_start = now;
vty->backoff_cmd_count = 1;
return false;
}
if (++vty->backoff_cmd_count < 100)
return false;
return true;
}
static int nb_cli_schedule_command(struct vty *vty)
{
/* Append command to dynamically sized buffer of scheduled commands. */
if (!vty->pending_cmds_buf) {
vty->pending_cmds_buflen = 4096;
vty->pending_cmds_buf =
XCALLOC(MTYPE_TMP, vty->pending_cmds_buflen);
}
if ((strlen(vty->buf) + 3)
> (vty->pending_cmds_buflen - vty->pending_cmds_bufpos)) {
vty->pending_cmds_buflen *= 2;
vty->pending_cmds_buf =
XREALLOC(MTYPE_TMP, vty->pending_cmds_buf,
vty->pending_cmds_buflen);
}
strlcat(vty->pending_cmds_buf, "- ", vty->pending_cmds_buflen);
vty->pending_cmds_bufpos = strlcat(vty->pending_cmds_buf, vty->buf,
vty->pending_cmds_buflen);
/* Schedule the commit operation. */
THREAD_TIMER_OFF(vty->t_pending_commit);
thread_add_timer_msec(master, nb_cli_pending_commit_cb, vty, 100,
&vty->t_pending_commit);
return CMD_SUCCESS;
}
void nb_cli_enqueue_change(struct vty *vty, const char *xpath, void nb_cli_enqueue_change(struct vty *vty, const char *xpath,
enum nb_operation operation, const char *value) enum nb_operation operation, const char *value)
{ {
@ -76,7 +176,6 @@ int nb_cli_apply_changes(struct vty *vty, const char *xpath_base_fmt, ...)
{ {
char xpath_base[XPATH_MAXLEN] = {}; char xpath_base[XPATH_MAXLEN] = {};
bool error = false; bool error = false;
int ret;
VTY_CHECK_XPATH; VTY_CHECK_XPATH;
@ -95,6 +194,7 @@ int nb_cli_apply_changes(struct vty *vty, const char *xpath_base_fmt, ...)
struct nb_node *nb_node; struct nb_node *nb_node;
char xpath[XPATH_MAXLEN]; char xpath[XPATH_MAXLEN];
struct yang_data *data; struct yang_data *data;
int ret;
/* Handle relative XPaths. */ /* Handle relative XPaths. */
memset(xpath, 0, sizeof(xpath)); memset(xpath, 0, sizeof(xpath));
@ -158,25 +258,19 @@ int nb_cli_apply_changes(struct vty *vty, const char *xpath_base_fmt, ...)
yang_print_errors(ly_native_ctx, buf, sizeof(buf))); yang_print_errors(ly_native_ctx, buf, sizeof(buf)));
} }
/* Do an implicit "commit" when using the classic CLI mode. */ /*
* Do an implicit commit when using the classic CLI mode.
*
* NOTE: the implicit commit might be scheduled to run later when
* too many commands are being sent at the same time. This is a
* protection mechanism where multiple commands are grouped into the
* same configuration transaction, allowing them to be processed much
* faster.
*/
if (frr_get_cli_mode() == FRR_CLI_CLASSIC) { if (frr_get_cli_mode() == FRR_CLI_CLASSIC) {
struct nb_context context = {}; if (vty->t_pending_commit || nb_cli_backoff_start(vty))
char errmsg[BUFSIZ] = {0}; return nb_cli_schedule_command(vty);
return nb_cli_classic_commit(vty);
context.client = NB_CLIENT_CLI;
context.user = vty;
ret = nb_candidate_commit(&context, vty->candidate_config,
false, NULL, NULL, errmsg,
sizeof(errmsg));
if (ret != NB_OK && ret != NB_ERR_NO_CHANGES) {
vty_out(vty, "%% Configuration failed.\n\n");
vty_show_nb_errors(vty, ret, errmsg);
/* Regenerate candidate for consistency. */
nb_config_replace(vty->candidate_config, running_config,
true);
return CMD_WARNING_CONFIG_FAILED;
}
} }
return CMD_SUCCESS; return CMD_SUCCESS;

View File

@ -108,6 +108,14 @@ extern int nb_cli_rpc(const char *xpath, struct list *input,
extern void nb_cli_show_dnode_cmds(struct vty *vty, struct lyd_node *dnode, extern void nb_cli_show_dnode_cmds(struct vty *vty, struct lyd_node *dnode,
bool show_defaults); bool show_defaults);
/*
* Perform pending commit, if any.
*
* vty
* The vty context.
*/
extern void nb_cli_pending_commit_check(struct vty *vty);
/* Prototypes of internal functions. */ /* Prototypes of internal functions. */
extern void nb_cli_show_config_prepare(struct nb_config *config, extern void nb_cli_show_config_prepare(struct nb_config *config,
bool with_defaults); bool with_defaults);

View File

@ -39,7 +39,7 @@
#define ROUTE_MAP_SEQUENCE_CMD_STR \ #define ROUTE_MAP_SEQUENCE_CMD_STR \
"Sequence to insert to/delete from existing route-map entry\n" "Sequence to insert to/delete from existing route-map entry\n"
DEFPY_NOSH( DEFPY_YANG_NOSH(
route_map, route_map_cmd, route_map, route_map_cmd,
"route-map WORD$name <deny|permit>$action (1-65535)$sequence", "route-map WORD$name <deny|permit>$action (1-65535)$sequence",
ROUTE_MAP_CMD_STR ROUTE_MAP_CMD_STR
@ -70,6 +70,7 @@ DEFPY_NOSH(
VTY_PUSH_XPATH(RMAP_NODE, xpath_index); VTY_PUSH_XPATH(RMAP_NODE, xpath_index);
/* Add support for non-migrated route map users. */ /* Add support for non-migrated route map users. */
nb_cli_pending_commit_check(vty);
rm = route_map_get(name); rm = route_map_get(name);
action_type = (action[0] == 'p') ? RMAP_PERMIT : RMAP_DENY; action_type = (action[0] == 'p') ? RMAP_PERMIT : RMAP_DENY;
rmi = route_map_index_get(rm, action_type, sequence); rmi = route_map_index_get(rm, action_type, sequence);
@ -79,7 +80,7 @@ DEFPY_NOSH(
return rv; return rv;
} }
DEFPY( DEFPY_YANG(
no_route_map_all, no_route_map_all_cmd, no_route_map_all, no_route_map_all_cmd,
"no route-map WORD$name", "no route-map WORD$name",
NO_STR NO_STR
@ -94,7 +95,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_route_map, no_route_map_cmd, no_route_map, no_route_map_cmd,
"no route-map WORD$name <deny|permit>$action (1-65535)$sequence", "no route-map WORD$name <deny|permit>$action (1-65535)$sequence",
NO_STR NO_STR
@ -179,7 +180,7 @@ void route_map_instance_show_end(struct vty *vty, struct lyd_node *dnode)
vty_out(vty, "!\n"); vty_out(vty, "!\n");
} }
DEFPY( DEFPY_YANG(
match_interface, match_interface_cmd, match_interface, match_interface_cmd,
"match interface IFNAME", "match interface IFNAME",
MATCH_STR MATCH_STR
@ -196,7 +197,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_interface, no_match_interface_cmd, no_match_interface, no_match_interface_cmd,
"no match interface [IFNAME]", "no match interface [IFNAME]",
NO_STR NO_STR
@ -211,7 +212,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
match_ip_address, match_ip_address_cmd, match_ip_address, match_ip_address_cmd,
"match ip address <(1-199)|(1300-2699)|WORD>$name", "match ip address <(1-199)|(1300-2699)|WORD>$name",
MATCH_STR MATCH_STR
@ -231,7 +232,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_ip_address, no_match_ip_address_cmd, no_match_ip_address, no_match_ip_address_cmd,
"no match ip address [<(1-199)|(1300-2699)|WORD>]", "no match ip address [<(1-199)|(1300-2699)|WORD>]",
NO_STR NO_STR
@ -249,7 +250,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
match_ip_address_prefix_list, match_ip_address_prefix_list,
match_ip_address_prefix_list_cmd, match_ip_address_prefix_list_cmd,
"match ip address prefix-list WORD$name", "match ip address prefix-list WORD$name",
@ -269,7 +270,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_ip_address_prefix_list, no_match_ip_address_prefix_list_cmd, no_match_ip_address_prefix_list, no_match_ip_address_prefix_list_cmd,
"no match ip address prefix-list [WORD]", "no match ip address prefix-list [WORD]",
NO_STR NO_STR
@ -286,7 +287,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
match_ip_next_hop, match_ip_next_hop_cmd, match_ip_next_hop, match_ip_next_hop_cmd,
"match ip next-hop <(1-199)|(1300-2699)|WORD>$name", "match ip next-hop <(1-199)|(1300-2699)|WORD>$name",
MATCH_STR MATCH_STR
@ -306,7 +307,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_ip_next_hop, no_match_ip_next_hop_cmd, no_match_ip_next_hop, no_match_ip_next_hop_cmd,
"no match ip next-hop [<(1-199)|(1300-2699)|WORD>]", "no match ip next-hop [<(1-199)|(1300-2699)|WORD>]",
NO_STR NO_STR
@ -324,7 +325,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
match_ip_next_hop_prefix_list, match_ip_next_hop_prefix_list,
match_ip_next_hop_prefix_list_cmd, match_ip_next_hop_prefix_list_cmd,
"match ip next-hop prefix-list WORD$name", "match ip next-hop prefix-list WORD$name",
@ -345,7 +346,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_ip_next_hop_prefix_list, no_match_ip_next_hop_prefix_list,
no_match_ip_next_hop_prefix_list_cmd, no_match_ip_next_hop_prefix_list_cmd,
"no match ip next-hop prefix-list [WORD]", "no match ip next-hop prefix-list [WORD]",
@ -364,7 +365,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
match_ip_next_hop_type, match_ip_next_hop_type_cmd, match_ip_next_hop_type, match_ip_next_hop_type_cmd,
"match ip next-hop type <blackhole>$type", "match ip next-hop type <blackhole>$type",
MATCH_STR MATCH_STR
@ -384,7 +385,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_ip_next_hop_type, no_match_ip_next_hop_type_cmd, no_match_ip_next_hop_type, no_match_ip_next_hop_type_cmd,
"no match ip next-hop type [<blackhole>]", "no match ip next-hop type [<blackhole>]",
NO_STR MATCH_STR IP_STR NO_STR MATCH_STR IP_STR
@ -399,7 +400,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
match_ipv6_address, match_ipv6_address_cmd, match_ipv6_address, match_ipv6_address_cmd,
"match ipv6 address WORD$name", "match ipv6 address WORD$name",
MATCH_STR MATCH_STR
@ -417,7 +418,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_ipv6_address, no_match_ipv6_address_cmd, no_match_ipv6_address, no_match_ipv6_address_cmd,
"no match ipv6 address [WORD]", "no match ipv6 address [WORD]",
NO_STR NO_STR
@ -433,7 +434,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
match_ipv6_address_prefix_list, match_ipv6_address_prefix_list_cmd, match_ipv6_address_prefix_list, match_ipv6_address_prefix_list_cmd,
"match ipv6 address prefix-list WORD$name", "match ipv6 address prefix-list WORD$name",
MATCH_STR MATCH_STR
@ -452,7 +453,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_ipv6_address_prefix_list, no_match_ipv6_address_prefix_list,
no_match_ipv6_address_prefix_list_cmd, no_match_ipv6_address_prefix_list_cmd,
"no match ipv6 address prefix-list [WORD]", "no match ipv6 address prefix-list [WORD]",
@ -470,7 +471,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
match_ipv6_next_hop_type, match_ipv6_next_hop_type_cmd, match_ipv6_next_hop_type, match_ipv6_next_hop_type_cmd,
"match ipv6 next-hop type <blackhole>$type", "match ipv6 next-hop type <blackhole>$type",
MATCH_STR IPV6_STR MATCH_STR IPV6_STR
@ -489,7 +490,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_ipv6_next_hop_type, no_match_ipv6_next_hop_type_cmd, no_match_ipv6_next_hop_type, no_match_ipv6_next_hop_type_cmd,
"no match ipv6 next-hop type [<blackhole>]", "no match ipv6 next-hop type [<blackhole>]",
NO_STR MATCH_STR IPV6_STR NO_STR MATCH_STR IPV6_STR
@ -504,7 +505,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
match_metric, match_metric_cmd, match_metric, match_metric_cmd,
"match metric (0-4294967295)$metric", "match metric (0-4294967295)$metric",
MATCH_STR MATCH_STR
@ -521,7 +522,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_metric, no_match_metric_cmd, no_match_metric, no_match_metric_cmd,
"no match metric [(0-4294967295)]", "no match metric [(0-4294967295)]",
NO_STR NO_STR
@ -536,7 +537,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
match_tag, match_tag_cmd, match_tag, match_tag_cmd,
"match tag (1-4294967295)$tag", "match tag (1-4294967295)$tag",
MATCH_STR MATCH_STR
@ -553,7 +554,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_tag, no_match_tag_cmd, no_match_tag, no_match_tag_cmd,
"no match tag [(1-4294967295)]", "no match tag [(1-4294967295)]",
NO_STR NO_STR
@ -646,7 +647,7 @@ void route_map_condition_show(struct vty *vty, struct lyd_node *dnode,
} }
} }
DEFPY( DEFPY_YANG(
set_ip_nexthop, set_ip_nexthop_cmd, set_ip_nexthop, set_ip_nexthop_cmd,
"set ip next-hop A.B.C.D$addr", "set ip next-hop A.B.C.D$addr",
SET_STR SET_STR
@ -664,7 +665,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_set_ip_nexthop, no_set_ip_nexthop_cmd, no_set_ip_nexthop, no_set_ip_nexthop_cmd,
"no set ip next-hop [A.B.C.D]", "no set ip next-hop [A.B.C.D]",
NO_STR NO_STR
@ -680,7 +681,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
set_ipv6_nexthop_local, set_ipv6_nexthop_local_cmd, set_ipv6_nexthop_local, set_ipv6_nexthop_local_cmd,
"set ipv6 next-hop local X:X::X:X$addr", "set ipv6 next-hop local X:X::X:X$addr",
SET_STR SET_STR
@ -699,7 +700,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_set_ipv6_nexthop_local, no_set_ipv6_nexthop_local_cmd, no_set_ipv6_nexthop_local, no_set_ipv6_nexthop_local_cmd,
"no set ipv6 next-hop local [X:X::X:X]", "no set ipv6 next-hop local [X:X::X:X]",
NO_STR NO_STR
@ -716,7 +717,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
set_metric, set_metric_cmd, set_metric, set_metric_cmd,
"set metric <(0-4294967295)$metric|rtt$rtt|+rtt$artt|-rtt$srtt|+metric$ametric|-metric$smetric>", "set metric <(0-4294967295)$metric|rtt$rtt|+rtt$artt|-rtt$srtt|+metric$ametric|-metric$smetric>",
SET_STR SET_STR
@ -762,7 +763,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_set_metric, no_set_metric_cmd, no_set_metric, no_set_metric_cmd,
"no set metric [(0-4294967295)]", "no set metric [(0-4294967295)]",
NO_STR NO_STR
@ -776,7 +777,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
set_tag, set_tag_cmd, set_tag, set_tag_cmd,
"set tag (1-4294967295)$tag", "set tag (1-4294967295)$tag",
SET_STR SET_STR
@ -793,7 +794,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_set_tag, no_set_tag_cmd, no_set_tag, no_set_tag_cmd,
"no set tag [(1-4294967295)]", "no set tag [(1-4294967295)]",
NO_STR NO_STR
@ -853,7 +854,7 @@ void route_map_action_show(struct vty *vty, struct lyd_node *dnode,
} }
} }
DEFPY( DEFPY_YANG(
rmap_onmatch_next, rmap_onmatch_next_cmd, rmap_onmatch_next, rmap_onmatch_next_cmd,
"on-match next", "on-match next",
"Exit policy on matches\n" "Exit policy on matches\n"
@ -864,7 +865,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_rmap_onmatch_next, no_rmap_onmatch_next,
no_rmap_onmatch_next_cmd, no_rmap_onmatch_next_cmd,
"no on-match next", "no on-match next",
@ -877,7 +878,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
rmap_onmatch_goto, rmap_onmatch_goto_cmd, rmap_onmatch_goto, rmap_onmatch_goto_cmd,
"on-match goto (1-65535)$rm_num", "on-match goto (1-65535)$rm_num",
"Exit policy on matches\n" "Exit policy on matches\n"
@ -890,7 +891,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_rmap_onmatch_goto, no_rmap_onmatch_goto_cmd, no_rmap_onmatch_goto, no_rmap_onmatch_goto_cmd,
"no on-match goto", "no on-match goto",
NO_STR NO_STR
@ -903,13 +904,13 @@ DEFPY(
} }
/* Cisco/GNU Zebra compatibility aliases */ /* Cisco/GNU Zebra compatibility aliases */
ALIAS( ALIAS_YANG(
rmap_onmatch_goto, rmap_continue_cmd, rmap_onmatch_goto, rmap_continue_cmd,
"continue (1-65535)$rm_num", "continue (1-65535)$rm_num",
"Continue on a different entry within the route-map\n" "Continue on a different entry within the route-map\n"
"Route-map entry sequence number\n") "Route-map entry sequence number\n")
ALIAS( ALIAS_YANG(
no_rmap_onmatch_goto, no_rmap_continue_cmd, no_rmap_onmatch_goto, no_rmap_continue_cmd,
"no continue [(1-65535)]", "no continue [(1-65535)]",
NO_STR NO_STR
@ -935,7 +936,7 @@ void route_map_exit_policy_show(struct vty *vty, struct lyd_node *dnode,
} }
} }
DEFPY( DEFPY_YANG(
rmap_call, rmap_call_cmd, rmap_call, rmap_call_cmd,
"call WORD$name", "call WORD$name",
"Jump to another Route-Map after match+set\n" "Jump to another Route-Map after match+set\n"
@ -946,7 +947,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_rmap_call, no_rmap_call_cmd, no_rmap_call, no_rmap_call_cmd,
"no call", "no call",
NO_STR NO_STR
@ -963,7 +964,7 @@ void route_map_call_show(struct vty *vty, struct lyd_node *dnode,
vty_out(vty, " call %s\n", yang_dnode_get_string(dnode, NULL)); vty_out(vty, " call %s\n", yang_dnode_get_string(dnode, NULL));
} }
DEFPY( DEFPY_YANG(
rmap_description, rmap_description_cmd, rmap_description, rmap_description_cmd,
"description LINE...", "description LINE...",
"Route-map comment\n" "Route-map comment\n"
@ -980,7 +981,7 @@ DEFPY(
return rv; return rv;
} }
DEFUN (no_rmap_description, DEFUN_YANG (no_rmap_description,
no_rmap_description_cmd, no_rmap_description_cmd,
"no description", "no description",
NO_STR NO_STR

View File

@ -638,6 +638,7 @@ int vrf_handler_create(struct vty *vty, const char *vrfname,
ret = nb_cli_apply_changes(vty, xpath_list); ret = nb_cli_apply_changes(vty, xpath_list);
if (ret == CMD_SUCCESS) { if (ret == CMD_SUCCESS) {
VTY_PUSH_XPATH(VRF_NODE, xpath_list); VTY_PUSH_XPATH(VRF_NODE, xpath_list);
nb_cli_pending_commit_check(vty);
vrfp = vrf_lookup_by_name(vrfname); vrfp = vrf_lookup_by_name(vrfname);
if (vrfp) if (vrfp)
VTY_PUSH_CONTEXT(VRF_NODE, vrfp); VTY_PUSH_CONTEXT(VRF_NODE, vrfp);
@ -731,7 +732,7 @@ DEFUN_NOSH(vrf_exit,
return CMD_SUCCESS; return CMD_SUCCESS;
} }
DEFUN_NOSH (vrf, DEFUN_YANG_NOSH (vrf,
vrf_cmd, vrf_cmd,
"vrf NAME", "vrf NAME",
"Select a VRF to configure\n" "Select a VRF to configure\n"
@ -743,7 +744,7 @@ DEFUN_NOSH (vrf,
return vrf_handler_create(vty, vrfname, NULL); return vrf_handler_create(vty, vrfname, NULL);
} }
DEFUN (no_vrf, DEFUN_YANG (no_vrf,
no_vrf_cmd, no_vrf_cmd,
"no vrf NAME", "no vrf NAME",
NO_STR NO_STR

View File

@ -2631,6 +2631,9 @@ int vty_config_node_exit(struct vty *vty)
{ {
vty->xpath_index = 0; vty->xpath_index = 0;
/* Perform pending commit if any. */
nb_cli_pending_commit_check(vty);
/* Check if there's a pending confirmed commit. */ /* Check if there's a pending confirmed commit. */
if (vty->t_confirmed_commit_timeout) { if (vty->t_confirmed_commit_timeout) {
vty_out(vty, vty_out(vty,

View File

@ -134,6 +134,14 @@ struct vty {
/* Base candidate configuration. */ /* Base candidate configuration. */
struct nb_config *candidate_config_base; struct nb_config *candidate_config_base;
/* Dynamic transaction information. */
struct timeval backoff_start;
size_t backoff_cmd_count;
struct thread *t_pending_commit;
char *pending_cmds_buf;
size_t pending_cmds_buflen;
size_t pending_cmds_bufpos;
/* Confirmed-commit timeout and rollback configuration. */ /* Confirmed-commit timeout and rollback configuration. */
struct thread *t_confirmed_commit_timeout; struct thread *t_confirmed_commit_timeout;
struct nb_config *confirmed_commit_rollback; struct nb_config *confirmed_commit_rollback;

View File

@ -37,7 +37,7 @@
/* /*
* XPath: /frr-ripd:ripd/instance * XPath: /frr-ripd:ripd/instance
*/ */
DEFPY_NOSH (router_rip, DEFPY_YANG_NOSH (router_rip,
router_rip_cmd, router_rip_cmd,
"router rip [vrf NAME]", "router rip [vrf NAME]",
"Enable a routing process\n" "Enable a routing process\n"
@ -62,7 +62,7 @@ DEFPY_NOSH (router_rip,
return ret; return ret;
} }
DEFPY (no_router_rip, DEFPY_YANG (no_router_rip,
no_router_rip_cmd, no_router_rip_cmd,
"no router rip [vrf NAME]", "no router rip [vrf NAME]",
NO_STR NO_STR
@ -100,7 +100,7 @@ void cli_show_router_rip(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripd:ripd/instance/allow-ecmp * XPath: /frr-ripd:ripd/instance/allow-ecmp
*/ */
DEFPY (rip_allow_ecmp, DEFPY_YANG (rip_allow_ecmp,
rip_allow_ecmp_cmd, rip_allow_ecmp_cmd,
"[no] allow-ecmp", "[no] allow-ecmp",
NO_STR NO_STR
@ -124,7 +124,7 @@ void cli_show_rip_allow_ecmp(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripd:ripd/instance/default-information-originate * XPath: /frr-ripd:ripd/instance/default-information-originate
*/ */
DEFPY (rip_default_information_originate, DEFPY_YANG (rip_default_information_originate,
rip_default_information_originate_cmd, rip_default_information_originate_cmd,
"[no] default-information originate", "[no] default-information originate",
NO_STR NO_STR
@ -150,7 +150,7 @@ void cli_show_rip_default_information_originate(struct vty *vty,
/* /*
* XPath: /frr-ripd:ripd/instance/default-metric * XPath: /frr-ripd:ripd/instance/default-metric
*/ */
DEFPY (rip_default_metric, DEFPY_YANG (rip_default_metric,
rip_default_metric_cmd, rip_default_metric_cmd,
"default-metric (1-16)", "default-metric (1-16)",
"Set a metric of redistribute routes\n" "Set a metric of redistribute routes\n"
@ -162,7 +162,7 @@ DEFPY (rip_default_metric,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY (no_rip_default_metric, DEFPY_YANG (no_rip_default_metric,
no_rip_default_metric_cmd, no_rip_default_metric_cmd,
"no default-metric [(1-16)]", "no default-metric [(1-16)]",
NO_STR NO_STR
@ -184,7 +184,7 @@ void cli_show_rip_default_metric(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripd:ripd/instance/distance/default * XPath: /frr-ripd:ripd/instance/distance/default
*/ */
DEFPY (rip_distance, DEFPY_YANG (rip_distance,
rip_distance_cmd, rip_distance_cmd,
"distance (1-255)", "distance (1-255)",
"Administrative distance\n" "Administrative distance\n"
@ -196,7 +196,7 @@ DEFPY (rip_distance,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY (no_rip_distance, DEFPY_YANG (no_rip_distance,
no_rip_distance_cmd, no_rip_distance_cmd,
"no distance [(1-255)]", "no distance [(1-255)]",
NO_STR NO_STR
@ -221,7 +221,7 @@ void cli_show_rip_distance(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripd:ripd/instance/distance/source * XPath: /frr-ripd:ripd/instance/distance/source
*/ */
DEFPY (rip_distance_source, DEFPY_YANG (rip_distance_source,
rip_distance_source_cmd, rip_distance_source_cmd,
"[no] distance (1-255) A.B.C.D/M$prefix [WORD$acl]", "[no] distance (1-255) A.B.C.D/M$prefix [WORD$acl]",
NO_STR NO_STR
@ -258,7 +258,7 @@ void cli_show_rip_distance_source(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripd:ripd/instance/explicit-neighbor * XPath: /frr-ripd:ripd/instance/explicit-neighbor
*/ */
DEFPY (rip_neighbor, DEFPY_YANG (rip_neighbor,
rip_neighbor_cmd, rip_neighbor_cmd,
"[no] neighbor A.B.C.D", "[no] neighbor A.B.C.D",
NO_STR NO_STR
@ -280,7 +280,7 @@ void cli_show_rip_neighbor(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripd:ripd/instance/network * XPath: /frr-ripd:ripd/instance/network
*/ */
DEFPY (rip_network_prefix, DEFPY_YANG (rip_network_prefix,
rip_network_prefix_cmd, rip_network_prefix_cmd,
"[no] network A.B.C.D/M", "[no] network A.B.C.D/M",
NO_STR NO_STR
@ -302,7 +302,7 @@ void cli_show_rip_network_prefix(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripd:ripd/instance/interface * XPath: /frr-ripd:ripd/instance/interface
*/ */
DEFPY (rip_network_if, DEFPY_YANG (rip_network_if,
rip_network_if_cmd, rip_network_if_cmd,
"[no] network WORD", "[no] network WORD",
NO_STR NO_STR
@ -324,7 +324,7 @@ void cli_show_rip_network_interface(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripd:ripd/instance/offset-list * XPath: /frr-ripd:ripd/instance/offset-list
*/ */
DEFPY (rip_offset_list, DEFPY_YANG (rip_offset_list,
rip_offset_list_cmd, rip_offset_list_cmd,
"[no] offset-list WORD$acl <in|out>$direction (0-16)$metric [IFNAME]", "[no] offset-list WORD$acl <in|out>$direction (0-16)$metric [IFNAME]",
NO_STR NO_STR
@ -367,7 +367,7 @@ void cli_show_rip_offset_list(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripd:ripd/instance/passive-default * XPath: /frr-ripd:ripd/instance/passive-default
*/ */
DEFPY (rip_passive_default, DEFPY_YANG (rip_passive_default,
rip_passive_default_cmd, rip_passive_default_cmd,
"[no] passive-interface default", "[no] passive-interface default",
NO_STR NO_STR
@ -393,7 +393,7 @@ void cli_show_rip_passive_default(struct vty *vty, struct lyd_node *dnode,
* XPath: /frr-ripd:ripd/instance/passive-interface * XPath: /frr-ripd:ripd/instance/passive-interface
* /frr-ripd:ripd/instance/non-passive-interface * /frr-ripd:ripd/instance/non-passive-interface
*/ */
DEFPY (rip_passive_interface, DEFPY_YANG (rip_passive_interface,
rip_passive_interface_cmd, rip_passive_interface_cmd,
"[no] passive-interface IFNAME", "[no] passive-interface IFNAME",
NO_STR NO_STR
@ -434,7 +434,7 @@ void cli_show_rip_non_passive_interface(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripd:ripd/instance/redistribute * XPath: /frr-ripd:ripd/instance/redistribute
*/ */
DEFPY (rip_redistribute, DEFPY_YANG (rip_redistribute,
rip_redistribute_cmd, rip_redistribute_cmd,
"[no] redistribute " FRR_REDIST_STR_RIPD "$protocol [{metric (0-16)|route-map WORD}]", "[no] redistribute " FRR_REDIST_STR_RIPD "$protocol [{metric (0-16)|route-map WORD}]",
NO_STR NO_STR
@ -477,7 +477,7 @@ void cli_show_rip_redistribute(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripd:ripd/instance/static-route * XPath: /frr-ripd:ripd/instance/static-route
*/ */
DEFPY (rip_route, DEFPY_YANG (rip_route,
rip_route_cmd, rip_route_cmd,
"[no] route A.B.C.D/M", "[no] route A.B.C.D/M",
NO_STR NO_STR
@ -499,7 +499,7 @@ void cli_show_rip_route(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripd:ripd/instance/timers * XPath: /frr-ripd:ripd/instance/timers
*/ */
DEFPY (rip_timers, DEFPY_YANG (rip_timers,
rip_timers_cmd, rip_timers_cmd,
"timers basic (5-2147483647)$update (5-2147483647)$timeout (5-2147483647)$garbage", "timers basic (5-2147483647)$update (5-2147483647)$timeout (5-2147483647)$garbage",
"Adjust routing timers\n" "Adjust routing timers\n"
@ -518,7 +518,7 @@ DEFPY (rip_timers,
return nb_cli_apply_changes(vty, "./timers"); return nb_cli_apply_changes(vty, "./timers");
} }
DEFPY (no_rip_timers, DEFPY_YANG (no_rip_timers,
no_rip_timers_cmd, no_rip_timers_cmd,
"no timers basic [(5-2147483647) (5-2147483647) (5-2147483647)]", "no timers basic [(5-2147483647) (5-2147483647) (5-2147483647)]",
NO_STR NO_STR
@ -547,7 +547,7 @@ void cli_show_rip_timers(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripd:ripd/instance/version * XPath: /frr-ripd:ripd/instance/version
*/ */
DEFPY (rip_version, DEFPY_YANG (rip_version,
rip_version_cmd, rip_version_cmd,
"version (1-2)", "version (1-2)",
"Set routing protocol version\n" "Set routing protocol version\n"
@ -560,7 +560,7 @@ DEFPY (rip_version,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY (no_rip_version, DEFPY_YANG (no_rip_version,
no_rip_version_cmd, no_rip_version_cmd,
"no version [(1-2)]", "no version [(1-2)]",
NO_STR NO_STR
@ -596,7 +596,7 @@ void cli_show_rip_version(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-ripd:rip/split-horizon * XPath: /frr-interface:lib/interface/frr-ripd:rip/split-horizon
*/ */
DEFPY (ip_rip_split_horizon, DEFPY_YANG (ip_rip_split_horizon,
ip_rip_split_horizon_cmd, ip_rip_split_horizon_cmd,
"[no] ip rip split-horizon [poisoned-reverse$poisoned_reverse]", "[no] ip rip split-horizon [poisoned-reverse$poisoned_reverse]",
NO_STR NO_STR
@ -641,7 +641,7 @@ void cli_show_ip_rip_split_horizon(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-ripd:rip/v2-broadcast * XPath: /frr-interface:lib/interface/frr-ripd:rip/v2-broadcast
*/ */
DEFPY (ip_rip_v2_broadcast, DEFPY_YANG (ip_rip_v2_broadcast,
ip_rip_v2_broadcast_cmd, ip_rip_v2_broadcast_cmd,
"[no] ip rip v2-broadcast", "[no] ip rip v2-broadcast",
NO_STR NO_STR
@ -667,7 +667,7 @@ void cli_show_ip_rip_v2_broadcast(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-ripd:rip/version-receive * XPath: /frr-interface:lib/interface/frr-ripd:rip/version-receive
*/ */
DEFPY (ip_rip_receive_version, DEFPY_YANG (ip_rip_receive_version,
ip_rip_receive_version_cmd, ip_rip_receive_version_cmd,
"ip rip receive version <{1$v1|2$v2}|none>", "ip rip receive version <{1$v1|2$v2}|none>",
IP_STR IP_STR
@ -694,7 +694,7 @@ DEFPY (ip_rip_receive_version,
return nb_cli_apply_changes(vty, "./frr-ripd:rip"); return nb_cli_apply_changes(vty, "./frr-ripd:rip");
} }
DEFPY (no_ip_rip_receive_version, DEFPY_YANG (no_ip_rip_receive_version,
no_ip_rip_receive_version_cmd, no_ip_rip_receive_version_cmd,
"no ip rip receive version [<{1|2}|none>]", "no ip rip receive version [<{1|2}|none>]",
NO_STR NO_STR
@ -736,7 +736,7 @@ void cli_show_ip_rip_receive_version(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-ripd:rip/version-send * XPath: /frr-interface:lib/interface/frr-ripd:rip/version-send
*/ */
DEFPY (ip_rip_send_version, DEFPY_YANG (ip_rip_send_version,
ip_rip_send_version_cmd, ip_rip_send_version_cmd,
"ip rip send version <{1$v1|2$v2}|none>", "ip rip send version <{1$v1|2$v2}|none>",
IP_STR IP_STR
@ -763,7 +763,7 @@ DEFPY (ip_rip_send_version,
return nb_cli_apply_changes(vty, "./frr-ripd:rip"); return nb_cli_apply_changes(vty, "./frr-ripd:rip");
} }
DEFPY (no_ip_rip_send_version, DEFPY_YANG (no_ip_rip_send_version,
no_ip_rip_send_version_cmd, no_ip_rip_send_version_cmd,
"no ip rip send version [<{1|2}|none>]", "no ip rip send version [<{1|2}|none>]",
NO_STR NO_STR
@ -805,7 +805,7 @@ void cli_show_ip_rip_send_version(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-ripd:rip/authentication-scheme * XPath: /frr-interface:lib/interface/frr-ripd:rip/authentication-scheme
*/ */
DEFPY (ip_rip_authentication_mode, DEFPY_YANG (ip_rip_authentication_mode,
ip_rip_authentication_mode_cmd, ip_rip_authentication_mode_cmd,
"ip rip authentication mode <md5$mode [auth-length <rfc|old-ripd>$auth_length]|text$mode>", "ip rip authentication mode <md5$mode [auth-length <rfc|old-ripd>$auth_length]|text$mode>",
IP_STR IP_STR
@ -837,7 +837,7 @@ DEFPY (ip_rip_authentication_mode,
return nb_cli_apply_changes(vty, "./frr-ripd:rip"); return nb_cli_apply_changes(vty, "./frr-ripd:rip");
} }
DEFPY (no_ip_rip_authentication_mode, DEFPY_YANG (no_ip_rip_authentication_mode,
no_ip_rip_authentication_mode_cmd, no_ip_rip_authentication_mode_cmd,
"no ip rip authentication mode [<md5 [auth-length <rfc|old-ripd>]|text>]", "no ip rip authentication mode [<md5 [auth-length <rfc|old-ripd>]|text>]",
NO_STR NO_STR
@ -888,7 +888,7 @@ void cli_show_ip_rip_authentication_scheme(struct vty *vty,
/* /*
* XPath: /frr-interface:lib/interface/frr-ripd:rip/authentication-password * XPath: /frr-interface:lib/interface/frr-ripd:rip/authentication-password
*/ */
DEFPY (ip_rip_authentication_string, DEFPY_YANG (ip_rip_authentication_string,
ip_rip_authentication_string_cmd, ip_rip_authentication_string_cmd,
"ip rip authentication string LINE$password", "ip rip authentication string LINE$password",
IP_STR IP_STR
@ -916,7 +916,7 @@ DEFPY (ip_rip_authentication_string,
return nb_cli_apply_changes(vty, "./frr-ripd:rip"); return nb_cli_apply_changes(vty, "./frr-ripd:rip");
} }
DEFPY (no_ip_rip_authentication_string, DEFPY_YANG (no_ip_rip_authentication_string,
no_ip_rip_authentication_string_cmd, no_ip_rip_authentication_string_cmd,
"no ip rip authentication string [LINE]", "no ip rip authentication string [LINE]",
NO_STR NO_STR
@ -943,7 +943,7 @@ void cli_show_ip_rip_authentication_string(struct vty *vty,
/* /*
* XPath: /frr-interface:lib/interface/frr-ripd:rip/authentication-key-chain * XPath: /frr-interface:lib/interface/frr-ripd:rip/authentication-key-chain
*/ */
DEFPY (ip_rip_authentication_key_chain, DEFPY_YANG (ip_rip_authentication_key_chain,
ip_rip_authentication_key_chain_cmd, ip_rip_authentication_key_chain_cmd,
"ip rip authentication key-chain LINE$keychain", "ip rip authentication key-chain LINE$keychain",
IP_STR IP_STR
@ -965,7 +965,7 @@ DEFPY (ip_rip_authentication_key_chain,
return nb_cli_apply_changes(vty, "./frr-ripd:rip"); return nb_cli_apply_changes(vty, "./frr-ripd:rip");
} }
DEFPY (no_ip_rip_authentication_key_chain, DEFPY_YANG (no_ip_rip_authentication_key_chain,
no_ip_rip_authentication_key_chain_cmd, no_ip_rip_authentication_key_chain_cmd,
"no ip rip authentication key-chain [LINE]", "no ip rip authentication key-chain [LINE]",
NO_STR NO_STR
@ -992,7 +992,7 @@ void cli_show_ip_rip_authentication_key_chain(struct vty *vty,
/* /*
* XPath: /frr-ripd:clear-rip-route * XPath: /frr-ripd:clear-rip-route
*/ */
DEFPY (clear_ip_rip, DEFPY_YANG (clear_ip_rip,
clear_ip_rip_cmd, clear_ip_rip_cmd,
"clear ip rip [vrf WORD]", "clear ip rip [vrf WORD]",
CLEAR_STR CLEAR_STR

View File

@ -37,7 +37,7 @@
/* /*
* XPath: /frr-ripngd:ripngd/instance * XPath: /frr-ripngd:ripngd/instance
*/ */
DEFPY_NOSH (router_ripng, DEFPY_YANG_NOSH (router_ripng,
router_ripng_cmd, router_ripng_cmd,
"router ripng [vrf NAME]", "router ripng [vrf NAME]",
"Enable a routing process\n" "Enable a routing process\n"
@ -62,7 +62,7 @@ DEFPY_NOSH (router_ripng,
return ret; return ret;
} }
DEFPY (no_router_ripng, DEFPY_YANG (no_router_ripng,
no_router_ripng_cmd, no_router_ripng_cmd,
"no router ripng [vrf NAME]", "no router ripng [vrf NAME]",
NO_STR NO_STR
@ -100,7 +100,7 @@ void cli_show_router_ripng(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripngd:ripngd/instance/allow-ecmp * XPath: /frr-ripngd:ripngd/instance/allow-ecmp
*/ */
DEFPY (ripng_allow_ecmp, DEFPY_YANG (ripng_allow_ecmp,
ripng_allow_ecmp_cmd, ripng_allow_ecmp_cmd,
"[no] allow-ecmp", "[no] allow-ecmp",
NO_STR NO_STR
@ -124,7 +124,7 @@ void cli_show_ripng_allow_ecmp(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripngd:ripngd/instance/default-information-originate * XPath: /frr-ripngd:ripngd/instance/default-information-originate
*/ */
DEFPY (ripng_default_information_originate, DEFPY_YANG (ripng_default_information_originate,
ripng_default_information_originate_cmd, ripng_default_information_originate_cmd,
"[no] default-information originate", "[no] default-information originate",
NO_STR NO_STR
@ -150,7 +150,7 @@ void cli_show_ripng_default_information_originate(struct vty *vty,
/* /*
* XPath: /frr-ripngd:ripngd/instance/default-metric * XPath: /frr-ripngd:ripngd/instance/default-metric
*/ */
DEFPY (ripng_default_metric, DEFPY_YANG (ripng_default_metric,
ripng_default_metric_cmd, ripng_default_metric_cmd,
"default-metric (1-16)", "default-metric (1-16)",
"Set a metric of redistribute routes\n" "Set a metric of redistribute routes\n"
@ -162,7 +162,7 @@ DEFPY (ripng_default_metric,
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY (no_ripng_default_metric, DEFPY_YANG (no_ripng_default_metric,
no_ripng_default_metric_cmd, no_ripng_default_metric_cmd,
"no default-metric [(1-16)]", "no default-metric [(1-16)]",
NO_STR NO_STR
@ -184,7 +184,7 @@ void cli_show_ripng_default_metric(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripngd:ripngd/instance/network * XPath: /frr-ripngd:ripngd/instance/network
*/ */
DEFPY (ripng_network_prefix, DEFPY_YANG (ripng_network_prefix,
ripng_network_prefix_cmd, ripng_network_prefix_cmd,
"[no] network X:X::X:X/M", "[no] network X:X::X:X/M",
NO_STR NO_STR
@ -206,7 +206,7 @@ void cli_show_ripng_network_prefix(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripngd:ripngd/instance/interface * XPath: /frr-ripngd:ripngd/instance/interface
*/ */
DEFPY (ripng_network_if, DEFPY_YANG (ripng_network_if,
ripng_network_if_cmd, ripng_network_if_cmd,
"[no] network WORD", "[no] network WORD",
NO_STR NO_STR
@ -228,7 +228,7 @@ void cli_show_ripng_network_interface(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripngd:ripngd/instance/offset-list * XPath: /frr-ripngd:ripngd/instance/offset-list
*/ */
DEFPY (ripng_offset_list, DEFPY_YANG (ripng_offset_list,
ripng_offset_list_cmd, ripng_offset_list_cmd,
"[no] offset-list WORD$acl <in|out>$direction (0-16)$metric [IFNAME]", "[no] offset-list WORD$acl <in|out>$direction (0-16)$metric [IFNAME]",
NO_STR NO_STR
@ -271,7 +271,7 @@ void cli_show_ripng_offset_list(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripngd:ripngd/instance/passive-interface * XPath: /frr-ripngd:ripngd/instance/passive-interface
*/ */
DEFPY (ripng_passive_interface, DEFPY_YANG (ripng_passive_interface,
ripng_passive_interface_cmd, ripng_passive_interface_cmd,
"[no] passive-interface IFNAME", "[no] passive-interface IFNAME",
NO_STR NO_STR
@ -294,7 +294,7 @@ void cli_show_ripng_passive_interface(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripngd:ripngd/instance/redistribute * XPath: /frr-ripngd:ripngd/instance/redistribute
*/ */
DEFPY (ripng_redistribute, DEFPY_YANG (ripng_redistribute,
ripng_redistribute_cmd, ripng_redistribute_cmd,
"[no] redistribute " FRR_REDIST_STR_RIPNGD "$protocol [{metric (0-16)|route-map WORD}]", "[no] redistribute " FRR_REDIST_STR_RIPNGD "$protocol [{metric (0-16)|route-map WORD}]",
NO_STR NO_STR
@ -337,7 +337,7 @@ void cli_show_ripng_redistribute(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripngd:ripngd/instance/static-route * XPath: /frr-ripngd:ripngd/instance/static-route
*/ */
DEFPY (ripng_route, DEFPY_YANG (ripng_route,
ripng_route_cmd, ripng_route_cmd,
"[no] route X:X::X:X/M", "[no] route X:X::X:X/M",
NO_STR NO_STR
@ -359,7 +359,7 @@ void cli_show_ripng_route(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripngd:ripngd/instance/aggregate-addres * XPath: /frr-ripngd:ripngd/instance/aggregate-addres
*/ */
DEFPY (ripng_aggregate_address, DEFPY_YANG (ripng_aggregate_address,
ripng_aggregate_address_cmd, ripng_aggregate_address_cmd,
"[no] aggregate-address X:X::X:X/M", "[no] aggregate-address X:X::X:X/M",
NO_STR NO_STR
@ -383,7 +383,7 @@ void cli_show_ripng_aggregate_address(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripngd:ripngd/instance/timers * XPath: /frr-ripngd:ripngd/instance/timers
*/ */
DEFPY (ripng_timers, DEFPY_YANG (ripng_timers,
ripng_timers_cmd, ripng_timers_cmd,
"timers basic (1-65535)$update (1-65535)$timeout (1-65535)$garbage", "timers basic (1-65535)$update (1-65535)$timeout (1-65535)$garbage",
"RIPng timers setup\n" "RIPng timers setup\n"
@ -402,7 +402,7 @@ DEFPY (ripng_timers,
return nb_cli_apply_changes(vty, "./timers"); return nb_cli_apply_changes(vty, "./timers");
} }
DEFPY (no_ripng_timers, DEFPY_YANG (no_ripng_timers,
no_ripng_timers_cmd, no_ripng_timers_cmd,
"no timers basic [(1-65535) (1-65535) (1-65535)]", "no timers basic [(1-65535) (1-65535) (1-65535)]",
NO_STR NO_STR
@ -431,7 +431,7 @@ void cli_show_ripng_timers(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-ripngd:ripng/split-horizon * XPath: /frr-interface:lib/interface/frr-ripngd:ripng/split-horizon
*/ */
DEFPY (ipv6_ripng_split_horizon, DEFPY_YANG (ipv6_ripng_split_horizon,
ipv6_ripng_split_horizon_cmd, ipv6_ripng_split_horizon_cmd,
"[no] ipv6 ripng split-horizon [poisoned-reverse$poisoned_reverse]", "[no] ipv6 ripng split-horizon [poisoned-reverse$poisoned_reverse]",
NO_STR NO_STR
@ -476,7 +476,7 @@ void cli_show_ipv6_ripng_split_horizon(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-ripngd:clear-ripng-route * XPath: /frr-ripngd:clear-ripng-route
*/ */
DEFPY (clear_ipv6_rip, DEFPY_YANG (clear_ipv6_rip,
clear_ipv6_rip_cmd, clear_ipv6_rip_cmd,
"clear ipv6 ripng [vrf WORD]", "clear ipv6 ripng [vrf WORD]",
CLEAR_STR CLEAR_STR

View File

@ -451,7 +451,7 @@ int static_config(struct vty *vty, struct static_vrf *svrf, afi_t afi,
} }
/* Static unicast routes for multicast RPF lookup. */ /* Static unicast routes for multicast RPF lookup. */
DEFPY (ip_mroute_dist, DEFPY_YANG (ip_mroute_dist,
ip_mroute_dist_cmd, ip_mroute_dist_cmd,
"[no] ip mroute A.B.C.D/M$prefix <A.B.C.D$gate|INTERFACE$ifname> [(1-255)$distance]", "[no] ip mroute A.B.C.D/M$prefix <A.B.C.D$gate|INTERFACE$ifname> [(1-255)$distance]",
NO_STR NO_STR
@ -468,7 +468,7 @@ DEFPY (ip_mroute_dist,
} }
/* Static route configuration. */ /* Static route configuration. */
DEFPY(ip_route_blackhole, DEFPY_YANG(ip_route_blackhole,
ip_route_blackhole_cmd, ip_route_blackhole_cmd,
"[no] ip route\ "[no] ip route\
<A.B.C.D/M$prefix|A.B.C.D$prefix A.B.C.D$mask> \ <A.B.C.D/M$prefix|A.B.C.D$prefix A.B.C.D$mask> \
@ -506,7 +506,7 @@ DEFPY(ip_route_blackhole,
distance_str, vrf, label, table_str); distance_str, vrf, label, table_str);
} }
DEFPY(ip_route_blackhole_vrf, DEFPY_YANG(ip_route_blackhole_vrf,
ip_route_blackhole_vrf_cmd, ip_route_blackhole_vrf_cmd,
"[no] ip route\ "[no] ip route\
<A.B.C.D/M$prefix|A.B.C.D$prefix A.B.C.D$mask> \ <A.B.C.D/M$prefix|A.B.C.D$prefix A.B.C.D$mask> \
@ -553,7 +553,7 @@ DEFPY(ip_route_blackhole_vrf,
false); false);
} }
DEFPY(ip_route_address_interface, DEFPY_YANG(ip_route_address_interface,
ip_route_address_interface_cmd, ip_route_address_interface_cmd,
"[no] ip route\ "[no] ip route\
<A.B.C.D/M$prefix|A.B.C.D$prefix A.B.C.D$mask> \ <A.B.C.D/M$prefix|A.B.C.D$prefix A.B.C.D$mask> \
@ -607,7 +607,7 @@ DEFPY(ip_route_address_interface,
!!onlink); !!onlink);
} }
DEFPY(ip_route_address_interface_vrf, DEFPY_YANG(ip_route_address_interface_vrf,
ip_route_address_interface_vrf_cmd, ip_route_address_interface_vrf_cmd,
"[no] ip route\ "[no] ip route\
<A.B.C.D/M$prefix|A.B.C.D$prefix A.B.C.D$mask> \ <A.B.C.D/M$prefix|A.B.C.D$prefix A.B.C.D$mask> \
@ -666,7 +666,7 @@ DEFPY(ip_route_address_interface_vrf,
!!onlink); !!onlink);
} }
DEFPY(ip_route, DEFPY_YANG(ip_route,
ip_route_cmd, ip_route_cmd,
"[no] ip route\ "[no] ip route\
<A.B.C.D/M$prefix|A.B.C.D$prefix A.B.C.D$mask> \ <A.B.C.D/M$prefix|A.B.C.D$prefix A.B.C.D$mask> \
@ -718,7 +718,7 @@ DEFPY(ip_route,
false); false);
} }
DEFPY(ip_route_vrf, DEFPY_YANG(ip_route_vrf,
ip_route_vrf_cmd, ip_route_vrf_cmd,
"[no] ip route\ "[no] ip route\
<A.B.C.D/M$prefix|A.B.C.D$prefix A.B.C.D$mask> \ <A.B.C.D/M$prefix|A.B.C.D$prefix A.B.C.D$mask> \
@ -775,7 +775,7 @@ DEFPY(ip_route_vrf,
false); false);
} }
DEFPY(ipv6_route_blackhole, DEFPY_YANG(ipv6_route_blackhole,
ipv6_route_blackhole_cmd, ipv6_route_blackhole_cmd,
"[no] ipv6 route X:X::X:X/M$prefix [from X:X::X:X/M] \ "[no] ipv6 route X:X::X:X/M$prefix [from X:X::X:X/M] \
<reject|blackhole>$flag \ <reject|blackhole>$flag \
@ -813,7 +813,7 @@ DEFPY(ipv6_route_blackhole,
distance_str, vrf, label, table_str); distance_str, vrf, label, table_str);
} }
DEFPY(ipv6_route_blackhole_vrf, DEFPY_YANG(ipv6_route_blackhole_vrf,
ipv6_route_blackhole_vrf_cmd, ipv6_route_blackhole_vrf_cmd,
"[no] ipv6 route X:X::X:X/M$prefix [from X:X::X:X/M] \ "[no] ipv6 route X:X::X:X/M$prefix [from X:X::X:X/M] \
<reject|blackhole>$flag \ <reject|blackhole>$flag \
@ -862,7 +862,7 @@ DEFPY(ipv6_route_blackhole_vrf,
false); false);
} }
DEFPY(ipv6_route_address_interface, DEFPY_YANG(ipv6_route_address_interface,
ipv6_route_address_interface_cmd, ipv6_route_address_interface_cmd,
"[no] ipv6 route X:X::X:X/M$prefix [from X:X::X:X/M] \ "[no] ipv6 route X:X::X:X/M$prefix [from X:X::X:X/M] \
X:X::X:X$gate \ X:X::X:X$gate \
@ -917,7 +917,7 @@ DEFPY(ipv6_route_address_interface,
!!onlink); !!onlink);
} }
DEFPY(ipv6_route_address_interface_vrf, DEFPY_YANG(ipv6_route_address_interface_vrf,
ipv6_route_address_interface_vrf_cmd, ipv6_route_address_interface_vrf_cmd,
"[no] ipv6 route X:X::X:X/M$prefix [from X:X::X:X/M] \ "[no] ipv6 route X:X::X:X/M$prefix [from X:X::X:X/M] \
X:X::X:X$gate \ X:X::X:X$gate \
@ -976,7 +976,7 @@ DEFPY(ipv6_route_address_interface_vrf,
table_str, !!onlink); table_str, !!onlink);
} }
DEFPY(ipv6_route, DEFPY_YANG(ipv6_route,
ipv6_route_cmd, ipv6_route_cmd,
"[no] ipv6 route X:X::X:X/M$prefix [from X:X::X:X/M] \ "[no] ipv6 route X:X::X:X/M$prefix [from X:X::X:X/M] \
<X:X::X:X$gate|<INTERFACE|Null0>$ifname> \ <X:X::X:X$gate|<INTERFACE|Null0>$ifname> \
@ -1027,7 +1027,7 @@ DEFPY(ipv6_route,
false); false);
} }
DEFPY(ipv6_route_vrf, DEFPY_YANG(ipv6_route_vrf,
ipv6_route_vrf_cmd, ipv6_route_vrf_cmd,
"[no] ipv6 route X:X::X:X/M$prefix [from X:X::X:X/M] \ "[no] ipv6 route X:X::X:X/M$prefix [from X:X::X:X/M] \
<X:X::X:X$gate|<INTERFACE|Null0>$ifname> \ <X:X::X:X$gate|<INTERFACE|Null0>$ifname> \
@ -1082,7 +1082,7 @@ DEFPY(ipv6_route_vrf,
ifname, flag, tag_str, distance_str, label, ifname, flag, tag_str, distance_str, label,
table_str, false); table_str, false);
} }
DEFPY(debug_staticd, DEFPY_YANG(debug_staticd,
debug_staticd_cmd, debug_staticd_cmd,
"[no] debug static [{events$events}]", "[no] debug static [{events$events}]",
NO_STR NO_STR

View File

@ -52,7 +52,7 @@
/* /*
* XPath: /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group * XPath: /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group
*/ */
DEFPY(vrrp_vrid, DEFPY_YANG(vrrp_vrid,
vrrp_vrid_cmd, vrrp_vrid_cmd,
"[no] vrrp (1-255)$vrid [version (2-3)]", "[no] vrrp (1-255)$vrid [version (2-3)]",
NO_STR NO_STR
@ -89,7 +89,7 @@ void cli_show_vrrp(struct vty *vty, struct lyd_node *dnode, bool show_defaults)
/* /*
* XPath: /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/shutdown * XPath: /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/shutdown
*/ */
DEFPY(vrrp_shutdown, DEFPY_YANG(vrrp_shutdown,
vrrp_shutdown_cmd, vrrp_shutdown_cmd,
"[no] vrrp (1-255)$vrid shutdown", "[no] vrrp (1-255)$vrid shutdown",
NO_STR NO_STR
@ -115,7 +115,7 @@ void cli_show_shutdown(struct vty *vty, struct lyd_node *dnode,
/* /*
* XPath: /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/priority * XPath: /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/priority
*/ */
DEFPY(vrrp_priority, DEFPY_YANG(vrrp_priority,
vrrp_priority_cmd, vrrp_priority_cmd,
"vrrp (1-255)$vrid priority (1-254)", "vrrp (1-255)$vrid priority (1-254)",
VRRP_STR VRRP_STR
@ -131,7 +131,7 @@ DEFPY(vrrp_priority,
/* /*
* XPath: /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/priority * XPath: /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/priority
*/ */
DEFPY(no_vrrp_priority, DEFPY_YANG(no_vrrp_priority,
no_vrrp_priority_cmd, no_vrrp_priority_cmd,
"no vrrp (1-255)$vrid priority [(1-254)]", "no vrrp (1-255)$vrid priority [(1-254)]",
NO_STR NO_STR
@ -158,7 +158,7 @@ void cli_show_priority(struct vty *vty, struct lyd_node *dnode,
* XPath: * XPath:
* /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/advertisement-interval * /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/advertisement-interval
*/ */
DEFPY(vrrp_advertisement_interval, DEFPY_YANG(vrrp_advertisement_interval,
vrrp_advertisement_interval_cmd, vrrp_advertisement_interval_cmd,
"vrrp (1-255)$vrid advertisement-interval (10-40950)", "vrrp (1-255)$vrid advertisement-interval (10-40950)",
VRRP_STR VRRP_VRID_STR VRRP_ADVINT_STR VRRP_STR VRRP_VRID_STR VRRP_ADVINT_STR
@ -179,7 +179,7 @@ DEFPY(vrrp_advertisement_interval,
* XPath: * XPath:
* /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/advertisement-interval * /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/advertisement-interval
*/ */
DEFPY(no_vrrp_advertisement_interval, DEFPY_YANG(no_vrrp_advertisement_interval,
no_vrrp_advertisement_interval_cmd, no_vrrp_advertisement_interval_cmd,
"no vrrp (1-255)$vrid advertisement-interval [(10-40950)]", "no vrrp (1-255)$vrid advertisement-interval [(10-40950)]",
NO_STR VRRP_STR VRRP_VRID_STR VRRP_ADVINT_STR NO_STR VRRP_STR VRRP_VRID_STR VRRP_ADVINT_STR
@ -205,7 +205,7 @@ void cli_show_advertisement_interval(struct vty *vty, struct lyd_node *dnode,
* XPath: * XPath:
* /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/v4/virtual-address * /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/v4/virtual-address
*/ */
DEFPY(vrrp_ip, DEFPY_YANG(vrrp_ip,
vrrp_ip_cmd, vrrp_ip_cmd,
"[no] vrrp (1-255)$vrid ip A.B.C.D", "[no] vrrp (1-255)$vrid ip A.B.C.D",
NO_STR NO_STR
@ -233,7 +233,7 @@ void cli_show_ip(struct vty *vty, struct lyd_node *dnode, bool show_defaults)
* XPath: * XPath:
* /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/v6/virtual-address * /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/v6/virtual-address
*/ */
DEFPY(vrrp_ip6, DEFPY_YANG(vrrp_ip6,
vrrp_ip6_cmd, vrrp_ip6_cmd,
"[no] vrrp (1-255)$vrid ipv6 X:X::X:X", "[no] vrrp (1-255)$vrid ipv6 X:X::X:X",
NO_STR NO_STR
@ -260,7 +260,7 @@ void cli_show_ipv6(struct vty *vty, struct lyd_node *dnode, bool show_defaults)
/* /*
* XPath: /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/preempt * XPath: /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/preempt
*/ */
DEFPY(vrrp_preempt, DEFPY_YANG(vrrp_preempt,
vrrp_preempt_cmd, vrrp_preempt_cmd,
"[no] vrrp (1-255)$vrid preempt", "[no] vrrp (1-255)$vrid preempt",
NO_STR NO_STR
@ -284,7 +284,7 @@ void cli_show_preempt(struct vty *vty, struct lyd_node *dnode,
} }
/* XXX: yang conversion */ /* XXX: yang conversion */
DEFPY(vrrp_autoconfigure, DEFPY_YANG(vrrp_autoconfigure,
vrrp_autoconfigure_cmd, vrrp_autoconfigure_cmd,
"[no] vrrp autoconfigure [version (2-3)]", "[no] vrrp autoconfigure [version (2-3)]",
NO_STR NO_STR
@ -304,7 +304,7 @@ DEFPY(vrrp_autoconfigure,
} }
/* XXX: yang conversion */ /* XXX: yang conversion */
DEFPY(vrrp_default, DEFPY_YANG(vrrp_default,
vrrp_default_cmd, vrrp_default_cmd,
"[no] vrrp default <advertisement-interval$adv (10-40950)$advint|preempt$p|priority$prio (1-254)$prioval|shutdown$s>", "[no] vrrp default <advertisement-interval$adv (10-40950)$advint|preempt$p|priority$prio (1-254)$prioval|shutdown$s>",
NO_STR NO_STR
@ -583,7 +583,7 @@ static int vrrp_instance_display_sort_cmp(const void **d1, const void **d2)
/* clang-format off */ /* clang-format off */
DEFPY(vrrp_vrid_show, DEFPY_YANG(vrrp_vrid_show,
vrrp_vrid_show_cmd, vrrp_vrid_show_cmd,
"show vrrp [interface INTERFACE$ifn] [(1-255)$vrid] [json$json]", "show vrrp [interface INTERFACE$ifn] [(1-255)$vrid] [json$json]",
SHOW_STR SHOW_STR
@ -624,7 +624,7 @@ DEFPY(vrrp_vrid_show,
return CMD_SUCCESS; return CMD_SUCCESS;
} }
DEFPY(vrrp_vrid_show_summary, DEFPY_YANG(vrrp_vrid_show_summary,
vrrp_vrid_show_summary_cmd, vrrp_vrid_show_summary_cmd,
"show vrrp [interface INTERFACE$ifn] [(1-255)$vrid] summary", "show vrrp [interface INTERFACE$ifn] [(1-255)$vrid] summary",
SHOW_STR SHOW_STR
@ -674,7 +674,7 @@ DEFPY(vrrp_vrid_show_summary,
} }
DEFPY(debug_vrrp, DEFPY_YANG(debug_vrrp,
debug_vrrp_cmd, debug_vrrp_cmd,
"[no] debug vrrp [{protocol$proto|autoconfigure$ac|packets$pkt|sockets$sock|ndisc$ndisc|arp$arp|zebra$zebra}]", "[no] debug vrrp [{protocol$proto|autoconfigure$ac|packets$pkt|sockets$sock|ndisc$ndisc|arp$arp|zebra$zebra}]",
NO_STR NO_STR

View File

@ -48,7 +48,7 @@ sub scan_file {
} }
# ?: makes a group non-capturing # ?: makes a group non-capturing
@defun = ($line =~ /((?:DEFUN|DEFUN_HIDDEN|ALIAS|ALIAS_HIDDEN|DEFPY|DEFPY_HIDDEN)\s*\(.+?\));?\s?\s?\n/sg); @defun = ($line =~ /((?:DEFUN|DEFUN_HIDDEN|DEFUN_YANG|ALIAS|ALIAS_HIDDEN|ALIAS_YANG|DEFPY|DEFPY_HIDDEN|DEFPY_YANG)\s*\(.+?\));?\s?\s?\n/sg);
@install = ($line =~ /install_element\s*\(\s*[0-9A-Z_]+,\s*&[^;]*;\s*\n/sg); @install = ($line =~ /install_element\s*\(\s*[0-9A-Z_]+,\s*&[^;]*;\s*\n/sg);
# DEFUN process # DEFUN process

View File

@ -351,7 +351,7 @@ static int ip_nht_rm_del(struct zebra_vrf *zvrf, const char *rmap, int rtype,
return CMD_SUCCESS; return CMD_SUCCESS;
} }
DEFPY( DEFPY_YANG(
match_ip_address_prefix_len, match_ip_address_prefix_len_cmd, match_ip_address_prefix_len, match_ip_address_prefix_len_cmd,
"match ip address prefix-len (0-32)$length", "match ip address prefix-len (0-32)$length",
MATCH_STR MATCH_STR
@ -371,7 +371,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_ip_address_prefix_len, no_match_ip_address_prefix_len_cmd, no_match_ip_address_prefix_len, no_match_ip_address_prefix_len_cmd,
"no match ip address prefix-len [(0-32)]", "no match ip address prefix-len [(0-32)]",
NO_STR NO_STR
@ -388,7 +388,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
match_ipv6_address_prefix_len, match_ipv6_address_prefix_len_cmd, match_ipv6_address_prefix_len, match_ipv6_address_prefix_len_cmd,
"match ipv6 address prefix-len (0-128)$length", "match ipv6 address prefix-len (0-128)$length",
MATCH_STR MATCH_STR
@ -408,7 +408,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_ipv6_address_prefix_len, no_match_ipv6_address_prefix_len_cmd, no_match_ipv6_address_prefix_len, no_match_ipv6_address_prefix_len_cmd,
"no match ipv6 address prefix-len [(0-128)]", "no match ipv6 address prefix-len [(0-128)]",
NO_STR NO_STR
@ -425,7 +425,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
match_ip_nexthop_prefix_len, match_ip_nexthop_prefix_len_cmd, match_ip_nexthop_prefix_len, match_ip_nexthop_prefix_len_cmd,
"match ip next-hop prefix-len (0-32)$length", "match ip next-hop prefix-len (0-32)$length",
MATCH_STR MATCH_STR
@ -446,7 +446,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_ip_nexthop_prefix_len, no_match_ip_nexthop_prefix_len_cmd, no_match_ip_nexthop_prefix_len, no_match_ip_nexthop_prefix_len_cmd,
"no match ip next-hop prefix-len [(0-32)]", "no match ip next-hop prefix-len [(0-32)]",
NO_STR NO_STR
@ -464,7 +464,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
match_source_protocol, match_source_protocol_cmd, match_source_protocol, match_source_protocol_cmd,
"match source-protocol " FRR_REDIST_STR_ZEBRA "$proto", "match source-protocol " FRR_REDIST_STR_ZEBRA "$proto",
MATCH_STR MATCH_STR
@ -482,7 +482,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_source_protocol, no_match_source_protocol_cmd, no_match_source_protocol, no_match_source_protocol_cmd,
"no match source-protocol [" FRR_REDIST_STR_ZEBRA "]", "no match source-protocol [" FRR_REDIST_STR_ZEBRA "]",
NO_STR NO_STR
@ -497,7 +497,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
match_source_instance, match_source_instance_cmd, match_source_instance, match_source_instance_cmd,
"match source-instance (0-255)$instance", "match source-instance (0-255)$instance",
MATCH_STR MATCH_STR
@ -515,7 +515,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_match_source_instance, no_match_source_instance_cmd, no_match_source_instance, no_match_source_instance_cmd,
"no match source-instance [(0-255)]", "no match source-instance [(0-255)]",
NO_STR MATCH_STR NO_STR MATCH_STR
@ -531,7 +531,7 @@ DEFPY(
/* set functions */ /* set functions */
DEFPY( DEFPY_YANG(
set_src, set_src_cmd, set_src, set_src_cmd,
"set src <A.B.C.D$addrv4|X:X::X:X$addrv6>", "set src <A.B.C.D$addrv4|X:X::X:X$addrv6>",
SET_STR SET_STR
@ -558,7 +558,7 @@ DEFPY(
return nb_cli_apply_changes(vty, NULL); return nb_cli_apply_changes(vty, NULL);
} }
DEFPY( DEFPY_YANG(
no_set_src, no_set_src_cmd, no_set_src, no_set_src_cmd,
"no set src [<A.B.C.D|X:X::X:X>]", "no set src [<A.B.C.D|X:X::X:X>]",
NO_STR NO_STR
@ -605,7 +605,7 @@ DEFUN (no_zebra_route_map_timer,
return (CMD_SUCCESS); return (CMD_SUCCESS);
} }
DEFPY (ip_protocol, DEFPY_YANG (ip_protocol,
ip_protocol_cmd, ip_protocol_cmd,
"ip protocol " FRR_IP_PROTOCOL_MAP_STR_ZEBRA "ip protocol " FRR_IP_PROTOCOL_MAP_STR_ZEBRA
" $proto route-map ROUTE-MAP$rmap", " $proto route-map ROUTE-MAP$rmap",
@ -639,7 +639,7 @@ DEFPY (ip_protocol,
return ret; return ret;
} }
DEFPY (no_ip_protocol, DEFPY_YANG (no_ip_protocol,
no_ip_protocol_cmd, no_ip_protocol_cmd,
"no ip protocol " FRR_IP_PROTOCOL_MAP_STR_ZEBRA "no ip protocol " FRR_IP_PROTOCOL_MAP_STR_ZEBRA
" $proto [route-map ROUTE-MAP$rmap]", " $proto [route-map ROUTE-MAP$rmap]",
@ -673,7 +673,7 @@ DEFPY (no_ip_protocol,
return ret; return ret;
} }
DEFPY (show_ip_protocol, DEFPY_YANG (show_ip_protocol,
show_ip_protocol_cmd, show_ip_protocol_cmd,
"show ip protocol [vrf <NAME$vrf_name|all$vrf_all>]", "show ip protocol [vrf <NAME$vrf_name|all$vrf_all>]",
SHOW_STR SHOW_STR
@ -686,7 +686,7 @@ DEFPY (show_ip_protocol,
return ret; return ret;
} }
DEFPY (ipv6_protocol, DEFPY_YANG (ipv6_protocol,
ipv6_protocol_cmd, ipv6_protocol_cmd,
"ipv6 protocol " FRR_IP6_PROTOCOL_MAP_STR_ZEBRA "ipv6 protocol " FRR_IP6_PROTOCOL_MAP_STR_ZEBRA
" $proto route-map ROUTE-MAP$rmap", " $proto route-map ROUTE-MAP$rmap",
@ -720,7 +720,7 @@ DEFPY (ipv6_protocol,
return ret; return ret;
} }
DEFPY (no_ipv6_protocol, DEFPY_YANG (no_ipv6_protocol,
no_ipv6_protocol_cmd, no_ipv6_protocol_cmd,
"no ipv6 protocol " FRR_IP6_PROTOCOL_MAP_STR_ZEBRA "no ipv6 protocol " FRR_IP6_PROTOCOL_MAP_STR_ZEBRA
" $proto [route-map ROUTE-MAP$rmap]", " $proto [route-map ROUTE-MAP$rmap]",
@ -754,7 +754,7 @@ DEFPY (no_ipv6_protocol,
return ret; return ret;
} }
DEFPY (show_ipv6_protocol, DEFPY_YANG (show_ipv6_protocol,
show_ipv6_protocol_cmd, show_ipv6_protocol_cmd,
"show ipv6 protocol [vrf <NAME$vrf_name|all$vrf_all>]", "show ipv6 protocol [vrf <NAME$vrf_name|all$vrf_all>]",
SHOW_STR SHOW_STR
@ -767,7 +767,7 @@ DEFPY (show_ipv6_protocol,
return ret; return ret;
} }
DEFPY (ip_protocol_nht_rmap, DEFPY_YANG (ip_protocol_nht_rmap,
ip_protocol_nht_rmap_cmd, ip_protocol_nht_rmap_cmd,
"ip nht " FRR_IP_PROTOCOL_MAP_STR_ZEBRA "ip nht " FRR_IP_PROTOCOL_MAP_STR_ZEBRA
" $proto route-map ROUTE-MAP$rmap", " $proto route-map ROUTE-MAP$rmap",
@ -802,7 +802,7 @@ DEFPY (ip_protocol_nht_rmap,
return ret; return ret;
} }
DEFPY (no_ip_protocol_nht_rmap, DEFPY_YANG (no_ip_protocol_nht_rmap,
no_ip_protocol_nht_rmap_cmd, no_ip_protocol_nht_rmap_cmd,
"no ip nht " FRR_IP_PROTOCOL_MAP_STR_ZEBRA "no ip nht " FRR_IP_PROTOCOL_MAP_STR_ZEBRA
" $proto route-map [ROUTE-MAP$rmap]", " $proto route-map [ROUTE-MAP$rmap]",
@ -836,7 +836,7 @@ DEFPY (no_ip_protocol_nht_rmap,
return ret; return ret;
} }
DEFPY (show_ip_protocol_nht, DEFPY_YANG (show_ip_protocol_nht,
show_ip_protocol_nht_cmd, show_ip_protocol_nht_cmd,
"show ip nht route-map [vrf <NAME$vrf_name|all$vrf_all>]", "show ip nht route-map [vrf <NAME$vrf_name|all$vrf_all>]",
SHOW_STR SHOW_STR
@ -850,7 +850,7 @@ DEFPY (show_ip_protocol_nht,
return ret; return ret;
} }
DEFPY (ipv6_protocol_nht_rmap, DEFPY_YANG (ipv6_protocol_nht_rmap,
ipv6_protocol_nht_rmap_cmd, ipv6_protocol_nht_rmap_cmd,
"ipv6 nht " FRR_IP6_PROTOCOL_MAP_STR_ZEBRA "ipv6 nht " FRR_IP6_PROTOCOL_MAP_STR_ZEBRA
" $proto route-map ROUTE-MAP$rmap", " $proto route-map ROUTE-MAP$rmap",
@ -884,7 +884,7 @@ DEFPY (ipv6_protocol_nht_rmap,
return ret; return ret;
} }
DEFPY (no_ipv6_protocol_nht_rmap, DEFPY_YANG (no_ipv6_protocol_nht_rmap,
no_ipv6_protocol_nht_rmap_cmd, no_ipv6_protocol_nht_rmap_cmd,
"no ipv6 nht " FRR_IP6_PROTOCOL_MAP_STR_ZEBRA "no ipv6 nht " FRR_IP6_PROTOCOL_MAP_STR_ZEBRA
" $proto [route-map ROUTE-MAP$rmap]", " $proto [route-map ROUTE-MAP$rmap]",
@ -918,7 +918,7 @@ DEFPY (no_ipv6_protocol_nht_rmap,
return ret; return ret;
} }
DEFPY (show_ipv6_protocol_nht, DEFPY_YANG (show_ipv6_protocol_nht,
show_ipv6_protocol_nht_cmd, show_ipv6_protocol_nht_cmd,
"show ipv6 nht route-map [vrf <NAME$vrf_name|all$vrf_all>]", "show ipv6 nht route-map [vrf <NAME$vrf_name|all$vrf_all>]",
SHOW_STR SHOW_STR