1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 2001,2002 Sampo Saaristo
4 * Tampere University of Technology
5 * Institute of Communications Engineering
6 * Copyright (C) 2018 Volta Networks
17 #include "northbound_cli.h"
20 #include "lib/linklist.h"
21 #include "isisd/isisd.h"
22 #include "isisd/isis_nb.h"
23 #include "isisd/isis_misc.h"
24 #include "isisd/isis_circuit.h"
25 #include "isisd/isis_csm.h"
26 #include "isisd/isis_flex_algo.h"
28 #include "isisd/isis_cli_clippy.c"
33 * XPath: /frr-isisd:isis/instance
35 DEFPY_YANG_NOSH(router_isis
, router_isis_cmd
,
36 "router isis WORD$tag [vrf NAME$vrf_name]",
39 "ISO Routing area tag\n" VRF_CMD_HELP_STR
)
42 char base_xpath
[XPATH_MAXLEN
];
45 vrf_name
= VRF_DEFAULT_NAME
;
47 snprintf(base_xpath
, XPATH_MAXLEN
,
48 "/frr-isisd:isis/instance[area-tag='%s'][vrf='%s']", tag
,
50 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
52 ret
= nb_cli_apply_changes(vty
, "%s", base_xpath
);
53 if (ret
== CMD_SUCCESS
)
54 VTY_PUSH_XPATH(ISIS_NODE
, base_xpath
);
59 DEFPY_YANG(no_router_isis
, no_router_isis_cmd
,
60 "no router isis WORD$tag [vrf NAME$vrf_name]",
63 "ISO Routing area tag\n" VRF_CMD_HELP_STR
)
66 vrf_name
= VRF_DEFAULT_NAME
;
68 if (!yang_dnode_existsf(
69 vty
->candidate_config
->dnode
,
70 "/frr-isisd:isis/instance[area-tag='%s'][vrf='%s']", tag
,
72 vty_out(vty
, "ISIS area %s not found.\n", tag
);
73 return CMD_ERR_NOTHING_TODO
;
76 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
78 return nb_cli_apply_changes_clear_pending(
79 vty
, "/frr-isisd:isis/instance[area-tag='%s'][vrf='%s']", tag
,
83 void cli_show_router_isis(struct vty
*vty
, const struct lyd_node
*dnode
,
86 const char *vrf
= NULL
;
88 vrf
= yang_dnode_get_string(dnode
, "./vrf");
91 vty_out(vty
, "router isis %s",
92 yang_dnode_get_string(dnode
, "./area-tag"));
93 if (!strmatch(vrf
, VRF_DEFAULT_NAME
))
94 vty_out(vty
, " vrf %s", yang_dnode_get_string(dnode
, "./vrf"));
98 void cli_show_router_isis_end(struct vty
*vty
, const struct lyd_node
*dnode
)
100 vty_out(vty
, "exit\n");
104 * XPath: /frr-interface:lib/interface/frr-isisd:isis/
105 * XPath: /frr-interface:lib/interface/frr-isisd:isis/ipv4-routing
106 * XPath: /frr-interface:lib/interface/frr-isisd:isis/ipv6-routing
107 * XPath: /frr-isisd:isis/instance
109 DEFPY_YANG(ip_router_isis
, ip_router_isis_cmd
,
110 "ip router isis WORD$tag",
111 "Interface Internet Protocol config commands\n"
112 "IP router interface commands\n"
113 "IS-IS routing protocol\n"
114 "Routing process tag\n")
116 nb_cli_enqueue_change(vty
, "./frr-isisd:isis", NB_OP_CREATE
, NULL
);
117 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/area-tag", NB_OP_MODIFY
,
119 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/ipv4-routing",
120 NB_OP_MODIFY
, "true");
122 return nb_cli_apply_changes(vty
, NULL
);
125 ALIAS_HIDDEN(ip_router_isis
, ip_router_isis_vrf_cmd
,
126 "ip router isis WORD$tag vrf NAME$vrf_name",
127 "Interface Internet Protocol config commands\n"
128 "IP router interface commands\n"
129 "IS-IS routing protocol\n"
130 "Routing process tag\n" VRF_CMD_HELP_STR
)
132 DEFPY_YANG(ip6_router_isis
, ip6_router_isis_cmd
,
133 "ipv6 router isis WORD$tag",
134 "Interface Internet Protocol config commands\n"
135 "IP router interface commands\n"
136 "IS-IS routing protocol\n"
137 "Routing process tag\n")
139 nb_cli_enqueue_change(vty
, "./frr-isisd:isis", NB_OP_CREATE
, NULL
);
140 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/area-tag", NB_OP_MODIFY
,
142 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/ipv6-routing",
143 NB_OP_MODIFY
, "true");
145 return nb_cli_apply_changes(vty
, NULL
);
148 ALIAS_HIDDEN(ip6_router_isis
, ip6_router_isis_vrf_cmd
,
149 "ipv6 router isis WORD$tag vrf NAME$vrf_name",
150 "Interface Internet Protocol config commands\n"
151 "IP router interface commands\n"
152 "IS-IS routing protocol\n"
153 "Routing process tag\n" VRF_CMD_HELP_STR
)
155 DEFPY_YANG(no_ip_router_isis
, no_ip_router_isis_cmd
,
156 "no <ip|ipv6>$ip router isis [WORD]$tag",
158 "Interface Internet Protocol config commands\n"
159 "IP router interface commands\n"
160 "IP router interface commands\n"
161 "IS-IS routing protocol\n"
162 "Routing process tag\n")
164 const struct lyd_node
*dnode
;
166 dnode
= yang_dnode_getf(vty
->candidate_config
->dnode
,
167 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
172 * If both ipv4 and ipv6 are off delete the interface isis container.
174 if (strmatch(ip
, "ipv6")) {
175 if (!yang_dnode_get_bool(dnode
, "./ipv4-routing"))
176 nb_cli_enqueue_change(vty
, "./frr-isisd:isis",
177 NB_OP_DESTROY
, NULL
);
179 nb_cli_enqueue_change(vty
,
180 "./frr-isisd:isis/ipv6-routing",
181 NB_OP_MODIFY
, "false");
183 if (!yang_dnode_get_bool(dnode
, "./ipv6-routing"))
184 nb_cli_enqueue_change(vty
, "./frr-isisd:isis",
185 NB_OP_DESTROY
, NULL
);
187 nb_cli_enqueue_change(vty
,
188 "./frr-isisd:isis/ipv4-routing",
189 NB_OP_MODIFY
, "false");
192 return nb_cli_apply_changes(vty
, NULL
);
195 ALIAS_HIDDEN(no_ip_router_isis
, no_ip_router_isis_vrf_cmd
,
196 "no <ip|ipv6>$ip router isis WORD$tag vrf NAME$vrf_name",
198 "Interface Internet Protocol config commands\n"
199 "IP router interface commands\n"
200 "IP router interface commands\n"
201 "IS-IS routing protocol\n"
202 "Routing process tag\n"
205 void cli_show_ip_isis_ipv4(struct vty
*vty
, const struct lyd_node
*dnode
,
208 if (!yang_dnode_get_bool(dnode
, NULL
))
210 vty_out(vty
, " ip router isis %s\n",
211 yang_dnode_get_string(dnode
, "../area-tag"));
214 void cli_show_ip_isis_ipv6(struct vty
*vty
, const struct lyd_node
*dnode
,
217 if (!yang_dnode_get_bool(dnode
, NULL
))
219 vty_out(vty
, " ipv6 router isis %s\n",
220 yang_dnode_get_string(dnode
, "../area-tag"));
224 * XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring
230 "Enable BFD support\n")
232 const struct lyd_node
*dnode
;
234 dnode
= yang_dnode_getf(vty
->candidate_config
->dnode
,
235 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
237 vty_out(vty
, "ISIS is not enabled on this circuit\n");
241 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/bfd-monitoring/enabled",
242 NB_OP_MODIFY
, no
? "false" : "true");
244 return nb_cli_apply_changes(vty
, NULL
);
248 * XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring/profile
250 DEFPY_YANG(isis_bfd_profile
,
251 isis_bfd_profile_cmd
,
252 "[no] isis bfd profile BFDPROF$profile",
254 "Enable BFD support\n"
255 "Use a pre-configured profile\n"
258 const struct lyd_node
*dnode
;
260 dnode
= yang_dnode_getf(vty
->candidate_config
->dnode
,
261 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
263 vty_out(vty
, "ISIS is not enabled on this circuit\n");
268 nb_cli_enqueue_change(vty
,
269 "./frr-isisd:isis/bfd-monitoring/profile",
270 NB_OP_DESTROY
, NULL
);
272 nb_cli_enqueue_change(vty
,
273 "./frr-isisd:isis/bfd-monitoring/profile",
274 NB_OP_MODIFY
, profile
);
276 return nb_cli_apply_changes(vty
, NULL
);
279 void cli_show_ip_isis_bfd_monitoring(struct vty
*vty
,
280 const struct lyd_node
*dnode
,
283 if (!yang_dnode_get_bool(dnode
, "./enabled")) {
285 vty_out(vty
, " no isis bfd\n");
287 vty_out(vty
, " isis bfd\n");
290 if (yang_dnode_exists(dnode
, "./profile"))
291 vty_out(vty
, " isis bfd profile %s\n",
292 yang_dnode_get_string(dnode
, "./profile"));
296 * XPath: /frr-isisd:isis/instance/area-address
298 DEFPY_YANG(net
, net_cmd
, "[no] net WORD",
299 "Remove an existing Network Entity Title for this process\n"
300 "A Network Entity Title for this process (OSI only)\n"
301 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
303 nb_cli_enqueue_change(vty
, "./area-address",
304 no
? NB_OP_DESTROY
: NB_OP_CREATE
, net
);
306 return nb_cli_apply_changes(vty
, NULL
);
309 void cli_show_isis_area_address(struct vty
*vty
, const struct lyd_node
*dnode
,
312 vty_out(vty
, " net %s\n", yang_dnode_get_string(dnode
, NULL
));
316 * XPath: /frr-isisd:isis/instance/is-type
318 DEFPY_YANG(is_type
, is_type_cmd
, "is-type <level-1|level-1-2|level-2-only>$level",
319 "IS Level for this routing process (OSI only)\n"
320 "Act as a station router only\n"
321 "Act as both a station router and an area router\n"
322 "Act as an area router only\n")
324 nb_cli_enqueue_change(vty
, "./is-type", NB_OP_MODIFY
,
325 strmatch(level
, "level-2-only") ? "level-2"
328 return nb_cli_apply_changes(vty
, NULL
);
331 DEFPY_YANG(no_is_type
, no_is_type_cmd
,
332 "no is-type [<level-1|level-1-2|level-2-only>]",
334 "IS Level for this routing process (OSI only)\n"
335 "Act as a station router only\n"
336 "Act as both a station router and an area router\n"
337 "Act as an area router only\n")
339 nb_cli_enqueue_change(vty
, "./is-type", NB_OP_MODIFY
, NULL
);
341 return nb_cli_apply_changes(vty
, NULL
);
344 void cli_show_isis_is_type(struct vty
*vty
, const struct lyd_node
*dnode
,
347 int is_type
= yang_dnode_get_enum(dnode
, NULL
);
351 vty_out(vty
, " is-type level-1\n");
354 vty_out(vty
, " is-type level-2-only\n");
356 case IS_LEVEL_1_AND_2
:
357 vty_out(vty
, " is-type level-1-2\n");
363 * XPath: /frr-isisd:isis/instance/dynamic-hostname
365 DEFPY_YANG(dynamic_hostname
, dynamic_hostname_cmd
, "[no] hostname dynamic",
367 "Dynamic hostname for IS-IS\n"
368 "Dynamic hostname\n")
370 nb_cli_enqueue_change(vty
, "./dynamic-hostname", NB_OP_MODIFY
,
371 no
? "false" : "true");
373 return nb_cli_apply_changes(vty
, NULL
);
376 void cli_show_isis_dynamic_hostname(struct vty
*vty
,
377 const struct lyd_node
*dnode
,
380 if (!yang_dnode_get_bool(dnode
, NULL
))
383 vty_out(vty
, " hostname dynamic\n");
387 * XPath: /frr-isisd:isis/instance/overload
389 DEFPY_YANG(set_overload_bit
, set_overload_bit_cmd
, "[no] set-overload-bit",
390 "Reset overload bit to accept transit traffic\n"
391 "Set overload bit to avoid any transit traffic\n")
393 nb_cli_enqueue_change(vty
, "./overload/enabled", NB_OP_MODIFY
,
394 no
? "false" : "true");
396 return nb_cli_apply_changes(vty
, NULL
);
399 void cli_show_isis_overload(struct vty
*vty
, const struct lyd_node
*dnode
,
402 if (!yang_dnode_get_bool(dnode
, NULL
))
404 vty_out(vty
, " set-overload-bit\n");
408 * XPath: /frr-isisd:isis/instance/overload/on-startup
410 DEFPY_YANG(set_overload_bit_on_startup
, set_overload_bit_on_startup_cmd
,
411 "set-overload-bit on-startup (0-86400)$val",
412 "Set overload bit to avoid any transit traffic\n"
413 "Set overload bit on startup\n"
414 "Set overload time in seconds\n")
416 nb_cli_enqueue_change(vty
, "./overload/on-startup", NB_OP_MODIFY
,
419 return nb_cli_apply_changes(vty
, NULL
);
422 DEFPY_YANG(no_set_overload_bit_on_startup
, no_set_overload_bit_on_startup_cmd
,
423 "no set-overload-bit on-startup [(0-86400)$val]",
425 "Reset overload bit to accept transit traffic\n"
426 "Set overload bit on startup\n"
427 "Set overload time in seconds\n")
429 nb_cli_enqueue_change(vty
, "./overload/on-startup", NB_OP_DESTROY
,
432 return nb_cli_apply_changes(vty
, NULL
);
435 void cli_show_isis_overload_on_startup(struct vty
*vty
,
436 const struct lyd_node
*dnode
,
439 vty_out(vty
, " set-overload-bit on-startup %s\n",
440 yang_dnode_get_string(dnode
, NULL
));
444 * XPath: /frr-isisd:isis/instance/advertise-high-metrics
446 DEFPY_YANG(advertise_high_metrics
, advertise_high_metrics_cmd
,
447 "[no] advertise-high-metrics",
448 NO_STR
"Advertise high metric value on all interfaces\n")
450 nb_cli_enqueue_change(vty
, "./advertise-high-metrics", NB_OP_MODIFY
,
451 no
? "false" : "true");
453 return nb_cli_apply_changes(vty
, NULL
);
456 void cli_show_advertise_high_metrics(struct vty
*vty
,
457 const struct lyd_node
*dnode
,
460 if (yang_dnode_get_bool(dnode
, NULL
))
461 vty_out(vty
, " advertise-high-metrics\n");
462 else if (show_defaults
)
463 vty_out(vty
, " no advertise-high-metrics\n");
467 * XPath: /frr-isisd:isis/instance/attach-send
469 DEFPY_YANG(attached_bit_send
, attached_bit_send_cmd
, "[no] attached-bit send",
470 "Reset attached bit\n"
471 "Set attached bit for inter-area traffic\n"
472 "Set attached bit in LSP sent to L1 router\n")
474 nb_cli_enqueue_change(vty
, "./attach-send", NB_OP_MODIFY
,
475 no
? "false" : "true");
477 return nb_cli_apply_changes(vty
, NULL
);
480 void cli_show_isis_attached_send(struct vty
*vty
, const struct lyd_node
*dnode
,
483 if (!yang_dnode_get_bool(dnode
, NULL
))
485 vty_out(vty
, " attached-bit send\n");
489 * XPath: /frr-isisd:isis/instance/attach-receive-ignore
492 attached_bit_receive_ignore
, attached_bit_receive_ignore_cmd
,
493 "[no] attached-bit receive ignore",
494 "Reset attached bit\n"
495 "Set attach bit for inter-area traffic\n"
496 "If LSP received with attached bit set, create default route to neighbor\n"
497 "Do not process attached bit\n")
499 nb_cli_enqueue_change(vty
, "./attach-receive-ignore", NB_OP_MODIFY
,
500 no
? "false" : "true");
502 return nb_cli_apply_changes(vty
, NULL
);
505 void cli_show_isis_attached_receive(struct vty
*vty
,
506 const struct lyd_node
*dnode
,
509 if (!yang_dnode_get_bool(dnode
, NULL
))
511 vty_out(vty
, " attached-bit receive ignore\n");
515 * XPath: /frr-isisd:isis/instance/metric-style
517 DEFPY_YANG(metric_style
, metric_style_cmd
,
518 "metric-style <narrow|transition|wide>$style",
519 "Use old-style (ISO 10589) or new-style packet formats\n"
520 "Use old style of TLVs with narrow metric\n"
521 "Send and accept both styles of TLVs during transition\n"
522 "Use new style of TLVs to carry wider metric\n")
524 nb_cli_enqueue_change(vty
, "./metric-style", NB_OP_MODIFY
, style
);
526 return nb_cli_apply_changes(vty
, NULL
);
529 DEFPY_YANG(no_metric_style
, no_metric_style_cmd
,
530 "no metric-style [narrow|transition|wide]",
532 "Use old-style (ISO 10589) or new-style packet formats\n"
533 "Use old style of TLVs with narrow metric\n"
534 "Send and accept both styles of TLVs during transition\n"
535 "Use new style of TLVs to carry wider metric\n")
537 nb_cli_enqueue_change(vty
, "./metric-style", NB_OP_MODIFY
, NULL
);
539 return nb_cli_apply_changes(vty
, NULL
);
542 void cli_show_isis_metric_style(struct vty
*vty
, const struct lyd_node
*dnode
,
545 int metric
= yang_dnode_get_enum(dnode
, NULL
);
548 case ISIS_NARROW_METRIC
:
549 vty_out(vty
, " metric-style narrow\n");
551 case ISIS_WIDE_METRIC
:
552 vty_out(vty
, " metric-style wide\n");
554 case ISIS_TRANSITION_METRIC
:
555 vty_out(vty
, " metric-style transition\n");
561 * XPath: /frr-isisd:isis/instance/area-password
563 DEFPY_YANG(area_passwd
, area_passwd_cmd
,
564 "area-password <clear|md5>$pwd_type WORD$pwd [authenticate snp <send-only|validate>$snp]",
565 "Configure the authentication password for an area\n"
566 "Clear-text authentication type\n"
567 "MD5 authentication type\n"
568 "Level-wide password\n"
571 "Send but do not check PDUs on receiving\n"
572 "Send and check PDUs on receiving\n")
574 nb_cli_enqueue_change(vty
, "./area-password", NB_OP_CREATE
, NULL
);
575 nb_cli_enqueue_change(vty
, "./area-password/password", NB_OP_MODIFY
,
577 nb_cli_enqueue_change(vty
, "./area-password/password-type",
578 NB_OP_MODIFY
, pwd_type
);
579 nb_cli_enqueue_change(vty
, "./area-password/authenticate-snp",
580 NB_OP_MODIFY
, snp
? snp
: "none");
582 return nb_cli_apply_changes(vty
, NULL
);
585 void cli_show_isis_area_pwd(struct vty
*vty
, const struct lyd_node
*dnode
,
590 vty_out(vty
, " area-password %s %s",
591 yang_dnode_get_string(dnode
, "./password-type"),
592 yang_dnode_get_string(dnode
, "./password"));
593 snp
= yang_dnode_get_string(dnode
, "./authenticate-snp");
594 if (!strmatch("none", snp
))
595 vty_out(vty
, " authenticate snp %s", snp
);
600 * XPath: /frr-isisd:isis/instance/domain-password
602 DEFPY_YANG(domain_passwd
, domain_passwd_cmd
,
603 "domain-password <clear|md5>$pwd_type WORD$pwd [authenticate snp <send-only|validate>$snp]",
604 "Set the authentication password for a routing domain\n"
605 "Clear-text authentication type\n"
606 "MD5 authentication type\n"
607 "Level-wide password\n"
610 "Send but do not check PDUs on receiving\n"
611 "Send and check PDUs on receiving\n")
613 nb_cli_enqueue_change(vty
, "./domain-password", NB_OP_CREATE
, NULL
);
614 nb_cli_enqueue_change(vty
, "./domain-password/password", NB_OP_MODIFY
,
616 nb_cli_enqueue_change(vty
, "./domain-password/password-type",
617 NB_OP_MODIFY
, pwd_type
);
618 nb_cli_enqueue_change(vty
, "./domain-password/authenticate-snp",
619 NB_OP_MODIFY
, snp
? snp
: "none");
621 return nb_cli_apply_changes(vty
, NULL
);
624 DEFPY_YANG(no_area_passwd
, no_area_passwd_cmd
,
625 "no <area-password|domain-password>$cmd",
627 "Configure the authentication password for an area\n"
628 "Set the authentication password for a routing domain\n")
630 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
632 return nb_cli_apply_changes(vty
, "./%s", cmd
);
635 void cli_show_isis_domain_pwd(struct vty
*vty
, const struct lyd_node
*dnode
,
640 vty_out(vty
, " domain-password %s %s",
641 yang_dnode_get_string(dnode
, "./password-type"),
642 yang_dnode_get_string(dnode
, "./password"));
643 snp
= yang_dnode_get_string(dnode
, "./authenticate-snp");
644 if (!strmatch("none", snp
))
645 vty_out(vty
, " authenticate snp %s", snp
);
650 * XPath: /frr-isisd:isis/instance/lsp/timers/level-1/generation-interval
651 * XPath: /frr-isisd:isis/instance/lsp/timers/level-2/generation-interval
653 DEFPY_YANG(lsp_gen_interval
, lsp_gen_interval_cmd
,
654 "lsp-gen-interval [level-1|level-2]$level (1-120)$val",
655 "Minimum interval between regenerating same LSP\n"
656 "Set interval for level 1 only\n"
657 "Set interval for level 2 only\n"
658 "Minimum interval in seconds\n")
660 if (!level
|| strmatch(level
, "level-1"))
661 nb_cli_enqueue_change(
662 vty
, "./lsp/timers/level-1/generation-interval",
663 NB_OP_MODIFY
, val_str
);
664 if (!level
|| strmatch(level
, "level-2"))
665 nb_cli_enqueue_change(
666 vty
, "./lsp/timers/level-2/generation-interval",
667 NB_OP_MODIFY
, val_str
);
669 return nb_cli_apply_changes(vty
, NULL
);
672 DEFPY_YANG(no_lsp_gen_interval
, no_lsp_gen_interval_cmd
,
673 "no lsp-gen-interval [level-1|level-2]$level [(1-120)]",
675 "Minimum interval between regenerating same LSP\n"
676 "Set interval for level 1 only\n"
677 "Set interval for level 2 only\n"
678 "Minimum interval in seconds\n")
680 if (!level
|| strmatch(level
, "level-1"))
681 nb_cli_enqueue_change(
682 vty
, "./lsp/timers/level-1/generation-interval",
684 if (!level
|| strmatch(level
, "level-2"))
685 nb_cli_enqueue_change(
686 vty
, "./lsp/timers/level-2/generation-interval",
689 return nb_cli_apply_changes(vty
, NULL
);
693 * XPath: /frr-isisd:isis/instance/lsp/timers/level-1/refresh-interval
694 * XPath: /frr-isisd:isis/instance/lsp/timers/level-2/refresh-interval
696 DEFPY_YANG(lsp_refresh_interval
, lsp_refresh_interval_cmd
,
697 "lsp-refresh-interval [level-1|level-2]$level (1-65235)$val",
698 "LSP refresh interval\n"
699 "LSP refresh interval for Level 1 only\n"
700 "LSP refresh interval for Level 2 only\n"
701 "LSP refresh interval in seconds\n")
703 if (!level
|| strmatch(level
, "level-1"))
704 nb_cli_enqueue_change(vty
,
705 "./lsp/timers/level-1/refresh-interval",
706 NB_OP_MODIFY
, val_str
);
707 if (!level
|| strmatch(level
, "level-2"))
708 nb_cli_enqueue_change(vty
,
709 "./lsp/timers/level-2/refresh-interval",
710 NB_OP_MODIFY
, val_str
);
712 return nb_cli_apply_changes(vty
, NULL
);
715 DEFPY_YANG(no_lsp_refresh_interval
, no_lsp_refresh_interval_cmd
,
716 "no lsp-refresh-interval [level-1|level-2]$level [(1-65235)]",
718 "LSP refresh interval\n"
719 "LSP refresh interval for Level 1 only\n"
720 "LSP refresh interval for Level 2 only\n"
721 "LSP refresh interval in seconds\n")
723 if (!level
|| strmatch(level
, "level-1"))
724 nb_cli_enqueue_change(vty
,
725 "./lsp/timers/level-1/refresh-interval",
727 if (!level
|| strmatch(level
, "level-2"))
728 nb_cli_enqueue_change(vty
,
729 "./lsp/timers/level-2/refresh-interval",
732 return nb_cli_apply_changes(vty
, NULL
);
736 * XPath: /frr-isisd:isis/instance/lsp/timers/level-1/maximum-lifetime
737 * XPath: /frr-isisd:isis/instance/lsp/timers/level-1/maximum-lifetime
740 DEFPY_YANG(max_lsp_lifetime
, max_lsp_lifetime_cmd
,
741 "max-lsp-lifetime [level-1|level-2]$level (350-65535)$val",
742 "Maximum LSP lifetime\n"
743 "Maximum LSP lifetime for Level 1 only\n"
744 "Maximum LSP lifetime for Level 2 only\n"
745 "LSP lifetime in seconds\n")
747 if (!level
|| strmatch(level
, "level-1"))
748 nb_cli_enqueue_change(vty
,
749 "./lsp/timers/level-1/maximum-lifetime",
750 NB_OP_MODIFY
, val_str
);
751 if (!level
|| strmatch(level
, "level-2"))
752 nb_cli_enqueue_change(vty
,
753 "./lsp/timers/level-2/maximum-lifetime",
754 NB_OP_MODIFY
, val_str
);
756 return nb_cli_apply_changes(vty
, NULL
);
759 DEFPY_YANG(no_max_lsp_lifetime
, no_max_lsp_lifetime_cmd
,
760 "no max-lsp-lifetime [level-1|level-2]$level [(350-65535)]",
762 "Maximum LSP lifetime\n"
763 "Maximum LSP lifetime for Level 1 only\n"
764 "Maximum LSP lifetime for Level 2 only\n"
765 "LSP lifetime in seconds\n")
767 if (!level
|| strmatch(level
, "level-1"))
768 nb_cli_enqueue_change(vty
,
769 "./lsp/timers/level-1/maximum-lifetime",
771 if (!level
|| strmatch(level
, "level-2"))
772 nb_cli_enqueue_change(vty
,
773 "./lsp/timers/level-2/maximum-lifetime",
776 return nb_cli_apply_changes(vty
, NULL
);
779 /* unified LSP timers command
780 * XPath: /frr-isisd:isis/instance/lsp/timers
783 DEFPY_YANG(lsp_timers
, lsp_timers_cmd
,
784 "lsp-timers [level-1|level-2]$level gen-interval (1-120)$gen refresh-interval (1-65235)$refresh max-lifetime (350-65535)$lifetime",
785 "LSP-related timers\n"
786 "LSP-related timers for Level 1 only\n"
787 "LSP-related timers for Level 2 only\n"
788 "Minimum interval between regenerating same LSP\n"
789 "Generation interval in seconds\n"
790 "LSP refresh interval\n"
791 "LSP refresh interval in seconds\n"
792 "Maximum LSP lifetime\n"
793 "Maximum LSP lifetime in seconds\n")
795 if (!level
|| strmatch(level
, "level-1")) {
796 nb_cli_enqueue_change(
797 vty
, "./lsp/timers/level-1/generation-interval",
798 NB_OP_MODIFY
, gen_str
);
799 nb_cli_enqueue_change(vty
,
800 "./lsp/timers/level-1/refresh-interval",
801 NB_OP_MODIFY
, refresh_str
);
802 nb_cli_enqueue_change(vty
,
803 "./lsp/timers/level-1/maximum-lifetime",
804 NB_OP_MODIFY
, lifetime_str
);
806 if (!level
|| strmatch(level
, "level-2")) {
807 nb_cli_enqueue_change(
808 vty
, "./lsp/timers/level-2/generation-interval",
809 NB_OP_MODIFY
, gen_str
);
810 nb_cli_enqueue_change(vty
,
811 "./lsp/timers/level-2/refresh-interval",
812 NB_OP_MODIFY
, refresh_str
);
813 nb_cli_enqueue_change(vty
,
814 "./lsp/timers/level-2/maximum-lifetime",
815 NB_OP_MODIFY
, lifetime_str
);
818 return nb_cli_apply_changes(vty
, NULL
);
821 DEFPY_YANG(no_lsp_timers
, no_lsp_timers_cmd
,
822 "no lsp-timers [level-1|level-2]$level [gen-interval (1-120) refresh-interval (1-65235) max-lifetime (350-65535)]",
824 "LSP-related timers\n"
825 "LSP-related timers for Level 1 only\n"
826 "LSP-related timers for Level 2 only\n"
827 "Minimum interval between regenerating same LSP\n"
828 "Generation interval in seconds\n"
829 "LSP refresh interval\n"
830 "LSP refresh interval in seconds\n"
831 "Maximum LSP lifetime\n"
832 "Maximum LSP lifetime in seconds\n")
834 if (!level
|| strmatch(level
, "level-1")) {
835 nb_cli_enqueue_change(
836 vty
, "./lsp/timers/level-1/generation-interval",
838 nb_cli_enqueue_change(vty
,
839 "./lsp/timers/level-1/refresh-interval",
841 nb_cli_enqueue_change(vty
,
842 "./lsp/timers/level-1/maximum-lifetime",
845 if (!level
|| strmatch(level
, "level-2")) {
846 nb_cli_enqueue_change(
847 vty
, "./lsp/timers/level-2/generation-interval",
849 nb_cli_enqueue_change(vty
,
850 "./lsp/timers/level-2/refresh-interval",
852 nb_cli_enqueue_change(vty
,
853 "./lsp/timers/level-2/maximum-lifetime",
857 return nb_cli_apply_changes(vty
, NULL
);
860 void cli_show_isis_lsp_timers(struct vty
*vty
, const struct lyd_node
*dnode
,
863 const char *l1_refresh
=
864 yang_dnode_get_string(dnode
, "./level-1/refresh-interval");
865 const char *l2_refresh
=
866 yang_dnode_get_string(dnode
, "./level-2/refresh-interval");
867 const char *l1_lifetime
=
868 yang_dnode_get_string(dnode
, "./level-1/maximum-lifetime");
869 const char *l2_lifetime
=
870 yang_dnode_get_string(dnode
, "./level-2/maximum-lifetime");
872 yang_dnode_get_string(dnode
, "./level-1/generation-interval");
874 yang_dnode_get_string(dnode
, "./level-2/generation-interval");
875 if (strmatch(l1_refresh
, l2_refresh
)
876 && strmatch(l1_lifetime
, l2_lifetime
) && strmatch(l1_gen
, l2_gen
))
878 " lsp-timers gen-interval %s refresh-interval %s max-lifetime %s\n",
879 l1_gen
, l1_refresh
, l1_lifetime
);
882 " lsp-timers level-1 gen-interval %s refresh-interval %s max-lifetime %s\n",
883 l1_gen
, l1_refresh
, l1_lifetime
);
885 " lsp-timers level-2 gen-interval %s refresh-interval %s max-lifetime %s\n",
886 l2_gen
, l2_refresh
, l2_lifetime
);
891 * XPath: /frr-isisd:isis/instance/lsp/mtu
893 DEFPY_YANG(area_lsp_mtu
, area_lsp_mtu_cmd
, "lsp-mtu (128-4352)$val",
894 "Configure the maximum size of generated LSPs\n"
895 "Maximum size of generated LSPs\n")
897 nb_cli_enqueue_change(vty
, "./lsp/mtu", NB_OP_MODIFY
, val_str
);
899 return nb_cli_apply_changes(vty
, NULL
);
902 DEFPY_YANG(no_area_lsp_mtu
, no_area_lsp_mtu_cmd
, "no lsp-mtu [(128-4352)]",
904 "Configure the maximum size of generated LSPs\n"
905 "Maximum size of generated LSPs\n")
907 nb_cli_enqueue_change(vty
, "./lsp/mtu", NB_OP_MODIFY
, NULL
);
909 return nb_cli_apply_changes(vty
, NULL
);
912 void cli_show_isis_lsp_mtu(struct vty
*vty
, const struct lyd_node
*dnode
,
915 vty_out(vty
, " lsp-mtu %s\n", yang_dnode_get_string(dnode
, NULL
));
919 * XPath: /frr-isisd:isis/instance/advertise-passive-only
921 DEFPY_YANG(advertise_passive_only
, advertise_passive_only_cmd
,
922 "[no] advertise-passive-only",
923 NO_STR
"Advertise prefixes of passive interfaces only\n")
925 nb_cli_enqueue_change(vty
, "./advertise-passive-only", NB_OP_MODIFY
,
926 no
? "false" : "true");
928 return nb_cli_apply_changes(vty
, NULL
);
931 void cli_show_advertise_passive_only(struct vty
*vty
,
932 const struct lyd_node
*dnode
,
935 if (!yang_dnode_get_bool(dnode
, NULL
))
938 vty_out(vty
, " advertise-passive-only\n");
942 * XPath: /frr-isisd:isis/instance/spf/minimum-interval
944 DEFPY_YANG(spf_interval
, spf_interval_cmd
,
945 "spf-interval [level-1|level-2]$level (1-120)$val",
946 "Minimum interval between SPF calculations\n"
947 "Set interval for level 1 only\n"
948 "Set interval for level 2 only\n"
949 "Minimum interval between consecutive SPFs in seconds\n")
951 if (!level
|| strmatch(level
, "level-1"))
952 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-1",
953 NB_OP_MODIFY
, val_str
);
954 if (!level
|| strmatch(level
, "level-2"))
955 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-2",
956 NB_OP_MODIFY
, val_str
);
958 return nb_cli_apply_changes(vty
, NULL
);
961 DEFPY_YANG(no_spf_interval
, no_spf_interval_cmd
,
962 "no spf-interval [level-1|level-2]$level [(1-120)]",
964 "Minimum interval between SPF calculations\n"
965 "Set interval for level 1 only\n"
966 "Set interval for level 2 only\n"
967 "Minimum interval between consecutive SPFs in seconds\n")
969 if (!level
|| strmatch(level
, "level-1"))
970 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-1",
972 if (!level
|| strmatch(level
, "level-2"))
973 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-2",
976 return nb_cli_apply_changes(vty
, NULL
);
979 void cli_show_isis_spf_min_interval(struct vty
*vty
,
980 const struct lyd_node
*dnode
,
983 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
984 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
986 if (strmatch(l1
, l2
))
987 vty_out(vty
, " spf-interval %s\n", l1
);
989 vty_out(vty
, " spf-interval level-1 %s\n", l1
);
990 vty_out(vty
, " spf-interval level-2 %s\n", l2
);
995 * XPath: /frr-isisd:isis/instance/spf/ietf-backoff-delay
997 DEFPY_YANG(spf_delay_ietf
, spf_delay_ietf_cmd
,
998 "spf-delay-ietf init-delay (0-60000) short-delay (0-60000) long-delay (0-60000) holddown (0-60000) time-to-learn (0-60000)",
999 "IETF SPF delay algorithm\n"
1000 "Delay used while in QUIET state\n"
1001 "Delay used while in QUIET state in milliseconds\n"
1002 "Delay used while in SHORT_WAIT state\n"
1003 "Delay used while in SHORT_WAIT state in milliseconds\n"
1004 "Delay used while in LONG_WAIT\n"
1005 "Delay used while in LONG_WAIT state in milliseconds\n"
1006 "Time with no received IGP events before considering IGP stable\n"
1007 "Time with no received IGP events before considering IGP stable (in milliseconds)\n"
1008 "Maximum duration needed to learn all the events related to a single failure\n"
1009 "Maximum duration needed to learn all the events related to a single failure (in milliseconds)\n")
1011 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay", NB_OP_CREATE
,
1013 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/init-delay",
1014 NB_OP_MODIFY
, init_delay_str
);
1015 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/short-delay",
1016 NB_OP_MODIFY
, short_delay_str
);
1017 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/long-delay",
1018 NB_OP_MODIFY
, long_delay_str
);
1019 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/hold-down",
1020 NB_OP_MODIFY
, holddown_str
);
1021 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/time-to-learn",
1022 NB_OP_MODIFY
, time_to_learn_str
);
1024 return nb_cli_apply_changes(vty
, NULL
);
1027 DEFPY_YANG(no_spf_delay_ietf
, no_spf_delay_ietf_cmd
,
1028 "no spf-delay-ietf [init-delay (0-60000) short-delay (0-60000) long-delay (0-60000) holddown (0-60000) time-to-learn (0-60000)]",
1030 "IETF SPF delay algorithm\n"
1031 "Delay used while in QUIET state\n"
1032 "Delay used while in QUIET state in milliseconds\n"
1033 "Delay used while in SHORT_WAIT state\n"
1034 "Delay used while in SHORT_WAIT state in milliseconds\n"
1035 "Delay used while in LONG_WAIT\n"
1036 "Delay used while in LONG_WAIT state in milliseconds\n"
1037 "Time with no received IGP events before considering IGP stable\n"
1038 "Time with no received IGP events before considering IGP stable (in milliseconds)\n"
1039 "Maximum duration needed to learn all the events related to a single failure\n"
1040 "Maximum duration needed to learn all the events related to a single failure (in milliseconds)\n")
1042 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay", NB_OP_DESTROY
,
1045 return nb_cli_apply_changes(vty
, NULL
);
1048 void cli_show_isis_spf_ietf_backoff(struct vty
*vty
,
1049 const struct lyd_node
*dnode
,
1053 " spf-delay-ietf init-delay %s short-delay %s long-delay %s holddown %s time-to-learn %s\n",
1054 yang_dnode_get_string(dnode
, "./init-delay"),
1055 yang_dnode_get_string(dnode
, "./short-delay"),
1056 yang_dnode_get_string(dnode
, "./long-delay"),
1057 yang_dnode_get_string(dnode
, "./hold-down"),
1058 yang_dnode_get_string(dnode
, "./time-to-learn"));
1062 * XPath: /frr-isisd:isis/instance/spf/prefix-priorities/medium/access-list-name
1064 DEFPY_YANG(spf_prefix_priority
, spf_prefix_priority_cmd
,
1065 "spf prefix-priority <critical|high|medium>$priority ACCESSLIST_NAME$acl_name",
1066 "SPF configuration\n"
1067 "Configure a prefix priority list\n"
1068 "Specify critical priority prefixes\n"
1069 "Specify high priority prefixes\n"
1070 "Specify medium priority prefixes\n"
1071 "Access-list name\n")
1073 char xpath
[XPATH_MAXLEN
];
1075 snprintf(xpath
, XPATH_MAXLEN
,
1076 "./spf/prefix-priorities/%s/access-list-name", priority
);
1077 nb_cli_enqueue_change(vty
, xpath
, NB_OP_CREATE
, acl_name
);
1079 return nb_cli_apply_changes(vty
, NULL
);
1082 DEFPY_YANG(no_spf_prefix_priority
, no_spf_prefix_priority_cmd
,
1083 "no spf prefix-priority <critical|high|medium>$priority [ACCESSLIST_NAME]",
1085 "SPF configuration\n"
1086 "Configure a prefix priority list\n"
1087 "Specify critical priority prefixes\n"
1088 "Specify high priority prefixes\n"
1089 "Specify medium priority prefixes\n"
1090 "Access-list name\n")
1092 char xpath
[XPATH_MAXLEN
];
1094 snprintf(xpath
, XPATH_MAXLEN
,
1095 "./spf/prefix-priorities/%s/access-list-name", priority
);
1096 nb_cli_enqueue_change(vty
, xpath
, NB_OP_DESTROY
, NULL
);
1098 return nb_cli_apply_changes(vty
, NULL
);
1101 void cli_show_isis_spf_prefix_priority(struct vty
*vty
,
1102 const struct lyd_node
*dnode
,
1105 vty_out(vty
, " spf prefix-priority %s %s\n",
1106 dnode
->parent
->schema
->name
,
1107 yang_dnode_get_string(dnode
, NULL
));
1111 * XPath: /frr-isisd:isis/instance/purge-originator
1113 DEFPY_YANG(area_purge_originator
, area_purge_originator_cmd
, "[no] purge-originator",
1114 NO_STR
"Use the RFC 6232 purge-originator\n")
1116 nb_cli_enqueue_change(vty
, "./purge-originator", NB_OP_MODIFY
,
1117 no
? "false" : "true");
1119 return nb_cli_apply_changes(vty
, NULL
);
1122 void cli_show_isis_purge_origin(struct vty
*vty
, const struct lyd_node
*dnode
,
1125 if (!yang_dnode_get_bool(dnode
, NULL
))
1126 vty_out(vty
, " no");
1127 vty_out(vty
, " purge-originator\n");
1132 * XPath: /frr-isisd:isis/instance/admin-group-send-zero
1134 DEFPY_YANG(isis_admin_group_send_zero
, isis_admin_group_send_zero_cmd
,
1135 "[no] admin-group-send-zero",
1137 "Allow sending the default admin-group value of 0x00000000.\n")
1139 nb_cli_enqueue_change(vty
, "./admin-group-send-zero", NB_OP_MODIFY
,
1140 no
? "false" : "true");
1142 return nb_cli_apply_changes(vty
, NULL
);
1145 void cli_show_isis_admin_group_send_zero(struct vty
*vty
,
1146 const struct lyd_node
*dnode
,
1149 if (!yang_dnode_get_bool(dnode
, NULL
))
1150 vty_out(vty
, " no");
1151 vty_out(vty
, " admin-group-send-zero\n");
1156 * XPath: /frr-isisd:isis/instance/asla-legacy-flag
1158 DEFPY_HIDDEN(isis_asla_legacy_flag
, isis_asla_legacy_flag_cmd
,
1159 "[no] asla-legacy-flag",
1160 NO_STR
"Set the legacy flag (aka. L-FLAG) in the ASLA Sub-TLV.\n")
1162 nb_cli_enqueue_change(vty
, "./asla-legacy-flag", NB_OP_MODIFY
,
1163 no
? "false" : "true");
1165 return nb_cli_apply_changes(vty
, NULL
);
1168 void cli_show_isis_asla_legacy_flag(struct vty
*vty
,
1169 const struct lyd_node
*dnode
,
1172 if (!yang_dnode_get_bool(dnode
, NULL
))
1173 vty_out(vty
, " no");
1174 vty_out(vty
, " asla-legacy-flag\n");
1178 * XPath: /frr-isisd:isis/instance/mpls-te
1180 DEFPY_YANG(isis_mpls_te_on
, isis_mpls_te_on_cmd
, "mpls-te on",
1181 MPLS_TE_STR
"Enable the MPLS-TE functionality\n")
1183 nb_cli_enqueue_change(vty
, "./mpls-te", NB_OP_CREATE
,
1186 return nb_cli_apply_changes(vty
, NULL
);
1189 DEFPY_YANG(no_isis_mpls_te_on
, no_isis_mpls_te_on_cmd
, "no mpls-te [on]",
1191 "Disable the MPLS-TE functionality\n"
1192 "Disable the MPLS-TE functionality\n")
1194 nb_cli_enqueue_change(vty
, "./mpls-te", NB_OP_DESTROY
,
1197 return nb_cli_apply_changes(vty
, NULL
);
1200 void cli_show_isis_mpls_te(struct vty
*vty
, const struct lyd_node
*dnode
,
1203 vty_out(vty
, " mpls-te on\n");
1207 * XPath: /frr-isisd:isis/instance/mpls-te/router-address
1209 DEFPY_YANG(isis_mpls_te_router_addr
, isis_mpls_te_router_addr_cmd
,
1210 "mpls-te router-address A.B.C.D",
1212 "Stable IP address of the advertising router\n"
1213 "MPLS-TE router address in IPv4 address format\n")
1215 nb_cli_enqueue_change(vty
, "./mpls-te/router-address",
1216 NB_OP_MODIFY
, router_address_str
);
1218 return nb_cli_apply_changes(vty
, NULL
);
1221 DEFPY_YANG(no_isis_mpls_te_router_addr
, no_isis_mpls_te_router_addr_cmd
,
1222 "no mpls-te router-address [A.B.C.D]",
1224 "Delete IP address of the advertising router\n"
1225 "MPLS-TE router address in IPv4 address format\n")
1227 nb_cli_enqueue_change(vty
, "./mpls-te/router-address",
1228 NB_OP_DESTROY
, NULL
);
1230 return nb_cli_apply_changes(vty
, NULL
);
1233 void cli_show_isis_mpls_te_router_addr(struct vty
*vty
,
1234 const struct lyd_node
*dnode
,
1237 vty_out(vty
, " mpls-te router-address %s\n",
1238 yang_dnode_get_string(dnode
, NULL
));
1242 * XPath: /frr-isisd:isis/instance/mpls-te/router-address-v6
1244 DEFPY_YANG(isis_mpls_te_router_addr_v6
, isis_mpls_te_router_addr_v6_cmd
,
1245 "mpls-te router-address ipv6 X:X::X:X",
1247 "Stable IP address of the advertising router\n"
1249 "MPLS-TE router address in IPv6 address format\n")
1251 nb_cli_enqueue_change(vty
, "./mpls-te/router-address-v6", NB_OP_MODIFY
,
1254 return nb_cli_apply_changes(vty
, NULL
);
1257 DEFPY_YANG(no_isis_mpls_te_router_addr_v6
, no_isis_mpls_te_router_addr_v6_cmd
,
1258 "no mpls-te router-address ipv6 [X:X::X:X]",
1260 "Delete IP address of the advertising router\n"
1262 "MPLS-TE router address in IPv6 address format\n")
1264 nb_cli_enqueue_change(vty
, "./mpls-te/router-address-v6", NB_OP_DESTROY
,
1267 return nb_cli_apply_changes(vty
, NULL
);
1270 void cli_show_isis_mpls_te_router_addr_ipv6(struct vty
*vty
,
1271 const struct lyd_node
*dnode
,
1274 vty_out(vty
, " mpls-te router-address ipv6 %s\n",
1275 yang_dnode_get_string(dnode
, NULL
));
1278 DEFPY_YANG(isis_mpls_te_inter_as
, isis_mpls_te_inter_as_cmd
,
1279 "[no] mpls-te inter-as [level-1|level-1-2|level-2-only]",
1281 "Configure MPLS-TE Inter-AS support\n"
1282 "AREA native mode self originate INTER-AS LSP with L1 only flooding scope\n"
1283 "AREA native mode self originate INTER-AS LSP with L1 and L2 flooding scope\n"
1284 "AS native mode self originate INTER-AS LSP with L2 only flooding scope\n")
1286 vty_out(vty
, "MPLS-TE Inter-AS is not yet supported\n");
1291 * XPath: /frr-isisd:isis/instance/mpls-te/export
1293 DEFPY_YANG(isis_mpls_te_export
, isis_mpls_te_export_cmd
, "mpls-te export",
1294 MPLS_TE_STR
"Enable export of MPLS-TE Link State information\n")
1296 nb_cli_enqueue_change(vty
, "./mpls-te/export", NB_OP_MODIFY
, "true");
1298 return nb_cli_apply_changes(vty
, NULL
);
1301 DEFPY_YANG(no_isis_mpls_te_export
, no_isis_mpls_te_export_cmd
,
1302 "no mpls-te export",
1304 "Disable export of MPLS-TE Link State information\n")
1306 nb_cli_enqueue_change(vty
, "./mpls-te/export", NB_OP_MODIFY
, "false");
1308 return nb_cli_apply_changes(vty
, NULL
);
1311 void cli_show_isis_mpls_te_export(struct vty
*vty
, const struct lyd_node
*dnode
,
1314 if (!yang_dnode_get_bool(dnode
, NULL
))
1315 vty_out(vty
, " no");
1317 vty_out(vty
, " mpls-te export\n");
1321 * XPath: /frr-isisd:isis/instance/default-information-originate
1323 DEFPY_YANG(isis_default_originate
, isis_default_originate_cmd
,
1324 "[no] default-information originate <ipv4|ipv6>$ip <level-1|level-2>$level [always]$always [{metric (0-16777215)$metric|route-map RMAP_NAME$rmap}]",
1326 "Control distribution of default information\n"
1327 "Distribute a default route\n"
1328 "Distribute default route for IPv4\n"
1329 "Distribute default route for IPv6\n"
1330 "Distribute default route into level-1\n"
1331 "Distribute default route into level-2\n"
1332 "Always advertise default route\n"
1333 "Metric for default route\n"
1334 "IS-IS default metric\n"
1335 "Route map reference\n"
1336 "Pointer to route-map entries\n")
1339 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1341 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1342 nb_cli_enqueue_change(vty
, "./always", NB_OP_MODIFY
,
1343 always
? "true" : "false");
1344 nb_cli_enqueue_change(vty
, "./route-map",
1345 rmap
? NB_OP_MODIFY
: NB_OP_DESTROY
,
1346 rmap
? rmap
: NULL
);
1347 nb_cli_enqueue_change(vty
, "./metric", NB_OP_MODIFY
,
1348 metric_str
? metric_str
: NULL
);
1349 if (strmatch(ip
, "ipv6") && !always
) {
1351 "Zebra doesn't implement default-originate for IPv6 yet\n");
1353 "so use with care or use default-originate always.\n");
1357 return nb_cli_apply_changes(
1358 vty
, "./default-information-originate/%s[level='%s']", ip
,
1362 static void vty_print_def_origin(struct vty
*vty
, const struct lyd_node
*dnode
,
1363 const char *family
, const char *level
,
1366 vty_out(vty
, " default-information originate %s %s", family
, level
);
1367 if (yang_dnode_get_bool(dnode
, "./always"))
1368 vty_out(vty
, " always");
1370 if (yang_dnode_exists(dnode
, "./route-map"))
1371 vty_out(vty
, " route-map %s",
1372 yang_dnode_get_string(dnode
, "./route-map"));
1373 if (show_defaults
|| !yang_dnode_is_default(dnode
, "./metric"))
1374 vty_out(vty
, " metric %s",
1375 yang_dnode_get_string(dnode
, "./metric"));
1380 void cli_show_isis_def_origin_ipv4(struct vty
*vty
,
1381 const struct lyd_node
*dnode
,
1384 const char *level
= yang_dnode_get_string(dnode
, "./level");
1386 vty_print_def_origin(vty
, dnode
, "ipv4", level
, show_defaults
);
1389 void cli_show_isis_def_origin_ipv6(struct vty
*vty
,
1390 const struct lyd_node
*dnode
,
1393 const char *level
= yang_dnode_get_string(dnode
, "./level");
1395 vty_print_def_origin(vty
, dnode
, "ipv6", level
, show_defaults
);
1399 * XPath: /frr-isisd:isis/instance/redistribute
1401 DEFPY_YANG(isis_redistribute
, isis_redistribute_cmd
,
1402 "[no] redistribute <ipv4$ip " PROTO_IP_REDIST_STR
"$proto|ipv6$ip "
1403 PROTO_IP6_REDIST_STR
"$proto> <level-1|level-2>$level"
1404 "[{metric (0-16777215)|route-map RMAP_NAME$route_map}]",
1406 "Redistribute IPv4 routes\n"
1407 PROTO_IP_REDIST_HELP
1408 "Redistribute IPv6 routes\n"
1409 PROTO_IP6_REDIST_HELP
1410 "Redistribute into level-1\n"
1411 "Redistribute into level-2\n"
1412 "Metric for redistributed routes\n"
1413 "IS-IS default metric\n"
1414 "Route map reference\n"
1415 "Pointer to route-map entries\n")
1418 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1420 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1421 nb_cli_enqueue_change(vty
, "./route-map",
1422 route_map
? NB_OP_MODIFY
: NB_OP_DESTROY
,
1423 route_map
? route_map
: NULL
);
1424 nb_cli_enqueue_change(vty
, "./metric", NB_OP_MODIFY
,
1425 metric_str
? metric_str
: NULL
);
1428 return nb_cli_apply_changes(
1429 vty
, "./redistribute/%s[protocol='%s'][level='%s']", ip
, proto
,
1433 static void vty_print_redistribute(struct vty
*vty
,
1434 const struct lyd_node
*dnode
,
1435 bool show_defaults
, const char *family
)
1437 const char *level
= yang_dnode_get_string(dnode
, "./level");
1438 const char *protocol
= yang_dnode_get_string(dnode
, "./protocol");
1440 vty_out(vty
, " redistribute %s %s %s", family
, protocol
, level
);
1441 if (show_defaults
|| !yang_dnode_is_default(dnode
, "./metric"))
1442 vty_out(vty
, " metric %s",
1443 yang_dnode_get_string(dnode
, "./metric"));
1444 if (yang_dnode_exists(dnode
, "./route-map"))
1445 vty_out(vty
, " route-map %s",
1446 yang_dnode_get_string(dnode
, "./route-map"));
1450 void cli_show_isis_redistribute_ipv4(struct vty
*vty
,
1451 const struct lyd_node
*dnode
,
1454 vty_print_redistribute(vty
, dnode
, show_defaults
, "ipv4");
1456 void cli_show_isis_redistribute_ipv6(struct vty
*vty
,
1457 const struct lyd_node
*dnode
,
1460 vty_print_redistribute(vty
, dnode
, show_defaults
, "ipv6");
1464 * XPath: /frr-isisd:isis/instance/multi-topology
1467 isis_topology
, isis_topology_cmd
,
1468 "[no] topology <standard|ipv4-unicast|ipv4-mgmt|ipv6-unicast|ipv4-multicast|ipv6-multicast|ipv6-mgmt|ipv6-dstsrc>$topology [overload]$overload",
1470 "Configure IS-IS topologies\n"
1471 "standard topology\n"
1472 "IPv4 unicast topology\n"
1473 "IPv4 management topology\n"
1474 "IPv6 unicast topology\n"
1475 "IPv4 multicast topology\n"
1476 "IPv6 multicast topology\n"
1477 "IPv6 management topology\n"
1478 "IPv6 dst-src topology\n"
1479 "Set overload bit for topology\n")
1481 char base_xpath
[XPATH_MAXLEN
];
1483 /* Since standard is not configurable it is not present in the
1484 * YANG model, so we need to validate it here
1486 if (strmatch(topology
, "standard") ||
1487 strmatch(topology
, "ipv4-unicast")) {
1489 "Cannot configure IPv4 unicast (Standard) topology\n");
1490 return CMD_WARNING_CONFIG_FAILED
;
1493 if (strmatch(topology
, "ipv4-mgmt"))
1494 snprintf(base_xpath
, XPATH_MAXLEN
,
1495 "./multi-topology/ipv4-management");
1496 else if (strmatch(topology
, "ipv6-mgmt"))
1497 snprintf(base_xpath
, XPATH_MAXLEN
,
1498 "./multi-topology/ipv6-management");
1500 snprintf(base_xpath
, XPATH_MAXLEN
, "./multi-topology/%s",
1504 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1506 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1507 nb_cli_enqueue_change(vty
, "./overload", NB_OP_MODIFY
,
1508 overload
? "true" : "false");
1511 return nb_cli_apply_changes(vty
, "%s", base_xpath
);
1514 void cli_show_isis_mt_ipv4_multicast(struct vty
*vty
,
1515 const struct lyd_node
*dnode
,
1518 vty_out(vty
, " topology ipv4-multicast");
1519 if (yang_dnode_get_bool(dnode
, "./overload"))
1520 vty_out(vty
, " overload");
1524 void cli_show_isis_mt_ipv4_mgmt(struct vty
*vty
, const struct lyd_node
*dnode
,
1527 vty_out(vty
, " topology ipv4-mgmt");
1528 if (yang_dnode_get_bool(dnode
, "./overload"))
1529 vty_out(vty
, " overload");
1533 void cli_show_isis_mt_ipv6_unicast(struct vty
*vty
,
1534 const struct lyd_node
*dnode
,
1537 vty_out(vty
, " topology ipv6-unicast");
1538 if (yang_dnode_get_bool(dnode
, "./overload"))
1539 vty_out(vty
, " overload");
1543 void cli_show_isis_mt_ipv6_multicast(struct vty
*vty
,
1544 const struct lyd_node
*dnode
,
1547 vty_out(vty
, " topology ipv6-multicast");
1548 if (yang_dnode_get_bool(dnode
, "./overload"))
1549 vty_out(vty
, " overload");
1553 void cli_show_isis_mt_ipv6_mgmt(struct vty
*vty
, const struct lyd_node
*dnode
,
1556 vty_out(vty
, " topology ipv6-mgmt");
1557 if (yang_dnode_get_bool(dnode
, "./overload"))
1558 vty_out(vty
, " overload");
1562 void cli_show_isis_mt_ipv6_dstsrc(struct vty
*vty
, const struct lyd_node
*dnode
,
1565 vty_out(vty
, " topology ipv6-dstsrc");
1566 if (yang_dnode_get_bool(dnode
, "./overload"))
1567 vty_out(vty
, " overload");
1572 * XPath: /frr-isisd:isis/instance/segment-routing/enabled
1574 DEFPY_YANG (isis_sr_enable
,
1576 "segment-routing on",
1578 "Enable Segment Routing\n")
1580 nb_cli_enqueue_change(vty
, "./segment-routing/enabled", NB_OP_MODIFY
,
1583 return nb_cli_apply_changes(vty
, NULL
);
1586 DEFPY_YANG (no_isis_sr_enable
,
1587 no_isis_sr_enable_cmd
,
1588 "no segment-routing [on]",
1591 "Disable Segment Routing\n")
1593 nb_cli_enqueue_change(vty
, "./segment-routing/enabled", NB_OP_MODIFY
,
1596 return nb_cli_apply_changes(vty
, NULL
);
1599 void cli_show_isis_sr_enabled(struct vty
*vty
, const struct lyd_node
*dnode
,
1602 if (!yang_dnode_get_bool(dnode
, NULL
))
1603 vty_out(vty
, " no");
1605 vty_out(vty
, " segment-routing on\n");
1609 * XPath: /frr-isisd:isis/instance/segment-routing/label-block
1613 isis_sr_global_block_label_range
, isis_sr_global_block_label_range_cmd
,
1614 "segment-routing global-block (16-1048575)$gb_lower_bound (16-1048575)$gb_upper_bound [local-block (16-1048575)$lb_lower_bound (16-1048575)$lb_upper_bound]",
1616 "Segment Routing Global Block label range\n"
1617 "The lower bound of the global block\n"
1618 "The upper bound of the global block (block size may not exceed 65535)\n"
1619 "Segment Routing Local Block label range\n"
1620 "The lower bound of the local block\n"
1621 "The upper bound of the local block (block size may not exceed 65535)\n")
1623 nb_cli_enqueue_change(vty
,
1624 "./segment-routing/label-blocks/srgb/lower-bound",
1625 NB_OP_MODIFY
, gb_lower_bound_str
);
1626 nb_cli_enqueue_change(vty
,
1627 "./segment-routing/label-blocks/srgb/upper-bound",
1628 NB_OP_MODIFY
, gb_upper_bound_str
);
1630 nb_cli_enqueue_change(
1631 vty
, "./segment-routing/label-blocks/srlb/lower-bound",
1632 NB_OP_MODIFY
, lb_lower_bound
? lb_lower_bound_str
: NULL
);
1633 nb_cli_enqueue_change(
1634 vty
, "./segment-routing/label-blocks/srlb/upper-bound",
1635 NB_OP_MODIFY
, lb_upper_bound
? lb_upper_bound_str
: NULL
);
1637 return nb_cli_apply_changes(vty
, NULL
);
1640 DEFPY_YANG(no_isis_sr_global_block_label_range
,
1641 no_isis_sr_global_block_label_range_cmd
,
1642 "no segment-routing global-block [(16-1048575) (16-1048575) local-block (16-1048575) (16-1048575)]",
1644 "Segment Routing Global Block label range\n"
1645 "The lower bound of the global block\n"
1646 "The upper bound of the global block (block size may not exceed 65535)\n"
1647 "Segment Routing Local Block label range\n"
1648 "The lower bound of the local block\n"
1649 "The upper bound of the local block (block size may not exceed 65535)\n")
1651 nb_cli_enqueue_change(vty
,
1652 "./segment-routing/label-blocks/srgb/lower-bound",
1653 NB_OP_MODIFY
, NULL
);
1654 nb_cli_enqueue_change(vty
,
1655 "./segment-routing/label-blocks/srgb/upper-bound",
1656 NB_OP_MODIFY
, NULL
);
1657 nb_cli_enqueue_change(vty
,
1658 "./segment-routing/label-blocks/srlb/lower-bound",
1659 NB_OP_MODIFY
, NULL
);
1660 nb_cli_enqueue_change(vty
,
1661 "./segment-routing/label-blocks/srlb/upper-bound",
1662 NB_OP_MODIFY
, NULL
);
1664 return nb_cli_apply_changes(vty
, NULL
);
1667 void cli_show_isis_label_blocks(struct vty
*vty
, const struct lyd_node
*dnode
,
1670 vty_out(vty
, " segment-routing global-block %s %s",
1671 yang_dnode_get_string(dnode
, "./srgb/lower-bound"),
1672 yang_dnode_get_string(dnode
, "./srgb/upper-bound"));
1673 if (!yang_dnode_is_default(dnode
, "./srlb/lower-bound")
1674 || !yang_dnode_is_default(dnode
, "./srlb/upper-bound"))
1675 vty_out(vty
, " local-block %s %s",
1676 yang_dnode_get_string(dnode
, "./srlb/lower-bound"),
1677 yang_dnode_get_string(dnode
, "./srlb/upper-bound"));
1682 * XPath: /frr-isisd:isis/instance/segment-routing/msd/node-msd
1684 DEFPY_YANG (isis_sr_node_msd
,
1685 isis_sr_node_msd_cmd
,
1686 "segment-routing node-msd (1-16)$msd",
1688 "Maximum Stack Depth for this router\n"
1689 "Maximum number of label that can be stack (1-16)\n")
1691 nb_cli_enqueue_change(vty
, "./segment-routing/msd/node-msd",
1692 NB_OP_MODIFY
, msd_str
);
1694 return nb_cli_apply_changes(vty
, NULL
);
1697 DEFPY_YANG (no_isis_sr_node_msd
,
1698 no_isis_sr_node_msd_cmd
,
1699 "no segment-routing node-msd [(1-16)]",
1702 "Maximum Stack Depth for this router\n"
1703 "Maximum number of label that can be stack (1-16)\n")
1705 nb_cli_enqueue_change(vty
, "./segment-routing/msd/node-msd",
1706 NB_OP_DESTROY
, NULL
);
1708 return nb_cli_apply_changes(vty
, NULL
);
1711 void cli_show_isis_node_msd(struct vty
*vty
, const struct lyd_node
*dnode
,
1714 vty_out(vty
, " segment-routing node-msd %s\n",
1715 yang_dnode_get_string(dnode
, NULL
));
1719 * XPath: /frr-isisd:isis/instance/segment-routing/prefix-sid-map/prefix-sid
1721 DEFPY_YANG (isis_sr_prefix_sid
,
1722 isis_sr_prefix_sid_cmd
,
1723 "segment-routing prefix\
1724 <A.B.C.D/M|X:X::X:X/M>$prefix\
1725 <absolute$sid_type (16-1048575)$sid_value|index$sid_type (0-65535)$sid_value>\
1726 [<no-php-flag|explicit-null>$lh_behavior] [n-flag-clear$n_flag_clear]",
1731 "Specify the absolute value of Prefix Segment ID\n"
1732 "The Prefix Segment ID value\n"
1733 "Specify the index of Prefix Segment ID\n"
1734 "The Prefix Segment ID index\n"
1735 "Don't request Penultimate Hop Popping (PHP)\n"
1736 "Upstream neighbor must replace prefix-sid with explicit null label\n"
1739 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1740 nb_cli_enqueue_change(vty
, "./sid-value-type", NB_OP_MODIFY
, sid_type
);
1741 nb_cli_enqueue_change(vty
, "./sid-value", NB_OP_MODIFY
, sid_value_str
);
1745 if (strmatch(lh_behavior
, "no-php-flag"))
1747 else if (strmatch(lh_behavior
, "explicit-null"))
1748 value
= "explicit-null";
1752 nb_cli_enqueue_change(vty
, "./last-hop-behavior", NB_OP_MODIFY
,
1755 nb_cli_enqueue_change(vty
, "./last-hop-behavior", NB_OP_MODIFY
,
1757 nb_cli_enqueue_change(vty
, "./n-flag-clear", NB_OP_MODIFY
,
1758 n_flag_clear
? "true" : "false");
1760 return nb_cli_apply_changes(
1761 vty
, "./segment-routing/prefix-sid-map/prefix-sid[prefix='%s']",
1765 DEFPY_YANG (no_isis_sr_prefix_sid
,
1766 no_isis_sr_prefix_sid_cmd
,
1767 "no segment-routing prefix <A.B.C.D/M|X:X::X:X/M>$prefix\
1768 [<absolute$sid_type (16-1048575)|index (0-65535)> [<no-php-flag|explicit-null>]]\
1775 "Specify the absolute value of Prefix Segment ID\n"
1776 "The Prefix Segment ID value\n"
1777 "Specify the index of Prefix Segment ID\n"
1778 "The Prefix Segment ID index\n"
1779 "Don't request Penultimate Hop Popping (PHP)\n"
1780 "Upstream neighbor must replace prefix-sid with explicit null label\n"
1783 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1785 return nb_cli_apply_changes(
1786 vty
, "./segment-routing/prefix-sid-map/prefix-sid[prefix='%s']",
1790 void cli_show_isis_prefix_sid(struct vty
*vty
, const struct lyd_node
*dnode
,
1794 const char *lh_behavior
;
1795 const char *sid_value_type
;
1796 const char *sid_value
;
1799 prefix
= yang_dnode_get_string(dnode
, "./prefix");
1800 lh_behavior
= yang_dnode_get_string(dnode
, "./last-hop-behavior");
1801 sid_value_type
= yang_dnode_get_string(dnode
, "./sid-value-type");
1802 sid_value
= yang_dnode_get_string(dnode
, "./sid-value");
1803 n_flag_clear
= yang_dnode_get_bool(dnode
, "./n-flag-clear");
1805 vty_out(vty
, " segment-routing prefix %s", prefix
);
1806 if (strmatch(sid_value_type
, "absolute"))
1807 vty_out(vty
, " absolute");
1809 vty_out(vty
, " index");
1810 vty_out(vty
, " %s", sid_value
);
1811 if (strmatch(lh_behavior
, "no-php"))
1812 vty_out(vty
, " no-php-flag");
1813 else if (strmatch(lh_behavior
, "explicit-null"))
1814 vty_out(vty
, " explicit-null");
1816 vty_out(vty
, " n-flag-clear");
1823 * /frr-isisd:isis/instance/segment-routing/algorithm-prefix-sids/algorithm-prefix-sid
1826 isis_sr_prefix_sid_algorithm
, isis_sr_prefix_sid_algorithm_cmd
,
1827 "segment-routing prefix <A.B.C.D/M|X:X::X:X/M>$prefix\
1828 algorithm (128-255)$algorithm\
1829 <absolute$sid_type (16-1048575)$sid_value|index$sid_type (0-65535)$sid_value>\
1830 [<no-php-flag|explicit-null>$lh_behavior] [n-flag-clear$n_flag_clear]",
1835 "Algorithm Specific Prefix SID Configuration\n"
1836 "Algorithm number\n"
1837 "Specify the absolute value of Prefix Segment ID\n"
1838 "The Prefix Segment ID value\n"
1839 "Specify the index of Prefix Segment ID\n"
1840 "The Prefix Segment ID index\n"
1841 "Don't request Penultimate Hop Popping (PHP)\n"
1842 "Upstream neighbor must replace prefix-sid with explicit null label\n"
1845 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1846 nb_cli_enqueue_change(vty
, "./sid-value-type", NB_OP_MODIFY
, sid_type
);
1847 nb_cli_enqueue_change(vty
, "./sid-value", NB_OP_MODIFY
, sid_value_str
);
1851 if (strmatch(lh_behavior
, "no-php-flag"))
1853 else if (strmatch(lh_behavior
, "explicit-null"))
1854 value
= "explicit-null";
1858 nb_cli_enqueue_change(vty
, "./last-hop-behavior", NB_OP_MODIFY
,
1861 nb_cli_enqueue_change(vty
, "./last-hop-behavior", NB_OP_MODIFY
,
1863 nb_cli_enqueue_change(vty
, "./n-flag-clear", NB_OP_MODIFY
,
1864 n_flag_clear
? "true" : "false");
1866 return nb_cli_apply_changes(
1868 "./segment-routing/algorithm-prefix-sids/algorithm-prefix-sid[prefix='%s'][algo='%s']",
1869 prefix_str
, algorithm_str
);
1873 no_isis_sr_prefix_algorithm_sid
, no_isis_sr_prefix_sid_algorithm_cmd
,
1874 "no segment-routing prefix <A.B.C.D/M|X:X::X:X/M>$prefix\
1875 algorithm (128-255)$algorithm\
1876 [<absolute$sid_type (16-1048575)|index (0-65535)> [<no-php-flag|explicit-null>]]\
1882 "Algorithm Specific Prefix SID Configuration\n"
1883 "Algorithm number\n"
1884 "Specify the absolute value of Prefix Segment ID\n"
1885 "The Prefix Segment ID value\n"
1886 "Specify the index of Prefix Segment ID\n"
1887 "The Prefix Segment ID index\n"
1888 "Don't request Penultimate Hop Popping (PHP)\n"
1889 "Upstream neighbor must replace prefix-sid with explicit null label\n"
1892 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1894 return nb_cli_apply_changes(
1896 "./segment-routing/algorithm-prefix-sids/algorithm-prefix-sid[prefix='%s'][algo='%s']",
1897 prefix_str
, algorithm_str
);
1900 #endif /* ifndef FABRICD */
1902 void cli_show_isis_prefix_sid_algorithm(struct vty
*vty
,
1903 const struct lyd_node
*dnode
,
1907 const char *lh_behavior
;
1908 const char *sid_value_type
;
1909 const char *sid_value
;
1913 prefix
= yang_dnode_get_string(dnode
, "./prefix");
1914 sid_value_type
= yang_dnode_get_string(dnode
, "./sid-value-type");
1915 sid_value
= yang_dnode_get_string(dnode
, "./sid-value");
1916 algorithm
= yang_dnode_get_uint32(dnode
, "./algo");
1917 lh_behavior
= yang_dnode_get_string(dnode
, "./last-hop-behavior");
1918 n_flag_clear
= yang_dnode_get_bool(dnode
, "./n-flag-clear");
1920 vty_out(vty
, " segment-routing prefix %s", prefix
);
1921 vty_out(vty
, " algorithm %u", algorithm
);
1922 if (strmatch(sid_value_type
, "absolute"))
1923 vty_out(vty
, " absolute");
1925 vty_out(vty
, " index");
1926 vty_out(vty
, " %s", sid_value
);
1928 if (strmatch(lh_behavior
, "no-php"))
1929 vty_out(vty
, " no-php-flag");
1930 else if (strmatch(lh_behavior
, "explicit-null"))
1931 vty_out(vty
, " explicit-null");
1933 vty_out(vty
, " n-flag-clear");
1938 * XPath: /frr-isisd:isis/instance/fast-reroute/level-{1,2}/lfa/priority-limit
1940 DEFPY_YANG (isis_frr_lfa_priority_limit
,
1941 isis_frr_lfa_priority_limit_cmd
,
1942 "[no] fast-reroute priority-limit <critical|high|medium>$priority [<level-1|level-2>$level]",
1944 "Configure Fast ReRoute\n"
1945 "Limit backup computation up to the prefix priority\n"
1946 "Compute for critical priority prefixes only\n"
1947 "Compute for critical & high priority prefixes\n"
1948 "Compute for critical, high & medium priority prefixes\n"
1949 "Set priority-limit for level-1 only\n"
1950 "Set priority-limit for level-2 only\n")
1952 if (!level
|| strmatch(level
, "level-1")) {
1954 nb_cli_enqueue_change(
1956 "./fast-reroute/level-1/lfa/priority-limit",
1957 NB_OP_DESTROY
, NULL
);
1959 nb_cli_enqueue_change(
1961 "./fast-reroute/level-1/lfa/priority-limit",
1962 NB_OP_CREATE
, priority
);
1965 if (!level
|| strmatch(level
, "level-2")) {
1967 nb_cli_enqueue_change(
1969 "./fast-reroute/level-2/lfa/priority-limit",
1970 NB_OP_DESTROY
, NULL
);
1972 nb_cli_enqueue_change(
1974 "./fast-reroute/level-2/lfa/priority-limit",
1975 NB_OP_CREATE
, priority
);
1979 return nb_cli_apply_changes(vty
, NULL
);
1982 void cli_show_isis_frr_lfa_priority_limit(struct vty
*vty
,
1983 const struct lyd_node
*dnode
,
1986 vty_out(vty
, " fast-reroute priority-limit %s %s\n",
1987 yang_dnode_get_string(dnode
, NULL
),
1988 dnode
->parent
->parent
->schema
->name
);
1992 * XPath: /frr-isisd:isis/instance/fast-reroute/level-{1,2}/lfa/tiebreaker
1994 DEFPY_YANG (isis_frr_lfa_tiebreaker
,
1995 isis_frr_lfa_tiebreaker_cmd
,
1996 "[no] fast-reroute lfa\
1997 tiebreaker <downstream|lowest-backup-metric|node-protecting>$type\
1998 index (1-255)$index\
1999 [<level-1|level-2>$level]",
2001 "Configure Fast ReRoute\n"
2002 "LFA configuration\n"
2003 "Configure tiebreaker for multiple backups\n"
2004 "Prefer backup path via downstream node\n"
2005 "Prefer backup path with lowest total metric\n"
2006 "Prefer node protecting backup path\n"
2007 "Set preference order among tiebreakers\n"
2009 "Configure tiebreaker for level-1 only\n"
2010 "Configure tiebreaker for level-2 only\n")
2012 char xpath
[XPATH_MAXLEN
];
2014 if (!level
|| strmatch(level
, "level-1")) {
2017 xpath
, XPATH_MAXLEN
,
2018 "./fast-reroute/level-1/lfa/tiebreaker[index='%s']",
2020 nb_cli_enqueue_change(vty
, xpath
, NB_OP_DESTROY
, NULL
);
2023 xpath
, XPATH_MAXLEN
,
2024 "./fast-reroute/level-1/lfa/tiebreaker[index='%s']/type",
2026 nb_cli_enqueue_change(vty
, xpath
, NB_OP_CREATE
, type
);
2029 if (!level
|| strmatch(level
, "level-2")) {
2032 xpath
, XPATH_MAXLEN
,
2033 "./fast-reroute/level-2/lfa/tiebreaker[index='%s']",
2035 nb_cli_enqueue_change(vty
, xpath
, NB_OP_DESTROY
, NULL
);
2038 xpath
, XPATH_MAXLEN
,
2039 "./fast-reroute/level-2/lfa/tiebreaker[index='%s']/type",
2041 nb_cli_enqueue_change(vty
, xpath
, NB_OP_CREATE
, type
);
2045 return nb_cli_apply_changes(vty
, NULL
);
2048 void cli_show_isis_frr_lfa_tiebreaker(struct vty
*vty
,
2049 const struct lyd_node
*dnode
,
2052 vty_out(vty
, " fast-reroute lfa tiebreaker %s index %s %s\n",
2053 yang_dnode_get_string(dnode
, "./type"),
2054 yang_dnode_get_string(dnode
, "./index"),
2055 dnode
->parent
->parent
->schema
->name
);
2059 * XPath: /frr-isisd:isis/instance/fast-reroute/level-{1,2}/lfa/load-sharing
2061 DEFPY_YANG (isis_frr_lfa_load_sharing
,
2062 isis_frr_lfa_load_sharing_cmd
,
2063 "[no] fast-reroute load-sharing disable [<level-1|level-2>$level]",
2065 "Configure Fast ReRoute\n"
2066 "Load share prefixes across multiple backups\n"
2067 "Disable load sharing\n"
2068 "Disable load sharing for level-1 only\n"
2069 "Disable load sharing for level-2 only\n")
2071 if (!level
|| strmatch(level
, "level-1")) {
2073 nb_cli_enqueue_change(
2074 vty
, "./fast-reroute/level-1/lfa/load-sharing",
2075 NB_OP_MODIFY
, "true");
2077 nb_cli_enqueue_change(
2078 vty
, "./fast-reroute/level-1/lfa/load-sharing",
2079 NB_OP_MODIFY
, "false");
2082 if (!level
|| strmatch(level
, "level-2")) {
2084 nb_cli_enqueue_change(
2085 vty
, "./fast-reroute/level-2/lfa/load-sharing",
2086 NB_OP_MODIFY
, "true");
2088 nb_cli_enqueue_change(
2089 vty
, "./fast-reroute/level-2/lfa/load-sharing",
2090 NB_OP_MODIFY
, "false");
2094 return nb_cli_apply_changes(vty
, NULL
);
2097 void cli_show_isis_frr_lfa_load_sharing(struct vty
*vty
,
2098 const struct lyd_node
*dnode
,
2101 if (yang_dnode_get_bool(dnode
, NULL
))
2102 vty_out(vty
, " no");
2104 vty_out(vty
, " fast-reroute load-sharing disable %s\n",
2105 dnode
->parent
->parent
->schema
->name
);
2109 * XPath: /frr-isisd:isis/instance/fast-reroute/level-{1,2}/remote-lfa/prefix-list
2111 DEFPY_YANG (isis_frr_remote_lfa_plist
,
2112 isis_frr_remote_lfa_plist_cmd
,
2113 "fast-reroute remote-lfa prefix-list WORD$plist [<level-1|level-2>$level]",
2114 "Configure Fast ReRoute\n"
2115 "Enable remote LFA related configuration\n"
2116 "Filter PQ node router ID based on prefix list\n"
2117 "Prefix-list name\n"
2118 "Enable router ID filtering for level-1 only\n"
2119 "Enable router ID filtering for level-2 only\n")
2121 if (!level
|| strmatch(level
, "level-1"))
2122 nb_cli_enqueue_change(
2123 vty
, "./fast-reroute/level-1/remote-lfa/prefix-list",
2124 NB_OP_MODIFY
, plist
);
2125 if (!level
|| strmatch(level
, "level-2"))
2126 nb_cli_enqueue_change(
2127 vty
, "./fast-reroute/level-2/remote-lfa/prefix-list",
2128 NB_OP_MODIFY
, plist
);
2130 return nb_cli_apply_changes(vty
, NULL
);
2133 DEFPY_YANG (no_isis_frr_remote_lfa_plist
,
2134 no_isis_frr_remote_lfa_plist_cmd
,
2135 "no fast-reroute remote-lfa prefix-list [WORD] [<level-1|level-2>$level]",
2137 "Configure Fast ReRoute\n"
2138 "Enable remote LFA related configuration\n"
2139 "Filter PQ node router ID based on prefix list\n"
2140 "Prefix-list name\n"
2141 "Enable router ID filtering for level-1 only\n"
2142 "Enable router ID filtering for level-2 only\n")
2144 if (!level
|| strmatch(level
, "level-1"))
2145 nb_cli_enqueue_change(
2146 vty
, "./fast-reroute/level-1/remote-lfa/prefix-list",
2147 NB_OP_DESTROY
, NULL
);
2148 if (!level
|| strmatch(level
, "level-2"))
2149 nb_cli_enqueue_change(
2150 vty
, "./fast-reroute/level-2/remote-lfa/prefix-list",
2151 NB_OP_DESTROY
, NULL
);
2153 return nb_cli_apply_changes(vty
, NULL
);
2156 void cli_show_isis_frr_remote_lfa_plist(struct vty
*vty
,
2157 const struct lyd_node
*dnode
,
2160 vty_out(vty
, " fast-reroute remote-lfa prefix-list %s %s\n",
2161 yang_dnode_get_string(dnode
, NULL
),
2162 dnode
->parent
->parent
->schema
->name
);
2166 * XPath: /frr-interface:lib/interface/frr-isisd:isis/passive
2168 DEFPY_YANG(isis_passive
, isis_passive_cmd
, "[no] isis passive",
2170 "IS-IS routing protocol\n"
2171 "Configure the passive mode for interface\n")
2173 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/passive", NB_OP_MODIFY
,
2174 no
? "false" : "true");
2176 return nb_cli_apply_changes(vty
, NULL
);
2179 void cli_show_ip_isis_passive(struct vty
*vty
, const struct lyd_node
*dnode
,
2182 if (!yang_dnode_get_bool(dnode
, NULL
))
2183 vty_out(vty
, " no");
2184 vty_out(vty
, " isis passive\n");
2188 * XPath: /frr-interface:lib/interface/frr-isisd:isis/password
2191 DEFPY_YANG(isis_passwd
, isis_passwd_cmd
, "isis password <md5|clear>$type WORD$pwd",
2192 "IS-IS routing protocol\n"
2193 "Configure the authentication password for a circuit\n"
2194 "HMAC-MD5 authentication\n"
2195 "Cleartext password\n"
2196 "Circuit password\n")
2198 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password", NB_OP_CREATE
,
2200 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password/password",
2202 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password/password-type",
2203 NB_OP_MODIFY
, type
);
2205 return nb_cli_apply_changes(vty
, NULL
);
2208 DEFPY_YANG(no_isis_passwd
, no_isis_passwd_cmd
, "no isis password [<md5|clear> WORD]",
2210 "IS-IS routing protocol\n"
2211 "Configure the authentication password for a circuit\n"
2212 "HMAC-MD5 authentication\n"
2213 "Cleartext password\n"
2214 "Circuit password\n")
2216 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password", NB_OP_DESTROY
,
2219 return nb_cli_apply_changes(vty
, NULL
);
2222 void cli_show_ip_isis_password(struct vty
*vty
, const struct lyd_node
*dnode
,
2225 vty_out(vty
, " isis password %s %s\n",
2226 yang_dnode_get_string(dnode
, "./password-type"),
2227 yang_dnode_get_string(dnode
, "./password"));
2231 * XPath: /frr-interface:lib/interface/frr-isisd:isis/metric
2233 DEFPY_YANG(isis_metric
, isis_metric_cmd
,
2234 "isis metric [level-1|level-2]$level (0-16777215)$met",
2235 "IS-IS routing protocol\n"
2236 "Set default metric for circuit\n"
2237 "Specify metric for level-1 routing\n"
2238 "Specify metric for level-2 routing\n"
2239 "Default metric value\n")
2241 if (!level
|| strmatch(level
, "level-1"))
2242 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-1",
2243 NB_OP_MODIFY
, met_str
);
2244 if (!level
|| strmatch(level
, "level-2"))
2245 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-2",
2246 NB_OP_MODIFY
, met_str
);
2248 return nb_cli_apply_changes(vty
, NULL
);
2251 DEFPY_YANG(no_isis_metric
, no_isis_metric_cmd
,
2252 "no isis metric [level-1|level-2]$level [(0-16777215)]",
2254 "IS-IS routing protocol\n"
2255 "Set default metric for circuit\n"
2256 "Specify metric for level-1 routing\n"
2257 "Specify metric for level-2 routing\n"
2258 "Default metric value\n")
2260 if (!level
|| strmatch(level
, "level-1"))
2261 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-1",
2262 NB_OP_MODIFY
, NULL
);
2263 if (!level
|| strmatch(level
, "level-2"))
2264 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-2",
2265 NB_OP_MODIFY
, NULL
);
2267 return nb_cli_apply_changes(vty
, NULL
);
2270 void cli_show_ip_isis_metric(struct vty
*vty
, const struct lyd_node
*dnode
,
2273 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
2274 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
2276 if (strmatch(l1
, l2
))
2277 vty_out(vty
, " isis metric %s\n", l1
);
2279 vty_out(vty
, " isis metric level-1 %s\n", l1
);
2280 vty_out(vty
, " isis metric level-2 %s\n", l2
);
2285 * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/interval
2287 DEFPY_YANG(isis_hello_interval
, isis_hello_interval_cmd
,
2288 "isis hello-interval [level-1|level-2]$level (1-600)$intv",
2289 "IS-IS routing protocol\n"
2290 "Set Hello interval\n"
2291 "Specify hello-interval for level-1 IIHs\n"
2292 "Specify hello-interval for level-2 IIHs\n"
2293 "Holdtime 1 seconds, interval depends on multiplier\n")
2295 if (!level
|| strmatch(level
, "level-1"))
2296 nb_cli_enqueue_change(vty
,
2297 "./frr-isisd:isis/hello/interval/level-1",
2298 NB_OP_MODIFY
, intv_str
);
2299 if (!level
|| strmatch(level
, "level-2"))
2300 nb_cli_enqueue_change(vty
,
2301 "./frr-isisd:isis/hello/interval/level-2",
2302 NB_OP_MODIFY
, intv_str
);
2304 return nb_cli_apply_changes(vty
, NULL
);
2307 DEFPY_YANG(no_isis_hello_interval
, no_isis_hello_interval_cmd
,
2308 "no isis hello-interval [level-1|level-2]$level [(1-600)]",
2310 "IS-IS routing protocol\n"
2311 "Set Hello interval\n"
2312 "Specify hello-interval for level-1 IIHs\n"
2313 "Specify hello-interval for level-2 IIHs\n"
2314 "Holdtime 1 second, interval depends on multiplier\n")
2316 if (!level
|| strmatch(level
, "level-1"))
2317 nb_cli_enqueue_change(vty
,
2318 "./frr-isisd:isis/hello/interval/level-1",
2319 NB_OP_MODIFY
, NULL
);
2320 if (!level
|| strmatch(level
, "level-2"))
2321 nb_cli_enqueue_change(vty
,
2322 "./frr-isisd:isis/hello/interval/level-2",
2323 NB_OP_MODIFY
, NULL
);
2325 return nb_cli_apply_changes(vty
, NULL
);
2328 void cli_show_ip_isis_hello_interval(struct vty
*vty
,
2329 const struct lyd_node
*dnode
,
2332 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
2333 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
2335 if (strmatch(l1
, l2
))
2336 vty_out(vty
, " isis hello-interval %s\n", l1
);
2338 vty_out(vty
, " isis hello-interval level-1 %s\n", l1
);
2339 vty_out(vty
, " isis hello-interval level-2 %s\n", l2
);
2344 * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/multiplier
2346 DEFPY_YANG(isis_hello_multiplier
, isis_hello_multiplier_cmd
,
2347 "isis hello-multiplier [level-1|level-2]$level (2-100)$mult",
2348 "IS-IS routing protocol\n"
2349 "Set multiplier for Hello holding time\n"
2350 "Specify hello multiplier for level-1 IIHs\n"
2351 "Specify hello multiplier for level-2 IIHs\n"
2352 "Hello multiplier value\n")
2354 if (!level
|| strmatch(level
, "level-1"))
2355 nb_cli_enqueue_change(
2356 vty
, "./frr-isisd:isis/hello/multiplier/level-1",
2357 NB_OP_MODIFY
, mult_str
);
2358 if (!level
|| strmatch(level
, "level-2"))
2359 nb_cli_enqueue_change(
2360 vty
, "./frr-isisd:isis/hello/multiplier/level-2",
2361 NB_OP_MODIFY
, mult_str
);
2363 return nb_cli_apply_changes(vty
, NULL
);
2366 DEFPY_YANG(no_isis_hello_multiplier
, no_isis_hello_multiplier_cmd
,
2367 "no isis hello-multiplier [level-1|level-2]$level [(2-100)]",
2369 "IS-IS routing protocol\n"
2370 "Set multiplier for Hello holding time\n"
2371 "Specify hello multiplier for level-1 IIHs\n"
2372 "Specify hello multiplier for level-2 IIHs\n"
2373 "Hello multiplier value\n")
2375 if (!level
|| strmatch(level
, "level-1"))
2376 nb_cli_enqueue_change(
2377 vty
, "./frr-isisd:isis/hello/multiplier/level-1",
2378 NB_OP_MODIFY
, NULL
);
2379 if (!level
|| strmatch(level
, "level-2"))
2380 nb_cli_enqueue_change(
2381 vty
, "./frr-isisd:isis/hello/multiplier/level-2",
2382 NB_OP_MODIFY
, NULL
);
2384 return nb_cli_apply_changes(vty
, NULL
);
2387 void cli_show_ip_isis_hello_multi(struct vty
*vty
, const struct lyd_node
*dnode
,
2390 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
2391 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
2393 if (strmatch(l1
, l2
))
2394 vty_out(vty
, " isis hello-multiplier %s\n", l1
);
2396 vty_out(vty
, " isis hello-multiplier level-1 %s\n", l1
);
2397 vty_out(vty
, " isis hello-multiplier level-2 %s\n", l2
);
2403 * /frr-interface:lib/interface/frr-isisd:isis/disable-three-way-handshake
2405 DEFPY_YANG(isis_threeway_adj
, isis_threeway_adj_cmd
, "[no] isis three-way-handshake",
2408 "Enable/Disable three-way handshake\n")
2410 nb_cli_enqueue_change(vty
,
2411 "./frr-isisd:isis/disable-three-way-handshake",
2412 NB_OP_MODIFY
, no
? "true" : "false");
2414 return nb_cli_apply_changes(vty
, NULL
);
2417 void cli_show_ip_isis_threeway_shake(struct vty
*vty
,
2418 const struct lyd_node
*dnode
,
2421 if (yang_dnode_get_bool(dnode
, NULL
))
2422 vty_out(vty
, " no");
2423 vty_out(vty
, " isis three-way-handshake\n");
2427 * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/padding
2429 DEFPY_YANG(isis_hello_padding
, isis_hello_padding_cmd
,
2430 "[no] isis hello padding [during-adjacency-formation]$padding_type",
2432 "IS-IS routing protocol\n"
2433 "Type of padding for IS-IS hello packets\n"
2434 "Pad hello packets\n"
2435 "Add padding to hello packets during adjacency formation only.\n")
2438 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/hello/padding",
2439 NB_OP_MODIFY
, "disabled");
2441 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/hello/padding",
2443 padding_type
? padding_type
: "always");
2445 return nb_cli_apply_changes(vty
, NULL
);
2448 void cli_show_ip_isis_hello_padding(struct vty
*vty
,
2449 const struct lyd_node
*dnode
,
2452 int hello_padding_type
= yang_dnode_get_enum(dnode
, NULL
);
2453 if (hello_padding_type
== ISIS_HELLO_PADDING_DISABLED
)
2454 vty_out(vty
, " no");
2455 vty_out(vty
, " isis hello padding");
2456 if (hello_padding_type
== ISIS_HELLO_PADDING_DURING_ADJACENCY_FORMATION
)
2457 vty_out(vty
, " during-adjacency-formation");
2462 * XPath: /frr-interface:lib/interface/frr-isisd:isis/csnp-interval
2464 DEFPY_YANG(csnp_interval
, csnp_interval_cmd
,
2465 "isis csnp-interval (1-600)$intv [level-1|level-2]$level",
2466 "IS-IS routing protocol\n"
2467 "Set CSNP interval in seconds\n"
2468 "CSNP interval value\n"
2469 "Specify interval for level-1 CSNPs\n"
2470 "Specify interval for level-2 CSNPs\n")
2472 if (!level
|| strmatch(level
, "level-1"))
2473 nb_cli_enqueue_change(vty
,
2474 "./frr-isisd:isis/csnp-interval/level-1",
2475 NB_OP_MODIFY
, intv_str
);
2476 if (!level
|| strmatch(level
, "level-2"))
2477 nb_cli_enqueue_change(vty
,
2478 "./frr-isisd:isis/csnp-interval/level-2",
2479 NB_OP_MODIFY
, intv_str
);
2481 return nb_cli_apply_changes(vty
, NULL
);
2484 DEFPY_YANG(no_csnp_interval
, no_csnp_interval_cmd
,
2485 "no isis csnp-interval [(1-600)] [level-1|level-2]$level",
2487 "IS-IS routing protocol\n"
2488 "Set CSNP interval in seconds\n"
2489 "CSNP interval value\n"
2490 "Specify interval for level-1 CSNPs\n"
2491 "Specify interval for level-2 CSNPs\n")
2493 if (!level
|| strmatch(level
, "level-1"))
2494 nb_cli_enqueue_change(vty
,
2495 "./frr-isisd:isis/csnp-interval/level-1",
2496 NB_OP_MODIFY
, NULL
);
2497 if (!level
|| strmatch(level
, "level-2"))
2498 nb_cli_enqueue_change(vty
,
2499 "./frr-isisd:isis/csnp-interval/level-2",
2500 NB_OP_MODIFY
, NULL
);
2502 return nb_cli_apply_changes(vty
, NULL
);
2505 void cli_show_ip_isis_csnp_interval(struct vty
*vty
,
2506 const struct lyd_node
*dnode
,
2509 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
2510 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
2512 if (strmatch(l1
, l2
))
2513 vty_out(vty
, " isis csnp-interval %s\n", l1
);
2515 vty_out(vty
, " isis csnp-interval %s level-1\n", l1
);
2516 vty_out(vty
, " isis csnp-interval %s level-2\n", l2
);
2521 * XPath: /frr-interface:lib/interface/frr-isisd:isis/psnp-interval
2523 DEFPY_YANG(psnp_interval
, psnp_interval_cmd
,
2524 "isis psnp-interval (1-120)$intv [level-1|level-2]$level",
2525 "IS-IS routing protocol\n"
2526 "Set PSNP interval in seconds\n"
2527 "PSNP interval value\n"
2528 "Specify interval for level-1 PSNPs\n"
2529 "Specify interval for level-2 PSNPs\n")
2531 if (!level
|| strmatch(level
, "level-1"))
2532 nb_cli_enqueue_change(vty
,
2533 "./frr-isisd:isis/psnp-interval/level-1",
2534 NB_OP_MODIFY
, intv_str
);
2535 if (!level
|| strmatch(level
, "level-2"))
2536 nb_cli_enqueue_change(vty
,
2537 "./frr-isisd:isis/psnp-interval/level-2",
2538 NB_OP_MODIFY
, intv_str
);
2540 return nb_cli_apply_changes(vty
, NULL
);
2543 DEFPY_YANG(no_psnp_interval
, no_psnp_interval_cmd
,
2544 "no isis psnp-interval [(1-120)] [level-1|level-2]$level",
2546 "IS-IS routing protocol\n"
2547 "Set PSNP interval in seconds\n"
2548 "PSNP interval value\n"
2549 "Specify interval for level-1 PSNPs\n"
2550 "Specify interval for level-2 PSNPs\n")
2552 if (!level
|| strmatch(level
, "level-1"))
2553 nb_cli_enqueue_change(vty
,
2554 "./frr-isisd:isis/psnp-interval/level-1",
2555 NB_OP_MODIFY
, NULL
);
2556 if (!level
|| strmatch(level
, "level-2"))
2557 nb_cli_enqueue_change(vty
,
2558 "./frr-isisd:isis/psnp-interval/level-2",
2559 NB_OP_MODIFY
, NULL
);
2561 return nb_cli_apply_changes(vty
, NULL
);
2564 void cli_show_ip_isis_psnp_interval(struct vty
*vty
,
2565 const struct lyd_node
*dnode
,
2568 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
2569 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
2571 if (strmatch(l1
, l2
))
2572 vty_out(vty
, " isis psnp-interval %s\n", l1
);
2574 vty_out(vty
, " isis psnp-interval %s level-1\n", l1
);
2575 vty_out(vty
, " isis psnp-interval %s level-2\n", l2
);
2580 * XPath: /frr-interface:lib/interface/frr-isisd:isis/multi-topology
2582 DEFPY_YANG(circuit_topology
, circuit_topology_cmd
,
2583 "[no] isis topology<standard|ipv4-unicast|ipv4-mgmt|ipv6-unicast|ipv4-multicast|ipv6-multicast|ipv6-mgmt|ipv6-dstsrc>$topology",
2585 "IS-IS routing protocol\n"
2586 "Configure interface IS-IS topologies\n"
2587 "Standard topology\n"
2588 "IPv4 unicast topology\n"
2589 "IPv4 management topology\n"
2590 "IPv6 unicast topology\n"
2591 "IPv4 multicast topology\n"
2592 "IPv6 multicast topology\n"
2593 "IPv6 management topology\n"
2594 "IPv6 dst-src topology\n")
2596 nb_cli_enqueue_change(vty
, ".", NB_OP_MODIFY
, no
? "false" : "true");
2598 if (strmatch(topology
, "ipv4-mgmt"))
2599 return nb_cli_apply_changes(
2600 vty
, "./frr-isisd:isis/multi-topology/ipv4-management");
2601 else if (strmatch(topology
, "ipv6-mgmt"))
2602 return nb_cli_apply_changes(
2603 vty
, "./frr-isisd:isis/multi-topology/ipv6-management");
2604 if (strmatch(topology
, "ipv4-unicast"))
2605 return nb_cli_apply_changes(
2606 vty
, "./frr-isisd:isis/multi-topology/standard");
2608 return nb_cli_apply_changes(
2609 vty
, "./frr-isisd:isis/multi-topology/%s", topology
);
2612 void cli_show_ip_isis_mt_standard(struct vty
*vty
, const struct lyd_node
*dnode
,
2615 if (!yang_dnode_get_bool(dnode
, NULL
))
2616 vty_out(vty
, " no");
2617 vty_out(vty
, " isis topology standard\n");
2620 void cli_show_ip_isis_mt_ipv4_multicast(struct vty
*vty
,
2621 const struct lyd_node
*dnode
,
2624 if (!yang_dnode_get_bool(dnode
, NULL
))
2625 vty_out(vty
, " no");
2626 vty_out(vty
, " isis topology ipv4-multicast\n");
2629 void cli_show_ip_isis_mt_ipv4_mgmt(struct vty
*vty
,
2630 const struct lyd_node
*dnode
,
2633 if (!yang_dnode_get_bool(dnode
, NULL
))
2634 vty_out(vty
, " no");
2635 vty_out(vty
, " isis topology ipv4-mgmt\n");
2638 void cli_show_ip_isis_mt_ipv6_unicast(struct vty
*vty
,
2639 const struct lyd_node
*dnode
,
2642 if (!yang_dnode_get_bool(dnode
, NULL
))
2643 vty_out(vty
, " no");
2644 vty_out(vty
, " isis topology ipv6-unicast\n");
2647 void cli_show_ip_isis_mt_ipv6_multicast(struct vty
*vty
,
2648 const struct lyd_node
*dnode
,
2651 if (!yang_dnode_get_bool(dnode
, NULL
))
2652 vty_out(vty
, " no");
2653 vty_out(vty
, " isis topology ipv6-multicast\n");
2656 void cli_show_ip_isis_mt_ipv6_mgmt(struct vty
*vty
,
2657 const struct lyd_node
*dnode
,
2660 if (!yang_dnode_get_bool(dnode
, NULL
))
2661 vty_out(vty
, " no");
2662 vty_out(vty
, " isis topology ipv6-mgmt\n");
2665 void cli_show_ip_isis_mt_ipv6_dstsrc(struct vty
*vty
,
2666 const struct lyd_node
*dnode
,
2669 if (!yang_dnode_get_bool(dnode
, NULL
))
2670 vty_out(vty
, " no");
2671 vty_out(vty
, " isis topology ipv6-dstsrc\n");
2675 * XPath: /frr-interface:lib/interface/frr-isisd:isis/circuit-type
2677 DEFPY_YANG(isis_circuit_type
, isis_circuit_type_cmd
,
2678 "isis circuit-type <level-1|level-1-2|level-2-only>$type",
2679 "IS-IS routing protocol\n"
2680 "Configure circuit type for interface\n"
2681 "Level-1 only adjacencies are formed\n"
2682 "Level-1-2 adjacencies are formed\n"
2683 "Level-2 only adjacencies are formed\n")
2685 nb_cli_enqueue_change(
2686 vty
, "./frr-isisd:isis/circuit-type", NB_OP_MODIFY
,
2687 strmatch(type
, "level-2-only") ? "level-2" : type
);
2689 return nb_cli_apply_changes(vty
, NULL
);
2692 DEFPY_YANG(no_isis_circuit_type
, no_isis_circuit_type_cmd
,
2693 "no isis circuit-type [level-1|level-1-2|level-2-only]",
2695 "IS-IS routing protocol\n"
2696 "Configure circuit type for interface\n"
2697 "Level-1 only adjacencies are formed\n"
2698 "Level-1-2 adjacencies are formed\n"
2699 "Level-2 only adjacencies are formed\n")
2701 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/circuit-type",
2702 NB_OP_MODIFY
, NULL
);
2704 return nb_cli_apply_changes(vty
, NULL
);
2707 void cli_show_ip_isis_circ_type(struct vty
*vty
, const struct lyd_node
*dnode
,
2710 int level
= yang_dnode_get_enum(dnode
, NULL
);
2714 vty_out(vty
, " isis circuit-type level-1\n");
2717 vty_out(vty
, " isis circuit-type level-2-only\n");
2719 case IS_LEVEL_1_AND_2
:
2720 vty_out(vty
, " isis circuit-type level-1-2\n");
2725 static int ag_change(struct vty
*vty
, int argc
, struct cmd_token
**argv
,
2726 const char *xpath
, bool no
, int start_idx
)
2728 for (int i
= start_idx
; i
< argc
; i
++)
2729 nb_cli_enqueue_change(vty
, xpath
,
2730 no
? NB_OP_DESTROY
: NB_OP_CREATE
,
2732 return nb_cli_apply_changes(vty
, NULL
);
2735 static int ag_iter_cb(const struct lyd_node
*dnode
, void *arg
)
2737 struct vty
*vty
= (struct vty
*)arg
;
2739 vty_out(vty
, " %s", yang_dnode_get_string(dnode
, "."));
2740 return YANG_ITER_CONTINUE
;
2744 * XPath: /frr-interface:lib/interface/frr-isisd:isis/network-type
2746 DEFPY_YANG(isis_network
, isis_network_cmd
, "[no] isis network point-to-point",
2748 "IS-IS routing protocol\n"
2749 "Set network type\n"
2750 "point-to-point network type\n")
2752 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/network-type",
2754 no
? "broadcast" : "point-to-point");
2756 return nb_cli_apply_changes(vty
, NULL
);
2759 void cli_show_ip_isis_network_type(struct vty
*vty
,
2760 const struct lyd_node
*dnode
,
2763 if (yang_dnode_get_enum(dnode
, NULL
) != CIRCUIT_T_P2P
)
2764 vty_out(vty
, " no");
2766 vty_out(vty
, " isis network point-to-point\n");
2770 * XPath: /frr-interface:lib/interface/frr-isisd:isis/priority
2772 DEFPY_YANG(isis_priority
, isis_priority_cmd
,
2773 "isis priority (0-127)$prio [level-1|level-2]$level",
2774 "IS-IS routing protocol\n"
2775 "Set priority for Designated Router election\n"
2777 "Specify priority for level-1 routing\n"
2778 "Specify priority for level-2 routing\n")
2780 if (!level
|| strmatch(level
, "level-1"))
2781 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-1",
2782 NB_OP_MODIFY
, prio_str
);
2783 if (!level
|| strmatch(level
, "level-2"))
2784 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-2",
2785 NB_OP_MODIFY
, prio_str
);
2787 return nb_cli_apply_changes(vty
, NULL
);
2790 DEFPY_YANG(no_isis_priority
, no_isis_priority_cmd
,
2791 "no isis priority [(0-127)] [level-1|level-2]$level",
2793 "IS-IS routing protocol\n"
2794 "Set priority for Designated Router election\n"
2796 "Specify priority for level-1 routing\n"
2797 "Specify priority for level-2 routing\n")
2799 if (!level
|| strmatch(level
, "level-1"))
2800 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-1",
2801 NB_OP_MODIFY
, NULL
);
2802 if (!level
|| strmatch(level
, "level-2"))
2803 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-2",
2804 NB_OP_MODIFY
, NULL
);
2806 return nb_cli_apply_changes(vty
, NULL
);
2809 void cli_show_ip_isis_priority(struct vty
*vty
, const struct lyd_node
*dnode
,
2812 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
2813 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
2815 if (strmatch(l1
, l2
))
2816 vty_out(vty
, " isis priority %s\n", l1
);
2818 vty_out(vty
, " isis priority %s level-1\n", l1
);
2819 vty_out(vty
, " isis priority %s level-2\n", l2
);
2824 * XPath: /frr-interface:lib/interface/frr-isisd:isis/fast-reroute
2826 void cli_show_ip_isis_frr(struct vty
*vty
, const struct lyd_node
*dnode
,
2829 bool l1_enabled
, l2_enabled
;
2830 bool l1_node_protection
, l2_node_protection
;
2831 bool l1_link_fallback
, l2_link_fallback
;
2834 l1_enabled
= yang_dnode_get_bool(dnode
, "./level-1/lfa/enable");
2835 l2_enabled
= yang_dnode_get_bool(dnode
, "./level-2/lfa/enable");
2837 if (l1_enabled
|| l2_enabled
) {
2838 if (l1_enabled
== l2_enabled
) {
2839 vty_out(vty
, " isis fast-reroute lfa\n");
2844 " isis fast-reroute lfa level-1\n");
2847 " isis fast-reroute lfa level-2\n");
2852 l1_enabled
= yang_dnode_get_bool(dnode
, "./level-1/remote-lfa/enable");
2853 l2_enabled
= yang_dnode_get_bool(dnode
, "./level-2/remote-lfa/enable");
2855 if (l1_enabled
|| l2_enabled
) {
2856 if (l1_enabled
== l2_enabled
) {
2858 " isis fast-reroute remote-lfa tunnel mpls-ldp\n");
2863 " isis fast-reroute remote-lfa tunnel mpls-ldp level-1\n");
2866 " isis fast-reroute remote-lfa tunnel mpls-ldp level-2\n");
2871 l1_enabled
= yang_dnode_get_bool(dnode
, "./level-1/ti-lfa/enable");
2872 l2_enabled
= yang_dnode_get_bool(dnode
, "./level-2/ti-lfa/enable");
2873 l1_node_protection
=
2874 yang_dnode_get_bool(dnode
, "./level-1/ti-lfa/node-protection");
2875 l2_node_protection
=
2876 yang_dnode_get_bool(dnode
, "./level-2/ti-lfa/node-protection");
2878 yang_dnode_get_bool(dnode
, "./level-1/ti-lfa/link-fallback");
2880 yang_dnode_get_bool(dnode
, "./level-2/ti-lfa/link-fallback");
2883 if (l1_enabled
|| l2_enabled
) {
2884 if (l1_enabled
== l2_enabled
2885 && l1_node_protection
== l2_node_protection
2886 && l1_link_fallback
== l2_link_fallback
) {
2887 vty_out(vty
, " isis fast-reroute ti-lfa");
2888 if (l1_node_protection
)
2889 vty_out(vty
, " node-protection");
2890 if (l1_link_fallback
)
2891 vty_out(vty
, " link-fallback");
2896 " isis fast-reroute ti-lfa level-1");
2897 if (l1_node_protection
)
2898 vty_out(vty
, " node-protection");
2899 if (l1_link_fallback
)
2900 vty_out(vty
, " link-fallback");
2905 " isis fast-reroute ti-lfa level-2");
2906 if (l2_node_protection
)
2907 vty_out(vty
, " node-protection");
2908 if (l2_link_fallback
)
2909 vty_out(vty
, " link-fallback");
2917 * XPath: /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/lfa/enable
2919 DEFPY(isis_lfa
, isis_lfa_cmd
,
2920 "[no] isis fast-reroute lfa [level-1|level-2]$level",
2922 "IS-IS routing protocol\n"
2923 "Interface IP Fast-reroute configuration\n"
2924 "Enable LFA computation\n"
2925 "Enable LFA computation for Level 1 only\n"
2926 "Enable LFA computation for Level 2 only\n")
2928 if (!level
|| strmatch(level
, "level-1")) {
2930 nb_cli_enqueue_change(
2932 "./frr-isisd:isis/fast-reroute/level-1/lfa/enable",
2933 NB_OP_MODIFY
, "false");
2935 nb_cli_enqueue_change(
2937 "./frr-isisd:isis/fast-reroute/level-1/lfa/enable",
2938 NB_OP_MODIFY
, "true");
2941 if (!level
|| strmatch(level
, "level-2")) {
2943 nb_cli_enqueue_change(
2945 "./frr-isisd:isis/fast-reroute/level-2/lfa/enable",
2946 NB_OP_MODIFY
, "false");
2948 nb_cli_enqueue_change(
2950 "./frr-isisd:isis/fast-reroute/level-2/lfa/enable",
2951 NB_OP_MODIFY
, "true");
2955 return nb_cli_apply_changes(vty
, NULL
);
2960 * /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/lfa/exclude-interface
2962 DEFPY(isis_lfa_exclude_interface
, isis_lfa_exclude_interface_cmd
,
2963 "[no] isis fast-reroute lfa [level-1|level-2]$level exclude interface IFNAME$ifname",
2965 "IS-IS routing protocol\n"
2966 "Interface IP Fast-reroute configuration\n"
2967 "Enable LFA computation\n"
2968 "Enable LFA computation for Level 1 only\n"
2969 "Enable LFA computation for Level 2 only\n"
2970 "FRR exclusion information\n"
2971 "Exclude an interface from computation\n"
2974 if (!level
|| strmatch(level
, "level-1")) {
2976 nb_cli_enqueue_change(
2978 "./frr-isisd:isis/fast-reroute/level-1/lfa/exclude-interface",
2979 NB_OP_DESTROY
, ifname
);
2981 nb_cli_enqueue_change(
2983 "./frr-isisd:isis/fast-reroute/level-1/lfa/exclude-interface",
2984 NB_OP_CREATE
, ifname
);
2987 if (!level
|| strmatch(level
, "level-2")) {
2989 nb_cli_enqueue_change(
2991 "./frr-isisd:isis/fast-reroute/level-2/lfa/exclude-interface",
2992 NB_OP_DESTROY
, ifname
);
2994 nb_cli_enqueue_change(
2996 "./frr-isisd:isis/fast-reroute/level-2/lfa/exclude-interface",
2997 NB_OP_CREATE
, ifname
);
3001 return nb_cli_apply_changes(vty
, NULL
);
3004 void cli_show_frr_lfa_exclude_interface(struct vty
*vty
,
3005 const struct lyd_node
*dnode
,
3008 vty_out(vty
, " isis fast-reroute lfa %s exclude interface %s\n",
3009 dnode
->parent
->parent
->schema
->name
,
3010 yang_dnode_get_string(dnode
, NULL
));
3015 * /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/remote-lfa/enable
3017 DEFPY(isis_remote_lfa
, isis_remote_lfa_cmd
,
3018 "[no] isis fast-reroute remote-lfa tunnel mpls-ldp [level-1|level-2]$level",
3020 "IS-IS routing protocol\n"
3021 "Interface IP Fast-reroute configuration\n"
3022 "Enable remote LFA computation\n"
3023 "Enable remote LFA computation using tunnels\n"
3024 "Use MPLS LDP tunnel to reach the remote LFA node\n"
3025 "Enable LFA computation for Level 1 only\n"
3026 "Enable LFA computation for Level 2 only\n")
3028 if (!level
|| strmatch(level
, "level-1")) {
3030 nb_cli_enqueue_change(
3032 "./frr-isisd:isis/fast-reroute/level-1/remote-lfa/enable",
3033 NB_OP_MODIFY
, "false");
3035 nb_cli_enqueue_change(
3037 "./frr-isisd:isis/fast-reroute/level-1/remote-lfa/enable",
3038 NB_OP_MODIFY
, "true");
3041 if (!level
|| strmatch(level
, "level-2")) {
3043 nb_cli_enqueue_change(
3045 "./frr-isisd:isis/fast-reroute/level-2/remote-lfa/enable",
3046 NB_OP_MODIFY
, "false");
3048 nb_cli_enqueue_change(
3050 "./frr-isisd:isis/fast-reroute/level-2/remote-lfa/enable",
3051 NB_OP_MODIFY
, "true");
3055 return nb_cli_apply_changes(vty
, NULL
);
3060 * /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/remote-lfa/maximum-metric
3062 DEFPY(isis_remote_lfa_max_metric
, isis_remote_lfa_max_metric_cmd
,
3063 "[no] isis fast-reroute remote-lfa maximum-metric (1-16777215)$metric [level-1|level-2]$level",
3065 "IS-IS routing protocol\n"
3066 "Interface IP Fast-reroute configuration\n"
3067 "Enable remote LFA computation\n"
3068 "Limit remote LFA node selection within the metric\n"
3069 "Value of the metric\n"
3070 "Enable LFA computation for Level 1 only\n"
3071 "Enable LFA computation for Level 2 only\n")
3073 if (!level
|| strmatch(level
, "level-1")) {
3075 nb_cli_enqueue_change(
3077 "./frr-isisd:isis/fast-reroute/level-1/remote-lfa/maximum-metric",
3078 NB_OP_DESTROY
, NULL
);
3080 nb_cli_enqueue_change(
3082 "./frr-isisd:isis/fast-reroute/level-1/remote-lfa/maximum-metric",
3083 NB_OP_MODIFY
, metric_str
);
3086 if (!level
|| strmatch(level
, "level-2")) {
3088 nb_cli_enqueue_change(
3090 "./frr-isisd:isis/fast-reroute/level-2/remote-lfa/maximum-metric",
3091 NB_OP_DESTROY
, NULL
);
3093 nb_cli_enqueue_change(
3095 "./frr-isisd:isis/fast-reroute/level-2/remote-lfa/maximum-metric",
3096 NB_OP_MODIFY
, metric_str
);
3100 return nb_cli_apply_changes(vty
, NULL
);
3103 void cli_show_frr_remote_lfa_max_metric(struct vty
*vty
,
3104 const struct lyd_node
*dnode
,
3107 vty_out(vty
, " isis fast-reroute remote-lfa maximum-metric %s %s\n",
3108 yang_dnode_get_string(dnode
, NULL
),
3109 dnode
->parent
->parent
->schema
->name
);
3113 * XPath: /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/ti-lfa/enable
3115 DEFPY(isis_ti_lfa
, isis_ti_lfa_cmd
,
3116 "[no] isis fast-reroute ti-lfa [level-1|level-2]$level [node-protection$node_protection [link-fallback$link_fallback]]",
3118 "IS-IS routing protocol\n"
3119 "Interface IP Fast-reroute configuration\n"
3120 "Enable TI-LFA computation\n"
3121 "Enable TI-LFA computation for Level 1 only\n"
3122 "Enable TI-LFA computation for Level 2 only\n"
3123 "Protect against node failures\n"
3124 "Enable link-protection fallback\n")
3126 if (!level
|| strmatch(level
, "level-1")) {
3128 nb_cli_enqueue_change(
3130 "./frr-isisd:isis/fast-reroute/level-1/ti-lfa/enable",
3131 NB_OP_MODIFY
, "false");
3132 nb_cli_enqueue_change(
3134 "./frr-isisd:isis/fast-reroute/level-1/ti-lfa/node-protection",
3135 NB_OP_MODIFY
, "false");
3136 nb_cli_enqueue_change(
3138 "./frr-isisd:isis/fast-reroute/level-1/ti-lfa/link-fallback",
3139 NB_OP_MODIFY
, "false");
3141 nb_cli_enqueue_change(
3143 "./frr-isisd:isis/fast-reroute/level-1/ti-lfa/enable",
3144 NB_OP_MODIFY
, "true");
3145 nb_cli_enqueue_change(
3147 "./frr-isisd:isis/fast-reroute/level-1/ti-lfa/node-protection",
3149 node_protection
? "true" : "false");
3150 nb_cli_enqueue_change(
3152 "./frr-isisd:isis/fast-reroute/level-1/ti-lfa/link-fallback",
3153 NB_OP_MODIFY
, link_fallback
? "true" : "false");
3156 if (!level
|| strmatch(level
, "level-2")) {
3158 nb_cli_enqueue_change(
3160 "./frr-isisd:isis/fast-reroute/level-2/ti-lfa/enable",
3161 NB_OP_MODIFY
, "false");
3162 nb_cli_enqueue_change(
3164 "./frr-isisd:isis/fast-reroute/level-2/ti-lfa/node-protection",
3165 NB_OP_MODIFY
, "false");
3166 nb_cli_enqueue_change(
3168 "./frr-isisd:isis/fast-reroute/level-2/ti-lfa/link-fallback",
3169 NB_OP_MODIFY
, "false");
3171 nb_cli_enqueue_change(
3173 "./frr-isisd:isis/fast-reroute/level-2/ti-lfa/enable",
3174 NB_OP_MODIFY
, "true");
3175 nb_cli_enqueue_change(
3177 "./frr-isisd:isis/fast-reroute/level-2/ti-lfa/node-protection",
3179 node_protection
? "true" : "false");
3180 nb_cli_enqueue_change(
3182 "./frr-isisd:isis/fast-reroute/level-2/ti-lfa/link-fallback",
3183 NB_OP_MODIFY
, link_fallback
? "true" : "false");
3187 return nb_cli_apply_changes(vty
, NULL
);
3191 * XPath: /frr-isisd:isis/instance/log-adjacency-changes
3193 DEFPY_YANG(log_adj_changes
, log_adj_changes_cmd
, "[no] log-adjacency-changes",
3194 NO_STR
"Log changes in adjacency state\n")
3196 nb_cli_enqueue_change(vty
, "./log-adjacency-changes", NB_OP_MODIFY
,
3197 no
? "false" : "true");
3199 return nb_cli_apply_changes(vty
, NULL
);
3202 void cli_show_isis_log_adjacency(struct vty
*vty
, const struct lyd_node
*dnode
,
3205 if (!yang_dnode_get_bool(dnode
, NULL
))
3206 vty_out(vty
, " no");
3207 vty_out(vty
, " log-adjacency-changes\n");
3211 * XPath: /frr-isisd:isis/instance/log-pdu-drops
3213 DEFPY_YANG(log_pdu_drops
, log_pdu_drops_cmd
, "[no] log-pdu-drops",
3214 NO_STR
"Log any dropped PDUs\n")
3216 nb_cli_enqueue_change(vty
, "./log-pdu-drops", NB_OP_MODIFY
,
3217 no
? "false" : "true");
3219 return nb_cli_apply_changes(vty
, NULL
);
3222 void cli_show_isis_log_pdu_drops(struct vty
*vty
, const struct lyd_node
*dnode
,
3225 if (!yang_dnode_get_bool(dnode
, NULL
))
3226 vty_out(vty
, " no");
3227 vty_out(vty
, " log-pdu-drops\n");
3231 * XPath: /frr-isisd:isis/instance/mpls/ldp-sync
3233 DEFPY(isis_mpls_ldp_sync
, isis_mpls_ldp_sync_cmd
, "mpls ldp-sync",
3234 MPLS_STR MPLS_LDP_SYNC_STR
)
3236 nb_cli_enqueue_change(vty
, "./mpls/ldp-sync", NB_OP_CREATE
, NULL
);
3238 return nb_cli_apply_changes(vty
, NULL
);
3241 DEFPY(no_isis_mpls_ldp_sync
, no_isis_mpls_ldp_sync_cmd
, "no mpls ldp-sync",
3242 NO_STR MPLS_STR NO_MPLS_LDP_SYNC_STR
)
3244 nb_cli_enqueue_change(vty
, "./mpls/ldp-sync", NB_OP_DESTROY
, NULL
);
3246 return nb_cli_apply_changes(vty
, NULL
);
3249 void cli_show_isis_mpls_ldp_sync(struct vty
*vty
, const struct lyd_node
*dnode
,
3252 vty_out(vty
, " mpls ldp-sync\n");
3255 DEFPY(isis_mpls_ldp_sync_holddown
, isis_mpls_ldp_sync_holddown_cmd
,
3256 "mpls ldp-sync holddown (0-10000)",
3257 MPLS_STR MPLS_LDP_SYNC_STR
3258 "Time to wait for LDP-SYNC to occur before restoring interface metric\n"
3259 "Time in seconds\n")
3261 nb_cli_enqueue_change(vty
, "./mpls/ldp-sync/holddown", NB_OP_MODIFY
,
3264 return nb_cli_apply_changes(vty
, NULL
);
3267 DEFPY(no_isis_mpls_ldp_sync_holddown
, no_isis_mpls_ldp_sync_holddown_cmd
,
3268 "no mpls ldp-sync holddown [<(1-10000)>]",
3269 NO_STR MPLS_STR MPLS_LDP_SYNC_STR NO_MPLS_LDP_SYNC_HOLDDOWN_STR
"Time in seconds\n")
3271 nb_cli_enqueue_change(vty
, "./mpls/ldp-sync/holddown", NB_OP_DESTROY
,
3274 return nb_cli_apply_changes(vty
, NULL
);
3277 void cli_show_isis_mpls_ldp_sync_holddown(struct vty
*vty
,
3278 const struct lyd_node
*dnode
,
3281 vty_out(vty
, " mpls ldp-sync holddown %s\n",
3282 yang_dnode_get_string(dnode
, NULL
));
3286 * XPath: /frr-interface:lib/interface/frr-isisd:isis/mpls/ldp-sync
3288 DEFPY(isis_mpls_if_ldp_sync
, isis_mpls_if_ldp_sync_cmd
,
3289 "[no] isis mpls ldp-sync",
3290 NO_STR
"IS-IS routing protocol\n" MPLS_STR MPLS_LDP_SYNC_STR
)
3292 const struct lyd_node
*dnode
;
3294 dnode
= yang_dnode_getf(vty
->candidate_config
->dnode
,
3295 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
3296 if (dnode
== NULL
) {
3297 vty_out(vty
, "ISIS is not enabled on this circuit\n");
3301 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/mpls/ldp-sync",
3302 NB_OP_MODIFY
, no
? "false" : "true");
3304 return nb_cli_apply_changes(vty
, NULL
);
3308 void cli_show_isis_mpls_if_ldp_sync(struct vty
*vty
,
3309 const struct lyd_node
*dnode
,
3312 if (!yang_dnode_get_bool(dnode
, NULL
))
3313 vty_out(vty
, " no");
3315 vty_out(vty
, " isis mpls ldp-sync\n");
3318 DEFPY(isis_mpls_if_ldp_sync_holddown
, isis_mpls_if_ldp_sync_holddown_cmd
,
3319 "isis mpls ldp-sync holddown (0-10000)",
3320 "IS-IS routing protocol\n" MPLS_STR MPLS_LDP_SYNC_STR
3321 "Time to wait for LDP-SYNC to occur before restoring interface metric\n"
3322 "Time in seconds\n")
3324 const struct lyd_node
*dnode
;
3326 dnode
= yang_dnode_getf(vty
->candidate_config
->dnode
,
3327 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
3328 if (dnode
== NULL
) {
3329 vty_out(vty
, "ISIS is not enabled on this circuit\n");
3333 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/mpls/holddown",
3334 NB_OP_MODIFY
, holddown_str
);
3336 return nb_cli_apply_changes(vty
, NULL
);
3339 DEFPY(no_isis_mpls_if_ldp_sync_holddown
, no_isis_mpls_if_ldp_sync_holddown_cmd
,
3340 "no isis mpls ldp-sync holddown [<(1-10000)>]",
3341 NO_STR
"IS-IS routing protocol\n" MPLS_STR NO_MPLS_LDP_SYNC_STR
3342 NO_MPLS_LDP_SYNC_HOLDDOWN_STR
"Time in seconds\n")
3344 const struct lyd_node
*dnode
;
3346 dnode
= yang_dnode_getf(vty
->candidate_config
->dnode
,
3347 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
3348 if (dnode
== NULL
) {
3349 vty_out(vty
, "ISIS is not enabled on this circuit\n");
3353 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/mpls/holddown",
3354 NB_OP_DESTROY
, NULL
);
3356 return nb_cli_apply_changes(vty
, NULL
);
3359 void cli_show_isis_mpls_if_ldp_sync_holddown(struct vty
*vty
,
3360 const struct lyd_node
*dnode
,
3363 vty_out(vty
, " isis mpls ldp-sync holddown %s\n",
3364 yang_dnode_get_string(dnode
, NULL
));
3367 DEFPY_YANG_NOSH(flex_algo
, flex_algo_cmd
, "flex-algo (128-255)$algorithm",
3368 "Flexible Algorithm\n"
3369 "Flexible Algorithm Number\n")
3372 char xpath
[XPATH_MAXLEN
+ 37];
3374 snprintf(xpath
, sizeof(xpath
),
3375 "%s/flex-algos/flex-algo[flex-algo='%ld']", VTY_CURR_XPATH
,
3378 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
3380 ret
= nb_cli_apply_changes(
3381 vty
, "./flex-algos/flex-algo[flex-algo='%ld']", algorithm
);
3382 if (ret
== CMD_SUCCESS
)
3383 VTY_PUSH_XPATH(ISIS_FLEX_ALGO_NODE
, xpath
);
3388 DEFPY_YANG(no_flex_algo
, no_flex_algo_cmd
, "no flex-algo (128-255)$algorithm",
3390 "Flexible Algorithm\n"
3391 "Flexible Algorithm Number\n")
3393 char xpath
[XPATH_MAXLEN
+ 37];
3395 snprintf(xpath
, sizeof(xpath
),
3396 "%s/flex-algos/flex-algo[flex-algo='%ld']", VTY_CURR_XPATH
,
3399 if (!yang_dnode_exists(vty
->candidate_config
->dnode
, xpath
)) {
3400 vty_out(vty
, "ISIS flex-algo %ld isn't exist.\n", algorithm
);
3401 return CMD_ERR_NO_MATCH
;
3404 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
3405 return nb_cli_apply_changes_clear_pending(
3406 vty
, "./flex-algos/flex-algo[flex-algo='%ld']", algorithm
);
3409 DEFPY_YANG(advertise_definition
, advertise_definition_cmd
,
3410 "[no] advertise-definition",
3411 NO_STR
"Advertise Local Flexible Algorithm\n")
3413 nb_cli_enqueue_change(vty
, "./advertise-definition",
3414 no
? NB_OP_DESTROY
: NB_OP_CREATE
,
3415 no
? NULL
: "true");
3416 return nb_cli_apply_changes(vty
, NULL
);
3419 DEFPY_YANG(affinity_include_any
, affinity_include_any_cmd
,
3420 "[no] affinity include-any NAME...",
3422 "Affinity configuration\n"
3423 "Any Include with\n"
3424 "Include NAME list\n")
3426 const char *xpath
= "./affinity-include-anies/affinity-include-any";
3428 return ag_change(vty
, argc
, argv
, xpath
, no
, no
? 3 : 2);
3431 DEFPY_YANG(affinity_include_all
, affinity_include_all_cmd
,
3432 "[no] affinity include-all NAME...",
3434 "Affinity configuration\n"
3435 "All Include with\n"
3436 "Include NAME list\n")
3438 const char *xpath
= "./affinity-include-alls/affinity-include-all";
3440 return ag_change(vty
, argc
, argv
, xpath
, no
, no
? 3 : 2);
3443 DEFPY_YANG(affinity_exclude_any
, affinity_exclude_any_cmd
,
3444 "[no] affinity exclude-any NAME...",
3446 "Affinity configuration\n"
3447 "Any Exclude with\n"
3448 "Exclude NAME list\n")
3450 const char *xpath
= "./affinity-exclude-anies/affinity-exclude-any";
3452 return ag_change(vty
, argc
, argv
, xpath
, no
, no
? 3 : 2);
3455 DEFPY_YANG(prefix_metric
, prefix_metric_cmd
, "[no] prefix-metric",
3456 NO_STR
"Use Flex-Algo Prefix Metric\n")
3458 nb_cli_enqueue_change(vty
, "./prefix-metric",
3459 no
? NB_OP_DESTROY
: NB_OP_CREATE
, NULL
);
3460 return nb_cli_apply_changes(vty
, NULL
);
3463 DEFPY_YANG(dplane_sr_mpls
, dplane_sr_mpls_cmd
, "[no] dataplane sr-mpls",
3465 "Advertise and participate in the specified Data-Planes\n"
3466 "Advertise and participate in SR-MPLS data-plane\n")
3468 nb_cli_enqueue_change(vty
, "./dplane-sr-mpls",
3469 no
? NB_OP_DESTROY
: NB_OP_CREATE
, NULL
);
3470 return nb_cli_apply_changes(vty
, NULL
);
3473 DEFPY_HIDDEN(dplane_srv6
, dplane_srv6_cmd
, "[no] dataplane srv6",
3475 "Advertise and participate in the specified Data-Planes\n"
3476 "Advertise and participate in SRv6 data-plane\n")
3479 nb_cli_enqueue_change(vty
, "./dplane-srv6",
3480 no
? NB_OP_DESTROY
: NB_OP_CREATE
, NULL
);
3481 return nb_cli_apply_changes(vty
, NULL
);
3484 DEFPY_HIDDEN(dplane_ip
, dplane_ip_cmd
, "[no] dataplane ip",
3486 "Advertise and participate in the specified Data-Planes\n"
3487 "Advertise and participate in IP data-plane\n")
3489 nb_cli_enqueue_change(vty
, "./dplane-ip",
3490 no
? NB_OP_DESTROY
: NB_OP_CREATE
, NULL
);
3491 return nb_cli_apply_changes(vty
, NULL
);
3494 DEFPY_YANG(metric_type
, metric_type_cmd
,
3495 "[no] metric-type [igp$igp|te$te|delay$delay]",
3497 "Metric-type used by flex-algo calculation\n"
3498 "Use IGP metric (default)\n"
3499 "Use Delay as metric\n"
3500 "Use Traffic Engineering metric\n")
3502 const char *type
= NULL
;
3507 type
= "te-default";
3509 type
= "min-uni-link-delay";
3511 vty_out(vty
, "Error: unknown metric type\n");
3517 "Warning: this version can advertise a Flex-Algorithm Definition (FAD) with the %s metric.\n"
3518 "However, participation in a Flex-Algorithm with such a metric is not yet supported.\n",
3521 nb_cli_enqueue_change(vty
, "./metric-type",
3522 no
? NB_OP_DESTROY
: NB_OP_MODIFY
,
3524 return nb_cli_apply_changes(vty
, NULL
);
3527 DEFPY_YANG(priority
, priority_cmd
, "[no] priority (0-255)$priority",
3529 "Flex-Algo definition priority\n"
3532 nb_cli_enqueue_change(vty
, "./priority",
3533 no
? NB_OP_DESTROY
: NB_OP_MODIFY
,
3534 no
? NULL
: priority_str
);
3535 return nb_cli_apply_changes(vty
, NULL
);
3538 void cli_show_isis_flex_algo(struct vty
*vty
, const struct lyd_node
*dnode
,
3542 enum flex_algo_metric_type metric_type
;
3546 algorithm
= yang_dnode_get_uint32(dnode
, "./flex-algo");
3547 vty_out(vty
, " flex-algo %u\n", algorithm
);
3549 if (yang_dnode_exists(dnode
, "./advertise-definition"))
3550 vty_out(vty
, " advertise-definition\n");
3552 if (yang_dnode_exists(dnode
, "./dplane-sr-mpls"))
3553 vty_out(vty
, " dataplane sr-mpls\n");
3554 if (yang_dnode_exists(dnode
, "./dplane-srv6"))
3555 vty_out(vty
, " dataplane srv6\n");
3556 if (yang_dnode_exists(dnode
, "./dplane-ip"))
3557 vty_out(vty
, " dataplane ip\n");
3559 if (yang_dnode_exists(dnode
, "./prefix-metric"))
3560 vty_out(vty
, " prefix-metric\n");
3562 if (yang_dnode_exists(dnode
, "./metric-type")) {
3563 metric_type
= yang_dnode_get_enum(dnode
, "./metric-type");
3564 if (metric_type
!= MT_IGP
) {
3565 flex_algo_metric_type_print(type_str
, sizeof(type_str
),
3567 vty_out(vty
, " metric-type %s\n", type_str
);
3571 if (yang_dnode_exists(dnode
, "./priority")) {
3572 priority
= yang_dnode_get_uint32(dnode
, "./priority");
3573 if (priority
!= FLEX_ALGO_PRIO_DEFAULT
)
3574 vty_out(vty
, " priority %u\n", priority
);
3577 if (yang_dnode_exists(dnode
,
3578 "./affinity-include-alls/affinity-include-all")) {
3579 vty_out(vty
, " affinity include-all");
3581 ag_iter_cb
, vty
, dnode
,
3582 "./affinity-include-alls/affinity-include-all");
3586 if (yang_dnode_exists(
3587 dnode
, "./affinity-include-anies/affinity-include-any")) {
3588 vty_out(vty
, " affinity include-any");
3590 ag_iter_cb
, vty
, dnode
,
3591 "./affinity-include-anies/affinity-include-any");
3595 if (yang_dnode_exists(
3596 dnode
, "./affinity-exclude-anies/affinity-exclude-any")) {
3597 vty_out(vty
, " affinity exclude-any");
3599 ag_iter_cb
, vty
, dnode
,
3600 "./affinity-exclude-anies/affinity-exclude-any");
3605 void cli_show_isis_flex_algo_end(struct vty
*vty
, const struct lyd_node
*dnode
)
3607 vty_out(vty
, " !\n");
3611 void isis_cli_init(void)
3613 install_element(CONFIG_NODE
, &router_isis_cmd
);
3614 install_element(CONFIG_NODE
, &no_router_isis_cmd
);
3616 install_element(INTERFACE_NODE
, &ip_router_isis_cmd
);
3617 install_element(INTERFACE_NODE
, &ip_router_isis_vrf_cmd
);
3618 install_element(INTERFACE_NODE
, &ip6_router_isis_cmd
);
3619 install_element(INTERFACE_NODE
, &ip6_router_isis_vrf_cmd
);
3620 install_element(INTERFACE_NODE
, &no_ip_router_isis_cmd
);
3621 install_element(INTERFACE_NODE
, &no_ip_router_isis_vrf_cmd
);
3622 install_element(INTERFACE_NODE
, &isis_bfd_cmd
);
3623 install_element(INTERFACE_NODE
, &isis_bfd_profile_cmd
);
3625 install_element(ISIS_NODE
, &net_cmd
);
3627 install_element(ISIS_NODE
, &is_type_cmd
);
3628 install_element(ISIS_NODE
, &no_is_type_cmd
);
3630 install_element(ISIS_NODE
, &dynamic_hostname_cmd
);
3632 install_element(ISIS_NODE
, &set_overload_bit_cmd
);
3633 install_element(ISIS_NODE
, &set_overload_bit_on_startup_cmd
);
3634 install_element(ISIS_NODE
, &no_set_overload_bit_on_startup_cmd
);
3636 install_element(ISIS_NODE
, &attached_bit_send_cmd
);
3637 install_element(ISIS_NODE
, &attached_bit_receive_ignore_cmd
);
3639 install_element(ISIS_NODE
, &metric_style_cmd
);
3640 install_element(ISIS_NODE
, &no_metric_style_cmd
);
3642 install_element(ISIS_NODE
, &advertise_high_metrics_cmd
);
3644 install_element(ISIS_NODE
, &area_passwd_cmd
);
3645 install_element(ISIS_NODE
, &domain_passwd_cmd
);
3646 install_element(ISIS_NODE
, &no_area_passwd_cmd
);
3648 install_element(ISIS_NODE
, &lsp_gen_interval_cmd
);
3649 install_element(ISIS_NODE
, &no_lsp_gen_interval_cmd
);
3650 install_element(ISIS_NODE
, &lsp_refresh_interval_cmd
);
3651 install_element(ISIS_NODE
, &no_lsp_refresh_interval_cmd
);
3652 install_element(ISIS_NODE
, &max_lsp_lifetime_cmd
);
3653 install_element(ISIS_NODE
, &no_max_lsp_lifetime_cmd
);
3654 install_element(ISIS_NODE
, &lsp_timers_cmd
);
3655 install_element(ISIS_NODE
, &no_lsp_timers_cmd
);
3656 install_element(ISIS_NODE
, &area_lsp_mtu_cmd
);
3657 install_element(ISIS_NODE
, &no_area_lsp_mtu_cmd
);
3658 install_element(ISIS_NODE
, &advertise_passive_only_cmd
);
3660 install_element(ISIS_NODE
, &spf_interval_cmd
);
3661 install_element(ISIS_NODE
, &no_spf_interval_cmd
);
3662 install_element(ISIS_NODE
, &spf_prefix_priority_cmd
);
3663 install_element(ISIS_NODE
, &no_spf_prefix_priority_cmd
);
3664 install_element(ISIS_NODE
, &spf_delay_ietf_cmd
);
3665 install_element(ISIS_NODE
, &no_spf_delay_ietf_cmd
);
3667 install_element(ISIS_NODE
, &area_purge_originator_cmd
);
3669 install_element(ISIS_NODE
, &isis_admin_group_send_zero_cmd
);
3670 install_element(ISIS_NODE
, &isis_asla_legacy_flag_cmd
);
3672 install_element(ISIS_NODE
, &isis_mpls_te_on_cmd
);
3673 install_element(ISIS_NODE
, &no_isis_mpls_te_on_cmd
);
3674 install_element(ISIS_NODE
, &isis_mpls_te_router_addr_cmd
);
3675 install_element(ISIS_NODE
, &no_isis_mpls_te_router_addr_cmd
);
3676 install_element(ISIS_NODE
, &isis_mpls_te_router_addr_v6_cmd
);
3677 install_element(ISIS_NODE
, &no_isis_mpls_te_router_addr_v6_cmd
);
3678 install_element(ISIS_NODE
, &isis_mpls_te_inter_as_cmd
);
3679 install_element(ISIS_NODE
, &isis_mpls_te_export_cmd
);
3680 install_element(ISIS_NODE
, &no_isis_mpls_te_export_cmd
);
3682 install_element(ISIS_NODE
, &isis_default_originate_cmd
);
3683 install_element(ISIS_NODE
, &isis_redistribute_cmd
);
3685 install_element(ISIS_NODE
, &isis_topology_cmd
);
3687 install_element(ISIS_NODE
, &isis_sr_enable_cmd
);
3688 install_element(ISIS_NODE
, &no_isis_sr_enable_cmd
);
3689 install_element(ISIS_NODE
, &isis_sr_global_block_label_range_cmd
);
3690 install_element(ISIS_NODE
, &no_isis_sr_global_block_label_range_cmd
);
3691 install_element(ISIS_NODE
, &isis_sr_node_msd_cmd
);
3692 install_element(ISIS_NODE
, &no_isis_sr_node_msd_cmd
);
3693 install_element(ISIS_NODE
, &isis_sr_prefix_sid_cmd
);
3694 install_element(ISIS_NODE
, &no_isis_sr_prefix_sid_cmd
);
3696 install_element(ISIS_NODE
, &isis_sr_prefix_sid_algorithm_cmd
);
3697 install_element(ISIS_NODE
, &no_isis_sr_prefix_sid_algorithm_cmd
);
3698 #endif /* ifndef FABRICD */
3699 install_element(ISIS_NODE
, &isis_frr_lfa_priority_limit_cmd
);
3700 install_element(ISIS_NODE
, &isis_frr_lfa_tiebreaker_cmd
);
3701 install_element(ISIS_NODE
, &isis_frr_lfa_load_sharing_cmd
);
3702 install_element(ISIS_NODE
, &isis_frr_remote_lfa_plist_cmd
);
3703 install_element(ISIS_NODE
, &no_isis_frr_remote_lfa_plist_cmd
);
3705 install_element(INTERFACE_NODE
, &isis_passive_cmd
);
3707 install_element(INTERFACE_NODE
, &isis_passwd_cmd
);
3708 install_element(INTERFACE_NODE
, &no_isis_passwd_cmd
);
3710 install_element(INTERFACE_NODE
, &isis_metric_cmd
);
3711 install_element(INTERFACE_NODE
, &no_isis_metric_cmd
);
3713 install_element(INTERFACE_NODE
, &isis_hello_interval_cmd
);
3714 install_element(INTERFACE_NODE
, &no_isis_hello_interval_cmd
);
3716 install_element(INTERFACE_NODE
, &isis_hello_multiplier_cmd
);
3717 install_element(INTERFACE_NODE
, &no_isis_hello_multiplier_cmd
);
3719 install_element(INTERFACE_NODE
, &isis_threeway_adj_cmd
);
3721 install_element(INTERFACE_NODE
, &isis_hello_padding_cmd
);
3723 install_element(INTERFACE_NODE
, &csnp_interval_cmd
);
3724 install_element(INTERFACE_NODE
, &no_csnp_interval_cmd
);
3726 install_element(INTERFACE_NODE
, &psnp_interval_cmd
);
3727 install_element(INTERFACE_NODE
, &no_psnp_interval_cmd
);
3729 install_element(INTERFACE_NODE
, &circuit_topology_cmd
);
3731 install_element(INTERFACE_NODE
, &isis_circuit_type_cmd
);
3732 install_element(INTERFACE_NODE
, &no_isis_circuit_type_cmd
);
3734 install_element(INTERFACE_NODE
, &isis_network_cmd
);
3736 install_element(INTERFACE_NODE
, &isis_priority_cmd
);
3737 install_element(INTERFACE_NODE
, &no_isis_priority_cmd
);
3739 install_element(INTERFACE_NODE
, &isis_lfa_cmd
);
3740 install_element(INTERFACE_NODE
, &isis_lfa_exclude_interface_cmd
);
3741 install_element(INTERFACE_NODE
, &isis_remote_lfa_cmd
);
3742 install_element(INTERFACE_NODE
, &isis_remote_lfa_max_metric_cmd
);
3743 install_element(INTERFACE_NODE
, &isis_ti_lfa_cmd
);
3745 install_element(ISIS_NODE
, &log_adj_changes_cmd
);
3746 install_element(ISIS_NODE
, &log_pdu_drops_cmd
);
3748 install_element(ISIS_NODE
, &isis_mpls_ldp_sync_cmd
);
3749 install_element(ISIS_NODE
, &no_isis_mpls_ldp_sync_cmd
);
3750 install_element(ISIS_NODE
, &isis_mpls_ldp_sync_holddown_cmd
);
3751 install_element(ISIS_NODE
, &no_isis_mpls_ldp_sync_holddown_cmd
);
3752 install_element(INTERFACE_NODE
, &isis_mpls_if_ldp_sync_cmd
);
3753 install_element(INTERFACE_NODE
, &isis_mpls_if_ldp_sync_holddown_cmd
);
3754 install_element(INTERFACE_NODE
, &no_isis_mpls_if_ldp_sync_holddown_cmd
);
3756 install_element(ISIS_NODE
, &flex_algo_cmd
);
3757 install_element(ISIS_NODE
, &no_flex_algo_cmd
);
3758 install_element(ISIS_FLEX_ALGO_NODE
, &advertise_definition_cmd
);
3759 install_element(ISIS_FLEX_ALGO_NODE
, &affinity_include_any_cmd
);
3760 install_element(ISIS_FLEX_ALGO_NODE
, &affinity_include_all_cmd
);
3761 install_element(ISIS_FLEX_ALGO_NODE
, &affinity_exclude_any_cmd
);
3762 install_element(ISIS_FLEX_ALGO_NODE
, &dplane_sr_mpls_cmd
);
3763 install_element(ISIS_FLEX_ALGO_NODE
, &dplane_srv6_cmd
);
3764 install_element(ISIS_FLEX_ALGO_NODE
, &dplane_ip_cmd
);
3765 install_element(ISIS_FLEX_ALGO_NODE
, &prefix_metric_cmd
);
3766 install_element(ISIS_FLEX_ALGO_NODE
, &metric_type_cmd
);
3767 install_element(ISIS_FLEX_ALGO_NODE
, &priority_cmd
);
3770 #endif /* ifndef FABRICD */