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"
27 #include "isisd/isis_cli_clippy.c"
32 * XPath: /frr-isisd:isis/instance
34 DEFPY_YANG_NOSH(router_isis
, router_isis_cmd
,
35 "router isis WORD$tag [vrf NAME$vrf_name]",
38 "ISO Routing area tag\n" VRF_CMD_HELP_STR
)
41 char base_xpath
[XPATH_MAXLEN
];
44 vrf_name
= VRF_DEFAULT_NAME
;
46 snprintf(base_xpath
, XPATH_MAXLEN
,
47 "/frr-isisd:isis/instance[area-tag='%s'][vrf='%s']", tag
,
49 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
51 ret
= nb_cli_apply_changes(vty
, "%s", base_xpath
);
52 if (ret
== CMD_SUCCESS
)
53 VTY_PUSH_XPATH(ISIS_NODE
, base_xpath
);
58 DEFPY_YANG(no_router_isis
, no_router_isis_cmd
,
59 "no router isis WORD$tag [vrf NAME$vrf_name]",
62 "ISO Routing area tag\n" VRF_CMD_HELP_STR
)
65 vrf_name
= VRF_DEFAULT_NAME
;
67 if (!yang_dnode_existsf(
68 vty
->candidate_config
->dnode
,
69 "/frr-isisd:isis/instance[area-tag='%s'][vrf='%s']", tag
,
71 vty_out(vty
, "ISIS area %s not found.\n", tag
);
72 return CMD_ERR_NOTHING_TODO
;
75 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
77 return nb_cli_apply_changes_clear_pending(
78 vty
, "/frr-isisd:isis/instance[area-tag='%s'][vrf='%s']", tag
,
82 void cli_show_router_isis(struct vty
*vty
, const struct lyd_node
*dnode
,
85 const char *vrf
= NULL
;
87 vrf
= yang_dnode_get_string(dnode
, "./vrf");
90 vty_out(vty
, "router isis %s",
91 yang_dnode_get_string(dnode
, "./area-tag"));
92 if (!strmatch(vrf
, VRF_DEFAULT_NAME
))
93 vty_out(vty
, " vrf %s", yang_dnode_get_string(dnode
, "./vrf"));
97 void cli_show_router_isis_end(struct vty
*vty
, const struct lyd_node
*dnode
)
99 vty_out(vty
, "exit\n");
103 * XPath: /frr-interface:lib/interface/frr-isisd:isis/
104 * XPath: /frr-interface:lib/interface/frr-isisd:isis/ipv4-routing
105 * XPath: /frr-interface:lib/interface/frr-isisd:isis/ipv6-routing
106 * XPath: /frr-isisd:isis/instance
108 DEFPY_YANG(ip_router_isis
, ip_router_isis_cmd
,
109 "ip router isis WORD$tag",
110 "Interface Internet Protocol config commands\n"
111 "IP router interface commands\n"
112 "IS-IS routing protocol\n"
113 "Routing process tag\n")
115 nb_cli_enqueue_change(vty
, "./frr-isisd:isis", NB_OP_CREATE
, NULL
);
116 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/area-tag", NB_OP_MODIFY
,
118 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/ipv4-routing",
119 NB_OP_MODIFY
, "true");
121 return nb_cli_apply_changes(vty
, NULL
);
124 ALIAS_HIDDEN(ip_router_isis
, ip_router_isis_vrf_cmd
,
125 "ip router isis WORD$tag vrf NAME$vrf_name",
126 "Interface Internet Protocol config commands\n"
127 "IP router interface commands\n"
128 "IS-IS routing protocol\n"
129 "Routing process tag\n" VRF_CMD_HELP_STR
)
131 DEFPY_YANG(ip6_router_isis
, ip6_router_isis_cmd
,
132 "ipv6 router isis WORD$tag",
133 "Interface Internet Protocol config commands\n"
134 "IP router interface commands\n"
135 "IS-IS routing protocol\n"
136 "Routing process tag\n")
138 nb_cli_enqueue_change(vty
, "./frr-isisd:isis", NB_OP_CREATE
, NULL
);
139 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/area-tag", NB_OP_MODIFY
,
141 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/ipv6-routing",
142 NB_OP_MODIFY
, "true");
144 return nb_cli_apply_changes(vty
, NULL
);
147 ALIAS_HIDDEN(ip6_router_isis
, ip6_router_isis_vrf_cmd
,
148 "ipv6 router isis WORD$tag vrf NAME$vrf_name",
149 "Interface Internet Protocol config commands\n"
150 "IP router interface commands\n"
151 "IS-IS routing protocol\n"
152 "Routing process tag\n" VRF_CMD_HELP_STR
)
154 DEFPY_YANG(no_ip_router_isis
, no_ip_router_isis_cmd
,
155 "no <ip|ipv6>$ip router isis [WORD]$tag",
157 "Interface Internet Protocol config commands\n"
158 "IP router interface commands\n"
159 "IP router interface commands\n"
160 "IS-IS routing protocol\n"
161 "Routing process tag\n")
163 const struct lyd_node
*dnode
;
165 dnode
= yang_dnode_getf(vty
->candidate_config
->dnode
,
166 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
171 * If both ipv4 and ipv6 are off delete the interface isis container.
173 if (strmatch(ip
, "ipv6")) {
174 if (!yang_dnode_get_bool(dnode
, "./ipv4-routing"))
175 nb_cli_enqueue_change(vty
, "./frr-isisd:isis",
176 NB_OP_DESTROY
, NULL
);
178 nb_cli_enqueue_change(vty
,
179 "./frr-isisd:isis/ipv6-routing",
180 NB_OP_MODIFY
, "false");
182 if (!yang_dnode_get_bool(dnode
, "./ipv6-routing"))
183 nb_cli_enqueue_change(vty
, "./frr-isisd:isis",
184 NB_OP_DESTROY
, NULL
);
186 nb_cli_enqueue_change(vty
,
187 "./frr-isisd:isis/ipv4-routing",
188 NB_OP_MODIFY
, "false");
191 return nb_cli_apply_changes(vty
, NULL
);
194 ALIAS_HIDDEN(no_ip_router_isis
, no_ip_router_isis_vrf_cmd
,
195 "no <ip|ipv6>$ip router isis WORD$tag vrf NAME$vrf_name",
197 "Interface Internet Protocol config commands\n"
198 "IP router interface commands\n"
199 "IP router interface commands\n"
200 "IS-IS routing protocol\n"
201 "Routing process tag\n"
204 void cli_show_ip_isis_ipv4(struct vty
*vty
, const struct lyd_node
*dnode
,
207 if (!yang_dnode_get_bool(dnode
, NULL
))
209 vty_out(vty
, " ip router isis %s\n",
210 yang_dnode_get_string(dnode
, "../area-tag"));
213 void cli_show_ip_isis_ipv6(struct vty
*vty
, const struct lyd_node
*dnode
,
216 if (!yang_dnode_get_bool(dnode
, NULL
))
218 vty_out(vty
, " ipv6 router isis %s\n",
219 yang_dnode_get_string(dnode
, "../area-tag"));
223 * XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring
229 "Enable BFD support\n")
231 const struct lyd_node
*dnode
;
233 dnode
= yang_dnode_getf(vty
->candidate_config
->dnode
,
234 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
236 vty_out(vty
, "ISIS is not enabled on this circuit\n");
240 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/bfd-monitoring/enabled",
241 NB_OP_MODIFY
, no
? "false" : "true");
243 return nb_cli_apply_changes(vty
, NULL
);
247 * XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring/profile
249 DEFPY_YANG(isis_bfd_profile
,
250 isis_bfd_profile_cmd
,
251 "[no] isis bfd profile BFDPROF$profile",
253 "Enable BFD support\n"
254 "Use a pre-configured profile\n"
257 const struct lyd_node
*dnode
;
259 dnode
= yang_dnode_getf(vty
->candidate_config
->dnode
,
260 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
262 vty_out(vty
, "ISIS is not enabled on this circuit\n");
267 nb_cli_enqueue_change(vty
,
268 "./frr-isisd:isis/bfd-monitoring/profile",
269 NB_OP_DESTROY
, NULL
);
271 nb_cli_enqueue_change(vty
,
272 "./frr-isisd:isis/bfd-monitoring/profile",
273 NB_OP_MODIFY
, profile
);
275 return nb_cli_apply_changes(vty
, NULL
);
278 void cli_show_ip_isis_bfd_monitoring(struct vty
*vty
,
279 const struct lyd_node
*dnode
,
282 if (!yang_dnode_get_bool(dnode
, "./enabled")) {
284 vty_out(vty
, " no isis bfd\n");
286 vty_out(vty
, " isis bfd\n");
289 if (yang_dnode_exists(dnode
, "./profile"))
290 vty_out(vty
, " isis bfd profile %s\n",
291 yang_dnode_get_string(dnode
, "./profile"));
295 * XPath: /frr-isisd:isis/instance/area-address
297 DEFPY_YANG(net
, net_cmd
, "[no] net WORD",
298 "Remove an existing Network Entity Title for this process\n"
299 "A Network Entity Title for this process (OSI only)\n"
300 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
302 nb_cli_enqueue_change(vty
, "./area-address",
303 no
? NB_OP_DESTROY
: NB_OP_CREATE
, net
);
305 return nb_cli_apply_changes(vty
, NULL
);
308 void cli_show_isis_area_address(struct vty
*vty
, const struct lyd_node
*dnode
,
311 vty_out(vty
, " net %s\n", yang_dnode_get_string(dnode
, NULL
));
315 * XPath: /frr-isisd:isis/instance/is-type
317 DEFPY_YANG(is_type
, is_type_cmd
, "is-type <level-1|level-1-2|level-2-only>$level",
318 "IS Level for this routing process (OSI only)\n"
319 "Act as a station router only\n"
320 "Act as both a station router and an area router\n"
321 "Act as an area router only\n")
323 nb_cli_enqueue_change(vty
, "./is-type", NB_OP_MODIFY
,
324 strmatch(level
, "level-2-only") ? "level-2"
327 return nb_cli_apply_changes(vty
, NULL
);
330 DEFPY_YANG(no_is_type
, no_is_type_cmd
,
331 "no is-type [<level-1|level-1-2|level-2-only>]",
333 "IS Level for this routing process (OSI only)\n"
334 "Act as a station router only\n"
335 "Act as both a station router and an area router\n"
336 "Act as an area router only\n")
338 nb_cli_enqueue_change(vty
, "./is-type", NB_OP_MODIFY
, NULL
);
340 return nb_cli_apply_changes(vty
, NULL
);
343 void cli_show_isis_is_type(struct vty
*vty
, const struct lyd_node
*dnode
,
346 int is_type
= yang_dnode_get_enum(dnode
, NULL
);
350 vty_out(vty
, " is-type level-1\n");
353 vty_out(vty
, " is-type level-2-only\n");
355 case IS_LEVEL_1_AND_2
:
356 vty_out(vty
, " is-type level-1-2\n");
362 * XPath: /frr-isisd:isis/instance/dynamic-hostname
364 DEFPY_YANG(dynamic_hostname
, dynamic_hostname_cmd
, "[no] hostname dynamic",
366 "Dynamic hostname for IS-IS\n"
367 "Dynamic hostname\n")
369 nb_cli_enqueue_change(vty
, "./dynamic-hostname", NB_OP_MODIFY
,
370 no
? "false" : "true");
372 return nb_cli_apply_changes(vty
, NULL
);
375 void cli_show_isis_dynamic_hostname(struct vty
*vty
,
376 const struct lyd_node
*dnode
,
379 if (!yang_dnode_get_bool(dnode
, NULL
))
382 vty_out(vty
, " hostname dynamic\n");
386 * XPath: /frr-isisd:isis/instance/overload
388 DEFPY_YANG(set_overload_bit
, set_overload_bit_cmd
, "[no] set-overload-bit",
389 "Reset overload bit to accept transit traffic\n"
390 "Set overload bit to avoid any transit traffic\n")
392 nb_cli_enqueue_change(vty
, "./overload/enabled", NB_OP_MODIFY
,
393 no
? "false" : "true");
395 return nb_cli_apply_changes(vty
, NULL
);
398 void cli_show_isis_overload(struct vty
*vty
, const struct lyd_node
*dnode
,
401 if (!yang_dnode_get_bool(dnode
, NULL
))
403 vty_out(vty
, " set-overload-bit\n");
407 * XPath: /frr-isisd:isis/instance/overload/on-startup
409 DEFPY_YANG(set_overload_bit_on_startup
, set_overload_bit_on_startup_cmd
,
410 "set-overload-bit on-startup (0-86400)$val",
411 "Set overload bit to avoid any transit traffic\n"
412 "Set overload bit on startup\n"
413 "Set overload time in seconds\n")
415 nb_cli_enqueue_change(vty
, "./overload/on-startup", NB_OP_MODIFY
,
418 return nb_cli_apply_changes(vty
, NULL
);
421 DEFPY_YANG(no_set_overload_bit_on_startup
, no_set_overload_bit_on_startup_cmd
,
422 "no set-overload-bit on-startup [(0-86400)$val]",
424 "Reset overload bit to accept transit traffic\n"
425 "Set overload bit on startup\n"
426 "Set overload time in seconds\n")
428 nb_cli_enqueue_change(vty
, "./overload/on-startup", NB_OP_DESTROY
,
431 return nb_cli_apply_changes(vty
, NULL
);
434 void cli_show_isis_overload_on_startup(struct vty
*vty
,
435 const struct lyd_node
*dnode
,
438 vty_out(vty
, " set-overload-bit on-startup %s\n",
439 yang_dnode_get_string(dnode
, NULL
));
443 * XPath: /frr-isisd:isis/instance/attach-send
445 DEFPY_YANG(attached_bit_send
, attached_bit_send_cmd
, "[no] attached-bit send",
446 "Reset attached bit\n"
447 "Set attached bit for inter-area traffic\n"
448 "Set attached bit in LSP sent to L1 router\n")
450 nb_cli_enqueue_change(vty
, "./attach-send", NB_OP_MODIFY
,
451 no
? "false" : "true");
453 return nb_cli_apply_changes(vty
, NULL
);
456 void cli_show_isis_attached_send(struct vty
*vty
, const struct lyd_node
*dnode
,
459 if (!yang_dnode_get_bool(dnode
, NULL
))
461 vty_out(vty
, " attached-bit send\n");
465 * XPath: /frr-isisd:isis/instance/attach-receive-ignore
468 attached_bit_receive_ignore
, attached_bit_receive_ignore_cmd
,
469 "[no] attached-bit receive ignore",
470 "Reset attached bit\n"
471 "Set attach bit for inter-area traffic\n"
472 "If LSP received with attached bit set, create default route to neighbor\n"
473 "Do not process attached bit\n")
475 nb_cli_enqueue_change(vty
, "./attach-receive-ignore", NB_OP_MODIFY
,
476 no
? "false" : "true");
478 return nb_cli_apply_changes(vty
, NULL
);
481 void cli_show_isis_attached_receive(struct vty
*vty
,
482 const struct lyd_node
*dnode
,
485 if (!yang_dnode_get_bool(dnode
, NULL
))
487 vty_out(vty
, " attached-bit receive ignore\n");
491 * XPath: /frr-isisd:isis/instance/metric-style
493 DEFPY_YANG(metric_style
, metric_style_cmd
,
494 "metric-style <narrow|transition|wide>$style",
495 "Use old-style (ISO 10589) or new-style packet formats\n"
496 "Use old style of TLVs with narrow metric\n"
497 "Send and accept both styles of TLVs during transition\n"
498 "Use new style of TLVs to carry wider metric\n")
500 nb_cli_enqueue_change(vty
, "./metric-style", NB_OP_MODIFY
, style
);
502 return nb_cli_apply_changes(vty
, NULL
);
505 DEFPY_YANG(no_metric_style
, no_metric_style_cmd
,
506 "no metric-style [narrow|transition|wide]",
508 "Use old-style (ISO 10589) or new-style packet formats\n"
509 "Use old style of TLVs with narrow metric\n"
510 "Send and accept both styles of TLVs during transition\n"
511 "Use new style of TLVs to carry wider metric\n")
513 nb_cli_enqueue_change(vty
, "./metric-style", NB_OP_MODIFY
, NULL
);
515 return nb_cli_apply_changes(vty
, NULL
);
518 void cli_show_isis_metric_style(struct vty
*vty
, const struct lyd_node
*dnode
,
521 int metric
= yang_dnode_get_enum(dnode
, NULL
);
524 case ISIS_NARROW_METRIC
:
525 vty_out(vty
, " metric-style narrow\n");
527 case ISIS_WIDE_METRIC
:
528 vty_out(vty
, " metric-style wide\n");
530 case ISIS_TRANSITION_METRIC
:
531 vty_out(vty
, " metric-style transition\n");
537 * XPath: /frr-isisd:isis/instance/area-password
539 DEFPY_YANG(area_passwd
, area_passwd_cmd
,
540 "area-password <clear|md5>$pwd_type WORD$pwd [authenticate snp <send-only|validate>$snp]",
541 "Configure the authentication password for an area\n"
542 "Clear-text authentication type\n"
543 "MD5 authentication type\n"
544 "Level-wide password\n"
547 "Send but do not check PDUs on receiving\n"
548 "Send and check PDUs on receiving\n")
550 nb_cli_enqueue_change(vty
, "./area-password", NB_OP_CREATE
, NULL
);
551 nb_cli_enqueue_change(vty
, "./area-password/password", NB_OP_MODIFY
,
553 nb_cli_enqueue_change(vty
, "./area-password/password-type",
554 NB_OP_MODIFY
, pwd_type
);
555 nb_cli_enqueue_change(vty
, "./area-password/authenticate-snp",
556 NB_OP_MODIFY
, snp
? snp
: "none");
558 return nb_cli_apply_changes(vty
, NULL
);
561 void cli_show_isis_area_pwd(struct vty
*vty
, const struct lyd_node
*dnode
,
566 vty_out(vty
, " area-password %s %s",
567 yang_dnode_get_string(dnode
, "./password-type"),
568 yang_dnode_get_string(dnode
, "./password"));
569 snp
= yang_dnode_get_string(dnode
, "./authenticate-snp");
570 if (!strmatch("none", snp
))
571 vty_out(vty
, " authenticate snp %s", snp
);
576 * XPath: /frr-isisd:isis/instance/domain-password
578 DEFPY_YANG(domain_passwd
, domain_passwd_cmd
,
579 "domain-password <clear|md5>$pwd_type WORD$pwd [authenticate snp <send-only|validate>$snp]",
580 "Set the authentication password for a routing domain\n"
581 "Clear-text authentication type\n"
582 "MD5 authentication type\n"
583 "Level-wide password\n"
586 "Send but do not check PDUs on receiving\n"
587 "Send and check PDUs on receiving\n")
589 nb_cli_enqueue_change(vty
, "./domain-password", NB_OP_CREATE
, NULL
);
590 nb_cli_enqueue_change(vty
, "./domain-password/password", NB_OP_MODIFY
,
592 nb_cli_enqueue_change(vty
, "./domain-password/password-type",
593 NB_OP_MODIFY
, pwd_type
);
594 nb_cli_enqueue_change(vty
, "./domain-password/authenticate-snp",
595 NB_OP_MODIFY
, snp
? snp
: "none");
597 return nb_cli_apply_changes(vty
, NULL
);
600 DEFPY_YANG(no_area_passwd
, no_area_passwd_cmd
,
601 "no <area-password|domain-password>$cmd",
603 "Configure the authentication password for an area\n"
604 "Set the authentication password for a routing domain\n")
606 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
608 return nb_cli_apply_changes(vty
, "./%s", cmd
);
611 void cli_show_isis_domain_pwd(struct vty
*vty
, const struct lyd_node
*dnode
,
616 vty_out(vty
, " domain-password %s %s",
617 yang_dnode_get_string(dnode
, "./password-type"),
618 yang_dnode_get_string(dnode
, "./password"));
619 snp
= yang_dnode_get_string(dnode
, "./authenticate-snp");
620 if (!strmatch("none", snp
))
621 vty_out(vty
, " authenticate snp %s", snp
);
626 * XPath: /frr-isisd:isis/instance/lsp/timers/level-1/generation-interval
627 * XPath: /frr-isisd:isis/instance/lsp/timers/level-2/generation-interval
629 DEFPY_YANG(lsp_gen_interval
, lsp_gen_interval_cmd
,
630 "lsp-gen-interval [level-1|level-2]$level (1-120)$val",
631 "Minimum interval between regenerating same LSP\n"
632 "Set interval for level 1 only\n"
633 "Set interval for level 2 only\n"
634 "Minimum interval in seconds\n")
636 if (!level
|| strmatch(level
, "level-1"))
637 nb_cli_enqueue_change(
638 vty
, "./lsp/timers/level-1/generation-interval",
639 NB_OP_MODIFY
, val_str
);
640 if (!level
|| strmatch(level
, "level-2"))
641 nb_cli_enqueue_change(
642 vty
, "./lsp/timers/level-2/generation-interval",
643 NB_OP_MODIFY
, val_str
);
645 return nb_cli_apply_changes(vty
, NULL
);
648 DEFPY_YANG(no_lsp_gen_interval
, no_lsp_gen_interval_cmd
,
649 "no lsp-gen-interval [level-1|level-2]$level [(1-120)]",
651 "Minimum interval between regenerating same LSP\n"
652 "Set interval for level 1 only\n"
653 "Set interval for level 2 only\n"
654 "Minimum interval in seconds\n")
656 if (!level
|| strmatch(level
, "level-1"))
657 nb_cli_enqueue_change(
658 vty
, "./lsp/timers/level-1/generation-interval",
660 if (!level
|| strmatch(level
, "level-2"))
661 nb_cli_enqueue_change(
662 vty
, "./lsp/timers/level-2/generation-interval",
665 return nb_cli_apply_changes(vty
, NULL
);
669 * XPath: /frr-isisd:isis/instance/lsp/timers/level-1/refresh-interval
670 * XPath: /frr-isisd:isis/instance/lsp/timers/level-2/refresh-interval
672 DEFPY_YANG(lsp_refresh_interval
, lsp_refresh_interval_cmd
,
673 "lsp-refresh-interval [level-1|level-2]$level (1-65235)$val",
674 "LSP refresh interval\n"
675 "LSP refresh interval for Level 1 only\n"
676 "LSP refresh interval for Level 2 only\n"
677 "LSP refresh interval in seconds\n")
679 if (!level
|| strmatch(level
, "level-1"))
680 nb_cli_enqueue_change(vty
,
681 "./lsp/timers/level-1/refresh-interval",
682 NB_OP_MODIFY
, val_str
);
683 if (!level
|| strmatch(level
, "level-2"))
684 nb_cli_enqueue_change(vty
,
685 "./lsp/timers/level-2/refresh-interval",
686 NB_OP_MODIFY
, val_str
);
688 return nb_cli_apply_changes(vty
, NULL
);
691 DEFPY_YANG(no_lsp_refresh_interval
, no_lsp_refresh_interval_cmd
,
692 "no lsp-refresh-interval [level-1|level-2]$level [(1-65235)]",
694 "LSP refresh interval\n"
695 "LSP refresh interval for Level 1 only\n"
696 "LSP refresh interval for Level 2 only\n"
697 "LSP refresh interval in seconds\n")
699 if (!level
|| strmatch(level
, "level-1"))
700 nb_cli_enqueue_change(vty
,
701 "./lsp/timers/level-1/refresh-interval",
703 if (!level
|| strmatch(level
, "level-2"))
704 nb_cli_enqueue_change(vty
,
705 "./lsp/timers/level-2/refresh-interval",
708 return nb_cli_apply_changes(vty
, NULL
);
712 * XPath: /frr-isisd:isis/instance/lsp/timers/level-1/maximum-lifetime
713 * XPath: /frr-isisd:isis/instance/lsp/timers/level-1/maximum-lifetime
716 DEFPY_YANG(max_lsp_lifetime
, max_lsp_lifetime_cmd
,
717 "max-lsp-lifetime [level-1|level-2]$level (350-65535)$val",
718 "Maximum LSP lifetime\n"
719 "Maximum LSP lifetime for Level 1 only\n"
720 "Maximum LSP lifetime for Level 2 only\n"
721 "LSP lifetime in seconds\n")
723 if (!level
|| strmatch(level
, "level-1"))
724 nb_cli_enqueue_change(vty
,
725 "./lsp/timers/level-1/maximum-lifetime",
726 NB_OP_MODIFY
, val_str
);
727 if (!level
|| strmatch(level
, "level-2"))
728 nb_cli_enqueue_change(vty
,
729 "./lsp/timers/level-2/maximum-lifetime",
730 NB_OP_MODIFY
, val_str
);
732 return nb_cli_apply_changes(vty
, NULL
);
735 DEFPY_YANG(no_max_lsp_lifetime
, no_max_lsp_lifetime_cmd
,
736 "no max-lsp-lifetime [level-1|level-2]$level [(350-65535)]",
738 "Maximum LSP lifetime\n"
739 "Maximum LSP lifetime for Level 1 only\n"
740 "Maximum LSP lifetime for Level 2 only\n"
741 "LSP lifetime in seconds\n")
743 if (!level
|| strmatch(level
, "level-1"))
744 nb_cli_enqueue_change(vty
,
745 "./lsp/timers/level-1/maximum-lifetime",
747 if (!level
|| strmatch(level
, "level-2"))
748 nb_cli_enqueue_change(vty
,
749 "./lsp/timers/level-2/maximum-lifetime",
752 return nb_cli_apply_changes(vty
, NULL
);
755 /* unified LSP timers command
756 * XPath: /frr-isisd:isis/instance/lsp/timers
759 DEFPY_YANG(lsp_timers
, lsp_timers_cmd
,
760 "lsp-timers [level-1|level-2]$level gen-interval (1-120)$gen refresh-interval (1-65235)$refresh max-lifetime (350-65535)$lifetime",
761 "LSP-related timers\n"
762 "LSP-related timers for Level 1 only\n"
763 "LSP-related timers for Level 2 only\n"
764 "Minimum interval between regenerating same LSP\n"
765 "Generation interval in seconds\n"
766 "LSP refresh interval\n"
767 "LSP refresh interval in seconds\n"
768 "Maximum LSP lifetime\n"
769 "Maximum LSP lifetime in seconds\n")
771 if (!level
|| strmatch(level
, "level-1")) {
772 nb_cli_enqueue_change(
773 vty
, "./lsp/timers/level-1/generation-interval",
774 NB_OP_MODIFY
, gen_str
);
775 nb_cli_enqueue_change(vty
,
776 "./lsp/timers/level-1/refresh-interval",
777 NB_OP_MODIFY
, refresh_str
);
778 nb_cli_enqueue_change(vty
,
779 "./lsp/timers/level-1/maximum-lifetime",
780 NB_OP_MODIFY
, lifetime_str
);
782 if (!level
|| strmatch(level
, "level-2")) {
783 nb_cli_enqueue_change(
784 vty
, "./lsp/timers/level-2/generation-interval",
785 NB_OP_MODIFY
, gen_str
);
786 nb_cli_enqueue_change(vty
,
787 "./lsp/timers/level-2/refresh-interval",
788 NB_OP_MODIFY
, refresh_str
);
789 nb_cli_enqueue_change(vty
,
790 "./lsp/timers/level-2/maximum-lifetime",
791 NB_OP_MODIFY
, lifetime_str
);
794 return nb_cli_apply_changes(vty
, NULL
);
797 DEFPY_YANG(no_lsp_timers
, no_lsp_timers_cmd
,
798 "no lsp-timers [level-1|level-2]$level [gen-interval (1-120) refresh-interval (1-65235) max-lifetime (350-65535)]",
800 "LSP-related timers\n"
801 "LSP-related timers for Level 1 only\n"
802 "LSP-related timers for Level 2 only\n"
803 "Minimum interval between regenerating same LSP\n"
804 "Generation interval in seconds\n"
805 "LSP refresh interval\n"
806 "LSP refresh interval in seconds\n"
807 "Maximum LSP lifetime\n"
808 "Maximum LSP lifetime in seconds\n")
810 if (!level
|| strmatch(level
, "level-1")) {
811 nb_cli_enqueue_change(
812 vty
, "./lsp/timers/level-1/generation-interval",
814 nb_cli_enqueue_change(vty
,
815 "./lsp/timers/level-1/refresh-interval",
817 nb_cli_enqueue_change(vty
,
818 "./lsp/timers/level-1/maximum-lifetime",
821 if (!level
|| strmatch(level
, "level-2")) {
822 nb_cli_enqueue_change(
823 vty
, "./lsp/timers/level-2/generation-interval",
825 nb_cli_enqueue_change(vty
,
826 "./lsp/timers/level-2/refresh-interval",
828 nb_cli_enqueue_change(vty
,
829 "./lsp/timers/level-2/maximum-lifetime",
833 return nb_cli_apply_changes(vty
, NULL
);
836 void cli_show_isis_lsp_timers(struct vty
*vty
, const struct lyd_node
*dnode
,
839 const char *l1_refresh
=
840 yang_dnode_get_string(dnode
, "./level-1/refresh-interval");
841 const char *l2_refresh
=
842 yang_dnode_get_string(dnode
, "./level-2/refresh-interval");
843 const char *l1_lifetime
=
844 yang_dnode_get_string(dnode
, "./level-1/maximum-lifetime");
845 const char *l2_lifetime
=
846 yang_dnode_get_string(dnode
, "./level-2/maximum-lifetime");
848 yang_dnode_get_string(dnode
, "./level-1/generation-interval");
850 yang_dnode_get_string(dnode
, "./level-2/generation-interval");
851 if (strmatch(l1_refresh
, l2_refresh
)
852 && strmatch(l1_lifetime
, l2_lifetime
) && strmatch(l1_gen
, l2_gen
))
854 " lsp-timers gen-interval %s refresh-interval %s max-lifetime %s\n",
855 l1_gen
, l1_refresh
, l1_lifetime
);
858 " lsp-timers level-1 gen-interval %s refresh-interval %s max-lifetime %s\n",
859 l1_gen
, l1_refresh
, l1_lifetime
);
861 " lsp-timers level-2 gen-interval %s refresh-interval %s max-lifetime %s\n",
862 l2_gen
, l2_refresh
, l2_lifetime
);
867 * XPath: /frr-isisd:isis/instance/lsp/mtu
869 DEFPY_YANG(area_lsp_mtu
, area_lsp_mtu_cmd
, "lsp-mtu (128-4352)$val",
870 "Configure the maximum size of generated LSPs\n"
871 "Maximum size of generated LSPs\n")
873 nb_cli_enqueue_change(vty
, "./lsp/mtu", NB_OP_MODIFY
, val_str
);
875 return nb_cli_apply_changes(vty
, NULL
);
878 DEFPY_YANG(no_area_lsp_mtu
, no_area_lsp_mtu_cmd
, "no lsp-mtu [(128-4352)]",
880 "Configure the maximum size of generated LSPs\n"
881 "Maximum size of generated LSPs\n")
883 nb_cli_enqueue_change(vty
, "./lsp/mtu", NB_OP_MODIFY
, NULL
);
885 return nb_cli_apply_changes(vty
, NULL
);
888 void cli_show_isis_lsp_mtu(struct vty
*vty
, const struct lyd_node
*dnode
,
891 vty_out(vty
, " lsp-mtu %s\n", yang_dnode_get_string(dnode
, NULL
));
895 * XPath: /frr-isisd:isis/instance/spf/minimum-interval
897 DEFPY_YANG(spf_interval
, spf_interval_cmd
,
898 "spf-interval [level-1|level-2]$level (1-120)$val",
899 "Minimum interval between SPF calculations\n"
900 "Set interval for level 1 only\n"
901 "Set interval for level 2 only\n"
902 "Minimum interval between consecutive SPFs in seconds\n")
904 if (!level
|| strmatch(level
, "level-1"))
905 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-1",
906 NB_OP_MODIFY
, val_str
);
907 if (!level
|| strmatch(level
, "level-2"))
908 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-2",
909 NB_OP_MODIFY
, val_str
);
911 return nb_cli_apply_changes(vty
, NULL
);
914 DEFPY_YANG(no_spf_interval
, no_spf_interval_cmd
,
915 "no spf-interval [level-1|level-2]$level [(1-120)]",
917 "Minimum interval between SPF calculations\n"
918 "Set interval for level 1 only\n"
919 "Set interval for level 2 only\n"
920 "Minimum interval between consecutive SPFs in seconds\n")
922 if (!level
|| strmatch(level
, "level-1"))
923 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-1",
925 if (!level
|| strmatch(level
, "level-2"))
926 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-2",
929 return nb_cli_apply_changes(vty
, NULL
);
932 void cli_show_isis_spf_min_interval(struct vty
*vty
,
933 const struct lyd_node
*dnode
,
936 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
937 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
939 if (strmatch(l1
, l2
))
940 vty_out(vty
, " spf-interval %s\n", l1
);
942 vty_out(vty
, " spf-interval level-1 %s\n", l1
);
943 vty_out(vty
, " spf-interval level-2 %s\n", l2
);
948 * XPath: /frr-isisd:isis/instance/spf/ietf-backoff-delay
950 DEFPY_YANG(spf_delay_ietf
, spf_delay_ietf_cmd
,
951 "spf-delay-ietf init-delay (0-60000) short-delay (0-60000) long-delay (0-60000) holddown (0-60000) time-to-learn (0-60000)",
952 "IETF SPF delay algorithm\n"
953 "Delay used while in QUIET state\n"
954 "Delay used while in QUIET state in milliseconds\n"
955 "Delay used while in SHORT_WAIT state\n"
956 "Delay used while in SHORT_WAIT state in milliseconds\n"
957 "Delay used while in LONG_WAIT\n"
958 "Delay used while in LONG_WAIT state in milliseconds\n"
959 "Time with no received IGP events before considering IGP stable\n"
960 "Time with no received IGP events before considering IGP stable (in milliseconds)\n"
961 "Maximum duration needed to learn all the events related to a single failure\n"
962 "Maximum duration needed to learn all the events related to a single failure (in milliseconds)\n")
964 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay", NB_OP_CREATE
,
966 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/init-delay",
967 NB_OP_MODIFY
, init_delay_str
);
968 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/short-delay",
969 NB_OP_MODIFY
, short_delay_str
);
970 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/long-delay",
971 NB_OP_MODIFY
, long_delay_str
);
972 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/hold-down",
973 NB_OP_MODIFY
, holddown_str
);
974 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/time-to-learn",
975 NB_OP_MODIFY
, time_to_learn_str
);
977 return nb_cli_apply_changes(vty
, NULL
);
980 DEFPY_YANG(no_spf_delay_ietf
, no_spf_delay_ietf_cmd
,
981 "no spf-delay-ietf [init-delay (0-60000) short-delay (0-60000) long-delay (0-60000) holddown (0-60000) time-to-learn (0-60000)]",
983 "IETF SPF delay algorithm\n"
984 "Delay used while in QUIET state\n"
985 "Delay used while in QUIET state in milliseconds\n"
986 "Delay used while in SHORT_WAIT state\n"
987 "Delay used while in SHORT_WAIT state in milliseconds\n"
988 "Delay used while in LONG_WAIT\n"
989 "Delay used while in LONG_WAIT state in milliseconds\n"
990 "Time with no received IGP events before considering IGP stable\n"
991 "Time with no received IGP events before considering IGP stable (in milliseconds)\n"
992 "Maximum duration needed to learn all the events related to a single failure\n"
993 "Maximum duration needed to learn all the events related to a single failure (in milliseconds)\n")
995 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay", NB_OP_DESTROY
,
998 return nb_cli_apply_changes(vty
, NULL
);
1001 void cli_show_isis_spf_ietf_backoff(struct vty
*vty
,
1002 const struct lyd_node
*dnode
,
1006 " spf-delay-ietf init-delay %s short-delay %s long-delay %s holddown %s time-to-learn %s\n",
1007 yang_dnode_get_string(dnode
, "./init-delay"),
1008 yang_dnode_get_string(dnode
, "./short-delay"),
1009 yang_dnode_get_string(dnode
, "./long-delay"),
1010 yang_dnode_get_string(dnode
, "./hold-down"),
1011 yang_dnode_get_string(dnode
, "./time-to-learn"));
1015 * XPath: /frr-isisd:isis/instance/spf/prefix-priorities/medium/access-list-name
1017 DEFPY_YANG(spf_prefix_priority
, spf_prefix_priority_cmd
,
1018 "spf prefix-priority <critical|high|medium>$priority ACCESSLIST_NAME$acl_name",
1019 "SPF configuration\n"
1020 "Configure a prefix priority list\n"
1021 "Specify critical priority prefixes\n"
1022 "Specify high priority prefixes\n"
1023 "Specify medium priority prefixes\n"
1024 "Access-list name\n")
1026 char xpath
[XPATH_MAXLEN
];
1028 snprintf(xpath
, XPATH_MAXLEN
,
1029 "./spf/prefix-priorities/%s/access-list-name", priority
);
1030 nb_cli_enqueue_change(vty
, xpath
, NB_OP_CREATE
, acl_name
);
1032 return nb_cli_apply_changes(vty
, NULL
);
1035 DEFPY_YANG(no_spf_prefix_priority
, no_spf_prefix_priority_cmd
,
1036 "no spf prefix-priority <critical|high|medium>$priority [ACCESSLIST_NAME]",
1038 "SPF configuration\n"
1039 "Configure a prefix priority list\n"
1040 "Specify critical priority prefixes\n"
1041 "Specify high priority prefixes\n"
1042 "Specify medium priority prefixes\n"
1043 "Access-list name\n")
1045 char xpath
[XPATH_MAXLEN
];
1047 snprintf(xpath
, XPATH_MAXLEN
,
1048 "./spf/prefix-priorities/%s/access-list-name", priority
);
1049 nb_cli_enqueue_change(vty
, xpath
, NB_OP_DESTROY
, NULL
);
1051 return nb_cli_apply_changes(vty
, NULL
);
1054 void cli_show_isis_spf_prefix_priority(struct vty
*vty
,
1055 const struct lyd_node
*dnode
,
1058 vty_out(vty
, " spf prefix-priority %s %s\n",
1059 dnode
->parent
->schema
->name
,
1060 yang_dnode_get_string(dnode
, NULL
));
1064 * XPath: /frr-isisd:isis/instance/purge-originator
1066 DEFPY_YANG(area_purge_originator
, area_purge_originator_cmd
, "[no] purge-originator",
1067 NO_STR
"Use the RFC 6232 purge-originator\n")
1069 nb_cli_enqueue_change(vty
, "./purge-originator", NB_OP_MODIFY
,
1070 no
? "false" : "true");
1072 return nb_cli_apply_changes(vty
, NULL
);
1075 void cli_show_isis_purge_origin(struct vty
*vty
, const struct lyd_node
*dnode
,
1078 if (!yang_dnode_get_bool(dnode
, NULL
))
1079 vty_out(vty
, " no");
1080 vty_out(vty
, " purge-originator\n");
1084 * XPath: /frr-isisd:isis/instance/mpls-te
1086 DEFPY_YANG(isis_mpls_te_on
, isis_mpls_te_on_cmd
, "mpls-te on",
1087 MPLS_TE_STR
"Enable the MPLS-TE functionality\n")
1089 nb_cli_enqueue_change(vty
, "./mpls-te", NB_OP_CREATE
,
1092 return nb_cli_apply_changes(vty
, NULL
);
1095 DEFPY_YANG(no_isis_mpls_te_on
, no_isis_mpls_te_on_cmd
, "no mpls-te [on]",
1097 "Disable the MPLS-TE functionality\n"
1098 "Disable the MPLS-TE functionality\n")
1100 nb_cli_enqueue_change(vty
, "./mpls-te", NB_OP_DESTROY
,
1103 return nb_cli_apply_changes(vty
, NULL
);
1106 void cli_show_isis_mpls_te(struct vty
*vty
, const struct lyd_node
*dnode
,
1109 vty_out(vty
, " mpls-te on\n");
1113 * XPath: /frr-isisd:isis/instance/mpls-te/router-address
1115 DEFPY_YANG(isis_mpls_te_router_addr
, isis_mpls_te_router_addr_cmd
,
1116 "mpls-te router-address A.B.C.D",
1118 "Stable IP address of the advertising router\n"
1119 "MPLS-TE router address in IPv4 address format\n")
1121 nb_cli_enqueue_change(vty
, "./mpls-te/router-address",
1122 NB_OP_MODIFY
, router_address_str
);
1124 return nb_cli_apply_changes(vty
, NULL
);
1127 DEFPY_YANG(no_isis_mpls_te_router_addr
, no_isis_mpls_te_router_addr_cmd
,
1128 "no mpls-te router-address [A.B.C.D]",
1130 "Delete IP address of the advertising router\n"
1131 "MPLS-TE router address in IPv4 address format\n")
1133 nb_cli_enqueue_change(vty
, "./mpls-te/router-address",
1134 NB_OP_DESTROY
, NULL
);
1136 return nb_cli_apply_changes(vty
, NULL
);
1139 void cli_show_isis_mpls_te_router_addr(struct vty
*vty
,
1140 const struct lyd_node
*dnode
,
1143 vty_out(vty
, " mpls-te router-address %s\n",
1144 yang_dnode_get_string(dnode
, NULL
));
1148 * XPath: /frr-isisd:isis/instance/mpls-te/router-address-v6
1150 DEFPY_YANG(isis_mpls_te_router_addr_v6
, isis_mpls_te_router_addr_v6_cmd
,
1151 "mpls-te router-address ipv6 X:X::X:X",
1153 "Stable IP address of the advertising router\n"
1155 "MPLS-TE router address in IPv6 address format\n")
1157 nb_cli_enqueue_change(vty
, "./mpls-te/router-address-v6", NB_OP_MODIFY
,
1160 return nb_cli_apply_changes(vty
, NULL
);
1163 DEFPY_YANG(no_isis_mpls_te_router_addr_v6
, no_isis_mpls_te_router_addr_v6_cmd
,
1164 "no mpls-te router-address ipv6 [X:X::X:X]",
1166 "Delete IP address of the advertising router\n"
1168 "MPLS-TE router address in IPv6 address format\n")
1170 nb_cli_enqueue_change(vty
, "./mpls-te/router-address-v6", NB_OP_DESTROY
,
1173 return nb_cli_apply_changes(vty
, NULL
);
1176 void cli_show_isis_mpls_te_router_addr_ipv6(struct vty
*vty
,
1177 const struct lyd_node
*dnode
,
1180 vty_out(vty
, " mpls-te router-address ipv6 %s\n",
1181 yang_dnode_get_string(dnode
, NULL
));
1184 DEFPY_YANG(isis_mpls_te_inter_as
, isis_mpls_te_inter_as_cmd
,
1185 "[no] mpls-te inter-as [level-1|level-1-2|level-2-only]",
1187 "Configure MPLS-TE Inter-AS support\n"
1188 "AREA native mode self originate INTER-AS LSP with L1 only flooding scope\n"
1189 "AREA native mode self originate INTER-AS LSP with L1 and L2 flooding scope\n"
1190 "AS native mode self originate INTER-AS LSP with L2 only flooding scope\n")
1192 vty_out(vty
, "MPLS-TE Inter-AS is not yet supported\n");
1197 * XPath: /frr-isisd:isis/instance/mpls-te/export
1199 DEFPY_YANG(isis_mpls_te_export
, isis_mpls_te_export_cmd
, "mpls-te export",
1200 MPLS_TE_STR
"Enable export of MPLS-TE Link State information\n")
1202 nb_cli_enqueue_change(vty
, "./mpls-te/export", NB_OP_MODIFY
, "true");
1204 return nb_cli_apply_changes(vty
, NULL
);
1207 DEFPY_YANG(no_isis_mpls_te_export
, no_isis_mpls_te_export_cmd
,
1208 "no mpls-te export",
1210 "Disable export of MPLS-TE Link State information\n")
1212 nb_cli_enqueue_change(vty
, "./mpls-te/export", NB_OP_MODIFY
, "false");
1214 return nb_cli_apply_changes(vty
, NULL
);
1217 void cli_show_isis_mpls_te_export(struct vty
*vty
, const struct lyd_node
*dnode
,
1220 if (!yang_dnode_get_bool(dnode
, NULL
))
1221 vty_out(vty
, " no");
1223 vty_out(vty
, " mpls-te export\n");
1227 * XPath: /frr-isisd:isis/instance/default-information-originate
1229 DEFPY_YANG(isis_default_originate
, isis_default_originate_cmd
,
1230 "[no] default-information originate <ipv4|ipv6>$ip <level-1|level-2>$level [always]$always [{metric (0-16777215)$metric|route-map RMAP_NAME$rmap}]",
1232 "Control distribution of default information\n"
1233 "Distribute a default route\n"
1234 "Distribute default route for IPv4\n"
1235 "Distribute default route for IPv6\n"
1236 "Distribute default route into level-1\n"
1237 "Distribute default route into level-2\n"
1238 "Always advertise default route\n"
1239 "Metric for default route\n"
1240 "IS-IS default metric\n"
1241 "Route map reference\n"
1242 "Pointer to route-map entries\n")
1245 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1247 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1248 nb_cli_enqueue_change(vty
, "./always", NB_OP_MODIFY
,
1249 always
? "true" : "false");
1250 nb_cli_enqueue_change(vty
, "./route-map",
1251 rmap
? NB_OP_MODIFY
: NB_OP_DESTROY
,
1252 rmap
? rmap
: NULL
);
1253 nb_cli_enqueue_change(vty
, "./metric", NB_OP_MODIFY
,
1254 metric_str
? metric_str
: NULL
);
1255 if (strmatch(ip
, "ipv6") && !always
) {
1257 "Zebra doesn't implement default-originate for IPv6 yet\n");
1259 "so use with care or use default-originate always.\n");
1263 return nb_cli_apply_changes(
1264 vty
, "./default-information-originate/%s[level='%s']", ip
,
1268 static void vty_print_def_origin(struct vty
*vty
, const struct lyd_node
*dnode
,
1269 const char *family
, const char *level
,
1272 vty_out(vty
, " default-information originate %s %s", family
, level
);
1273 if (yang_dnode_get_bool(dnode
, "./always"))
1274 vty_out(vty
, " always");
1276 if (yang_dnode_exists(dnode
, "./route-map"))
1277 vty_out(vty
, " route-map %s",
1278 yang_dnode_get_string(dnode
, "./route-map"));
1279 if (show_defaults
|| !yang_dnode_is_default(dnode
, "./metric"))
1280 vty_out(vty
, " metric %s",
1281 yang_dnode_get_string(dnode
, "./metric"));
1286 void cli_show_isis_def_origin_ipv4(struct vty
*vty
,
1287 const struct lyd_node
*dnode
,
1290 const char *level
= yang_dnode_get_string(dnode
, "./level");
1292 vty_print_def_origin(vty
, dnode
, "ipv4", level
, show_defaults
);
1295 void cli_show_isis_def_origin_ipv6(struct vty
*vty
,
1296 const struct lyd_node
*dnode
,
1299 const char *level
= yang_dnode_get_string(dnode
, "./level");
1301 vty_print_def_origin(vty
, dnode
, "ipv6", level
, show_defaults
);
1305 * XPath: /frr-isisd:isis/instance/redistribute
1307 DEFPY_YANG(isis_redistribute
, isis_redistribute_cmd
,
1308 "[no] redistribute <ipv4$ip " PROTO_IP_REDIST_STR
"$proto|ipv6$ip "
1309 PROTO_IP6_REDIST_STR
"$proto> <level-1|level-2>$level"
1310 "[{metric (0-16777215)|route-map RMAP_NAME$route_map}]",
1312 "Redistribute IPv4 routes\n"
1313 PROTO_IP_REDIST_HELP
1314 "Redistribute IPv6 routes\n"
1315 PROTO_IP6_REDIST_HELP
1316 "Redistribute into level-1\n"
1317 "Redistribute into level-2\n"
1318 "Metric for redistributed routes\n"
1319 "IS-IS default metric\n"
1320 "Route map reference\n"
1321 "Pointer to route-map entries\n")
1324 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1326 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1327 nb_cli_enqueue_change(vty
, "./route-map",
1328 route_map
? NB_OP_MODIFY
: NB_OP_DESTROY
,
1329 route_map
? route_map
: NULL
);
1330 nb_cli_enqueue_change(vty
, "./metric", NB_OP_MODIFY
,
1331 metric_str
? metric_str
: NULL
);
1334 return nb_cli_apply_changes(
1335 vty
, "./redistribute/%s[protocol='%s'][level='%s']", ip
, proto
,
1339 static void vty_print_redistribute(struct vty
*vty
,
1340 const struct lyd_node
*dnode
,
1341 bool show_defaults
, const char *family
)
1343 const char *level
= yang_dnode_get_string(dnode
, "./level");
1344 const char *protocol
= yang_dnode_get_string(dnode
, "./protocol");
1346 vty_out(vty
, " redistribute %s %s %s", family
, protocol
, level
);
1347 if (show_defaults
|| !yang_dnode_is_default(dnode
, "./metric"))
1348 vty_out(vty
, " metric %s",
1349 yang_dnode_get_string(dnode
, "./metric"));
1350 if (yang_dnode_exists(dnode
, "./route-map"))
1351 vty_out(vty
, " route-map %s",
1352 yang_dnode_get_string(dnode
, "./route-map"));
1356 void cli_show_isis_redistribute_ipv4(struct vty
*vty
,
1357 const struct lyd_node
*dnode
,
1360 vty_print_redistribute(vty
, dnode
, show_defaults
, "ipv4");
1362 void cli_show_isis_redistribute_ipv6(struct vty
*vty
,
1363 const struct lyd_node
*dnode
,
1366 vty_print_redistribute(vty
, dnode
, show_defaults
, "ipv6");
1370 * XPath: /frr-isisd:isis/instance/multi-topology
1373 isis_topology
, isis_topology_cmd
,
1374 "[no] topology <standard|ipv4-unicast|ipv4-mgmt|ipv6-unicast|ipv4-multicast|ipv6-multicast|ipv6-mgmt|ipv6-dstsrc>$topology [overload]$overload",
1376 "Configure IS-IS topologies\n"
1377 "standard topology\n"
1378 "IPv4 unicast topology\n"
1379 "IPv4 management topology\n"
1380 "IPv6 unicast topology\n"
1381 "IPv4 multicast topology\n"
1382 "IPv6 multicast topology\n"
1383 "IPv6 management topology\n"
1384 "IPv6 dst-src topology\n"
1385 "Set overload bit for topology\n")
1387 char base_xpath
[XPATH_MAXLEN
];
1389 /* Since standard is not configurable it is not present in the
1390 * YANG model, so we need to validate it here
1392 if (strmatch(topology
, "standard") ||
1393 strmatch(topology
, "ipv4-unicast")) {
1395 "Cannot configure IPv4 unicast (Standard) topology\n");
1396 return CMD_WARNING_CONFIG_FAILED
;
1399 if (strmatch(topology
, "ipv4-mgmt"))
1400 snprintf(base_xpath
, XPATH_MAXLEN
,
1401 "./multi-topology/ipv4-management");
1402 else if (strmatch(topology
, "ipv6-mgmt"))
1403 snprintf(base_xpath
, XPATH_MAXLEN
,
1404 "./multi-topology/ipv6-management");
1406 snprintf(base_xpath
, XPATH_MAXLEN
, "./multi-topology/%s",
1410 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1412 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1413 nb_cli_enqueue_change(vty
, "./overload", NB_OP_MODIFY
,
1414 overload
? "true" : "false");
1417 return nb_cli_apply_changes(vty
, "%s", base_xpath
);
1420 void cli_show_isis_mt_ipv4_multicast(struct vty
*vty
,
1421 const struct lyd_node
*dnode
,
1424 vty_out(vty
, " topology ipv4-multicast");
1425 if (yang_dnode_get_bool(dnode
, "./overload"))
1426 vty_out(vty
, " overload");
1430 void cli_show_isis_mt_ipv4_mgmt(struct vty
*vty
, const struct lyd_node
*dnode
,
1433 vty_out(vty
, " topology ipv4-mgmt");
1434 if (yang_dnode_get_bool(dnode
, "./overload"))
1435 vty_out(vty
, " overload");
1439 void cli_show_isis_mt_ipv6_unicast(struct vty
*vty
,
1440 const struct lyd_node
*dnode
,
1443 vty_out(vty
, " topology ipv6-unicast");
1444 if (yang_dnode_get_bool(dnode
, "./overload"))
1445 vty_out(vty
, " overload");
1449 void cli_show_isis_mt_ipv6_multicast(struct vty
*vty
,
1450 const struct lyd_node
*dnode
,
1453 vty_out(vty
, " topology ipv6-multicast");
1454 if (yang_dnode_get_bool(dnode
, "./overload"))
1455 vty_out(vty
, " overload");
1459 void cli_show_isis_mt_ipv6_mgmt(struct vty
*vty
, const struct lyd_node
*dnode
,
1462 vty_out(vty
, " topology ipv6-mgmt");
1463 if (yang_dnode_get_bool(dnode
, "./overload"))
1464 vty_out(vty
, " overload");
1468 void cli_show_isis_mt_ipv6_dstsrc(struct vty
*vty
, const struct lyd_node
*dnode
,
1471 vty_out(vty
, " topology ipv6-dstsrc");
1472 if (yang_dnode_get_bool(dnode
, "./overload"))
1473 vty_out(vty
, " overload");
1478 * XPath: /frr-isisd:isis/instance/segment-routing/enabled
1480 DEFPY_YANG (isis_sr_enable
,
1482 "segment-routing on",
1484 "Enable Segment Routing\n")
1486 nb_cli_enqueue_change(vty
, "./segment-routing/enabled", NB_OP_MODIFY
,
1489 return nb_cli_apply_changes(vty
, NULL
);
1492 DEFPY_YANG (no_isis_sr_enable
,
1493 no_isis_sr_enable_cmd
,
1494 "no segment-routing [on]",
1497 "Disable Segment Routing\n")
1499 nb_cli_enqueue_change(vty
, "./segment-routing/enabled", NB_OP_MODIFY
,
1502 return nb_cli_apply_changes(vty
, NULL
);
1505 void cli_show_isis_sr_enabled(struct vty
*vty
, const struct lyd_node
*dnode
,
1508 if (!yang_dnode_get_bool(dnode
, NULL
))
1509 vty_out(vty
, " no");
1511 vty_out(vty
, " segment-routing on\n");
1515 * XPath: /frr-isisd:isis/instance/segment-routing/label-block
1519 isis_sr_global_block_label_range
, isis_sr_global_block_label_range_cmd
,
1520 "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]",
1522 "Segment Routing Global Block label range\n"
1523 "The lower bound of the global block\n"
1524 "The upper bound of the global block (block size may not exceed 65535)\n"
1525 "Segment Routing Local Block label range\n"
1526 "The lower bound of the local block\n"
1527 "The upper bound of the local block (block size may not exceed 65535)\n")
1529 nb_cli_enqueue_change(vty
,
1530 "./segment-routing/label-blocks/srgb/lower-bound",
1531 NB_OP_MODIFY
, gb_lower_bound_str
);
1532 nb_cli_enqueue_change(vty
,
1533 "./segment-routing/label-blocks/srgb/upper-bound",
1534 NB_OP_MODIFY
, gb_upper_bound_str
);
1536 nb_cli_enqueue_change(
1537 vty
, "./segment-routing/label-blocks/srlb/lower-bound",
1538 NB_OP_MODIFY
, lb_lower_bound
? lb_lower_bound_str
: NULL
);
1539 nb_cli_enqueue_change(
1540 vty
, "./segment-routing/label-blocks/srlb/upper-bound",
1541 NB_OP_MODIFY
, lb_upper_bound
? lb_upper_bound_str
: NULL
);
1543 return nb_cli_apply_changes(vty
, NULL
);
1546 DEFPY_YANG(no_isis_sr_global_block_label_range
,
1547 no_isis_sr_global_block_label_range_cmd
,
1548 "no segment-routing global-block [(16-1048575) (16-1048575) local-block (16-1048575) (16-1048575)]",
1550 "Segment Routing Global Block label range\n"
1551 "The lower bound of the global block\n"
1552 "The upper bound of the global block (block size may not exceed 65535)\n"
1553 "Segment Routing Local Block label range\n"
1554 "The lower bound of the local block\n"
1555 "The upper bound of the local block (block size may not exceed 65535)\n")
1557 nb_cli_enqueue_change(vty
,
1558 "./segment-routing/label-blocks/srgb/lower-bound",
1559 NB_OP_MODIFY
, NULL
);
1560 nb_cli_enqueue_change(vty
,
1561 "./segment-routing/label-blocks/srgb/upper-bound",
1562 NB_OP_MODIFY
, NULL
);
1563 nb_cli_enqueue_change(vty
,
1564 "./segment-routing/label-blocks/srlb/lower-bound",
1565 NB_OP_MODIFY
, NULL
);
1566 nb_cli_enqueue_change(vty
,
1567 "./segment-routing/label-blocks/srlb/upper-bound",
1568 NB_OP_MODIFY
, NULL
);
1570 return nb_cli_apply_changes(vty
, NULL
);
1573 void cli_show_isis_label_blocks(struct vty
*vty
, const struct lyd_node
*dnode
,
1576 vty_out(vty
, " segment-routing global-block %s %s",
1577 yang_dnode_get_string(dnode
, "./srgb/lower-bound"),
1578 yang_dnode_get_string(dnode
, "./srgb/upper-bound"));
1579 if (!yang_dnode_is_default(dnode
, "./srlb/lower-bound")
1580 || !yang_dnode_is_default(dnode
, "./srlb/upper-bound"))
1581 vty_out(vty
, " local-block %s %s",
1582 yang_dnode_get_string(dnode
, "./srlb/lower-bound"),
1583 yang_dnode_get_string(dnode
, "./srlb/upper-bound"));
1588 * XPath: /frr-isisd:isis/instance/segment-routing/msd/node-msd
1590 DEFPY_YANG (isis_sr_node_msd
,
1591 isis_sr_node_msd_cmd
,
1592 "segment-routing node-msd (1-16)$msd",
1594 "Maximum Stack Depth for this router\n"
1595 "Maximum number of label that can be stack (1-16)\n")
1597 nb_cli_enqueue_change(vty
, "./segment-routing/msd/node-msd",
1598 NB_OP_MODIFY
, msd_str
);
1600 return nb_cli_apply_changes(vty
, NULL
);
1603 DEFPY_YANG (no_isis_sr_node_msd
,
1604 no_isis_sr_node_msd_cmd
,
1605 "no segment-routing node-msd [(1-16)]",
1608 "Maximum Stack Depth for this router\n"
1609 "Maximum number of label that can be stack (1-16)\n")
1611 nb_cli_enqueue_change(vty
, "./segment-routing/msd/node-msd",
1612 NB_OP_DESTROY
, NULL
);
1614 return nb_cli_apply_changes(vty
, NULL
);
1617 void cli_show_isis_node_msd(struct vty
*vty
, const struct lyd_node
*dnode
,
1620 vty_out(vty
, " segment-routing node-msd %s\n",
1621 yang_dnode_get_string(dnode
, NULL
));
1625 * XPath: /frr-isisd:isis/instance/segment-routing/prefix-sid-map/prefix-sid
1627 DEFPY_YANG (isis_sr_prefix_sid
,
1628 isis_sr_prefix_sid_cmd
,
1629 "segment-routing prefix\
1630 <A.B.C.D/M|X:X::X:X/M>$prefix\
1631 <absolute$sid_type (16-1048575)$sid_value|index$sid_type (0-65535)$sid_value>\
1632 [<no-php-flag|explicit-null>$lh_behavior] [n-flag-clear$n_flag_clear]",
1637 "Specify the absolute value of Prefix Segment ID\n"
1638 "The Prefix Segment ID value\n"
1639 "Specify the index of Prefix Segment ID\n"
1640 "The Prefix Segment ID index\n"
1641 "Don't request Penultimate Hop Popping (PHP)\n"
1642 "Upstream neighbor must replace prefix-sid with explicit null label\n"
1645 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1646 nb_cli_enqueue_change(vty
, "./sid-value-type", NB_OP_MODIFY
, sid_type
);
1647 nb_cli_enqueue_change(vty
, "./sid-value", NB_OP_MODIFY
, sid_value_str
);
1651 if (strmatch(lh_behavior
, "no-php-flag"))
1653 else if (strmatch(lh_behavior
, "explicit-null"))
1654 value
= "explicit-null";
1658 nb_cli_enqueue_change(vty
, "./last-hop-behavior", NB_OP_MODIFY
,
1661 nb_cli_enqueue_change(vty
, "./last-hop-behavior", NB_OP_MODIFY
,
1663 nb_cli_enqueue_change(vty
, "./n-flag-clear", NB_OP_MODIFY
,
1664 n_flag_clear
? "true" : "false");
1666 return nb_cli_apply_changes(
1667 vty
, "./segment-routing/prefix-sid-map/prefix-sid[prefix='%s']",
1671 DEFPY_YANG (no_isis_sr_prefix_sid
,
1672 no_isis_sr_prefix_sid_cmd
,
1673 "no segment-routing prefix <A.B.C.D/M|X:X::X:X/M>$prefix\
1674 [<absolute$sid_type (16-1048575)|index (0-65535)> [<no-php-flag|explicit-null>]]\
1681 "Specify the absolute value of Prefix Segment ID\n"
1682 "The Prefix Segment ID value\n"
1683 "Specify the index of Prefix Segment ID\n"
1684 "The Prefix Segment ID index\n"
1685 "Don't request Penultimate Hop Popping (PHP)\n"
1686 "Upstream neighbor must replace prefix-sid with explicit null label\n"
1689 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1691 return nb_cli_apply_changes(
1692 vty
, "./segment-routing/prefix-sid-map/prefix-sid[prefix='%s']",
1696 void cli_show_isis_prefix_sid(struct vty
*vty
, const struct lyd_node
*dnode
,
1700 const char *lh_behavior
;
1701 const char *sid_value_type
;
1702 const char *sid_value
;
1705 prefix
= yang_dnode_get_string(dnode
, "./prefix");
1706 lh_behavior
= yang_dnode_get_string(dnode
, "./last-hop-behavior");
1707 sid_value_type
= yang_dnode_get_string(dnode
, "./sid-value-type");
1708 sid_value
= yang_dnode_get_string(dnode
, "./sid-value");
1709 n_flag_clear
= yang_dnode_get_bool(dnode
, "./n-flag-clear");
1711 vty_out(vty
, " segment-routing prefix %s", prefix
);
1712 if (strmatch(sid_value_type
, "absolute"))
1713 vty_out(vty
, " absolute");
1715 vty_out(vty
, " index");
1716 vty_out(vty
, " %s", sid_value
);
1717 if (strmatch(lh_behavior
, "no-php"))
1718 vty_out(vty
, " no-php-flag");
1719 else if (strmatch(lh_behavior
, "explicit-null"))
1720 vty_out(vty
, " explicit-null");
1722 vty_out(vty
, " n-flag-clear");
1728 * XPath: /frr-isisd:isis/instance/fast-reroute/level-{1,2}/lfa/priority-limit
1730 DEFPY_YANG (isis_frr_lfa_priority_limit
,
1731 isis_frr_lfa_priority_limit_cmd
,
1732 "[no] fast-reroute priority-limit <critical|high|medium>$priority [<level-1|level-2>$level]",
1734 "Configure Fast ReRoute\n"
1735 "Limit backup computation up to the prefix priority\n"
1736 "Compute for critical priority prefixes only\n"
1737 "Compute for critical & high priority prefixes\n"
1738 "Compute for critical, high & medium priority prefixes\n"
1739 "Set priority-limit for level-1 only\n"
1740 "Set priority-limit for level-2 only\n")
1742 if (!level
|| strmatch(level
, "level-1")) {
1744 nb_cli_enqueue_change(
1746 "./fast-reroute/level-1/lfa/priority-limit",
1747 NB_OP_DESTROY
, NULL
);
1749 nb_cli_enqueue_change(
1751 "./fast-reroute/level-1/lfa/priority-limit",
1752 NB_OP_CREATE
, priority
);
1755 if (!level
|| strmatch(level
, "level-2")) {
1757 nb_cli_enqueue_change(
1759 "./fast-reroute/level-2/lfa/priority-limit",
1760 NB_OP_DESTROY
, NULL
);
1762 nb_cli_enqueue_change(
1764 "./fast-reroute/level-2/lfa/priority-limit",
1765 NB_OP_CREATE
, priority
);
1769 return nb_cli_apply_changes(vty
, NULL
);
1772 void cli_show_isis_frr_lfa_priority_limit(struct vty
*vty
,
1773 const struct lyd_node
*dnode
,
1776 vty_out(vty
, " fast-reroute priority-limit %s %s\n",
1777 yang_dnode_get_string(dnode
, NULL
),
1778 dnode
->parent
->parent
->schema
->name
);
1782 * XPath: /frr-isisd:isis/instance/fast-reroute/level-{1,2}/lfa/tiebreaker
1784 DEFPY_YANG (isis_frr_lfa_tiebreaker
,
1785 isis_frr_lfa_tiebreaker_cmd
,
1786 "[no] fast-reroute lfa\
1787 tiebreaker <downstream|lowest-backup-metric|node-protecting>$type\
1788 index (1-255)$index\
1789 [<level-1|level-2>$level]",
1791 "Configure Fast ReRoute\n"
1792 "LFA configuration\n"
1793 "Configure tiebreaker for multiple backups\n"
1794 "Prefer backup path via downstream node\n"
1795 "Prefer backup path with lowest total metric\n"
1796 "Prefer node protecting backup path\n"
1797 "Set preference order among tiebreakers\n"
1799 "Configure tiebreaker for level-1 only\n"
1800 "Configure tiebreaker for level-2 only\n")
1802 char xpath
[XPATH_MAXLEN
];
1804 if (!level
|| strmatch(level
, "level-1")) {
1807 xpath
, XPATH_MAXLEN
,
1808 "./fast-reroute/level-1/lfa/tiebreaker[index='%s']",
1810 nb_cli_enqueue_change(vty
, xpath
, NB_OP_DESTROY
, NULL
);
1813 xpath
, XPATH_MAXLEN
,
1814 "./fast-reroute/level-1/lfa/tiebreaker[index='%s']/type",
1816 nb_cli_enqueue_change(vty
, xpath
, NB_OP_CREATE
, type
);
1819 if (!level
|| strmatch(level
, "level-2")) {
1822 xpath
, XPATH_MAXLEN
,
1823 "./fast-reroute/level-2/lfa/tiebreaker[index='%s']",
1825 nb_cli_enqueue_change(vty
, xpath
, NB_OP_DESTROY
, NULL
);
1828 xpath
, XPATH_MAXLEN
,
1829 "./fast-reroute/level-2/lfa/tiebreaker[index='%s']/type",
1831 nb_cli_enqueue_change(vty
, xpath
, NB_OP_CREATE
, type
);
1835 return nb_cli_apply_changes(vty
, NULL
);
1838 void cli_show_isis_frr_lfa_tiebreaker(struct vty
*vty
,
1839 const struct lyd_node
*dnode
,
1842 vty_out(vty
, " fast-reroute lfa tiebreaker %s index %s %s\n",
1843 yang_dnode_get_string(dnode
, "./type"),
1844 yang_dnode_get_string(dnode
, "./index"),
1845 dnode
->parent
->parent
->schema
->name
);
1849 * XPath: /frr-isisd:isis/instance/fast-reroute/level-{1,2}/lfa/load-sharing
1851 DEFPY_YANG (isis_frr_lfa_load_sharing
,
1852 isis_frr_lfa_load_sharing_cmd
,
1853 "[no] fast-reroute load-sharing disable [<level-1|level-2>$level]",
1855 "Configure Fast ReRoute\n"
1856 "Load share prefixes across multiple backups\n"
1857 "Disable load sharing\n"
1858 "Disable load sharing for level-1 only\n"
1859 "Disable load sharing for level-2 only\n")
1861 if (!level
|| strmatch(level
, "level-1")) {
1863 nb_cli_enqueue_change(
1864 vty
, "./fast-reroute/level-1/lfa/load-sharing",
1865 NB_OP_MODIFY
, "true");
1867 nb_cli_enqueue_change(
1868 vty
, "./fast-reroute/level-1/lfa/load-sharing",
1869 NB_OP_MODIFY
, "false");
1872 if (!level
|| strmatch(level
, "level-2")) {
1874 nb_cli_enqueue_change(
1875 vty
, "./fast-reroute/level-2/lfa/load-sharing",
1876 NB_OP_MODIFY
, "true");
1878 nb_cli_enqueue_change(
1879 vty
, "./fast-reroute/level-2/lfa/load-sharing",
1880 NB_OP_MODIFY
, "false");
1884 return nb_cli_apply_changes(vty
, NULL
);
1887 void cli_show_isis_frr_lfa_load_sharing(struct vty
*vty
,
1888 const struct lyd_node
*dnode
,
1891 if (yang_dnode_get_bool(dnode
, NULL
))
1892 vty_out(vty
, " no");
1894 vty_out(vty
, " fast-reroute load-sharing disable %s\n",
1895 dnode
->parent
->parent
->schema
->name
);
1899 * XPath: /frr-isisd:isis/instance/fast-reroute/level-{1,2}/remote-lfa/prefix-list
1901 DEFPY_YANG (isis_frr_remote_lfa_plist
,
1902 isis_frr_remote_lfa_plist_cmd
,
1903 "fast-reroute remote-lfa prefix-list WORD$plist [<level-1|level-2>$level]",
1904 "Configure Fast ReRoute\n"
1905 "Enable remote LFA related configuration\n"
1906 "Filter PQ node router ID based on prefix list\n"
1907 "Prefix-list name\n"
1908 "Enable router ID filtering for level-1 only\n"
1909 "Enable router ID filtering for level-2 only\n")
1911 if (!level
|| strmatch(level
, "level-1"))
1912 nb_cli_enqueue_change(
1913 vty
, "./fast-reroute/level-1/remote-lfa/prefix-list",
1914 NB_OP_MODIFY
, plist
);
1915 if (!level
|| strmatch(level
, "level-2"))
1916 nb_cli_enqueue_change(
1917 vty
, "./fast-reroute/level-2/remote-lfa/prefix-list",
1918 NB_OP_MODIFY
, plist
);
1920 return nb_cli_apply_changes(vty
, NULL
);
1923 DEFPY_YANG (no_isis_frr_remote_lfa_plist
,
1924 no_isis_frr_remote_lfa_plist_cmd
,
1925 "no fast-reroute remote-lfa prefix-list [WORD] [<level-1|level-2>$level]",
1927 "Configure Fast ReRoute\n"
1928 "Enable remote LFA related configuration\n"
1929 "Filter PQ node router ID based on prefix list\n"
1930 "Prefix-list name\n"
1931 "Enable router ID filtering for level-1 only\n"
1932 "Enable router ID filtering for level-2 only\n")
1934 if (!level
|| strmatch(level
, "level-1"))
1935 nb_cli_enqueue_change(
1936 vty
, "./fast-reroute/level-1/remote-lfa/prefix-list",
1937 NB_OP_DESTROY
, NULL
);
1938 if (!level
|| strmatch(level
, "level-2"))
1939 nb_cli_enqueue_change(
1940 vty
, "./fast-reroute/level-2/remote-lfa/prefix-list",
1941 NB_OP_DESTROY
, NULL
);
1943 return nb_cli_apply_changes(vty
, NULL
);
1946 void cli_show_isis_frr_remote_lfa_plist(struct vty
*vty
,
1947 const struct lyd_node
*dnode
,
1950 vty_out(vty
, " fast-reroute remote-lfa prefix-list %s %s\n",
1951 yang_dnode_get_string(dnode
, NULL
),
1952 dnode
->parent
->parent
->schema
->name
);
1956 * XPath: /frr-interface:lib/interface/frr-isisd:isis/passive
1958 DEFPY_YANG(isis_passive
, isis_passive_cmd
, "[no] isis passive",
1960 "IS-IS routing protocol\n"
1961 "Configure the passive mode for interface\n")
1963 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/passive", NB_OP_MODIFY
,
1964 no
? "false" : "true");
1966 return nb_cli_apply_changes(vty
, NULL
);
1969 void cli_show_ip_isis_passive(struct vty
*vty
, const struct lyd_node
*dnode
,
1972 if (!yang_dnode_get_bool(dnode
, NULL
))
1973 vty_out(vty
, " no");
1974 vty_out(vty
, " isis passive\n");
1978 * XPath: /frr-interface:lib/interface/frr-isisd:isis/password
1981 DEFPY_YANG(isis_passwd
, isis_passwd_cmd
, "isis password <md5|clear>$type WORD$pwd",
1982 "IS-IS routing protocol\n"
1983 "Configure the authentication password for a circuit\n"
1984 "HMAC-MD5 authentication\n"
1985 "Cleartext password\n"
1986 "Circuit password\n")
1988 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password", NB_OP_CREATE
,
1990 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password/password",
1992 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password/password-type",
1993 NB_OP_MODIFY
, type
);
1995 return nb_cli_apply_changes(vty
, NULL
);
1998 DEFPY_YANG(no_isis_passwd
, no_isis_passwd_cmd
, "no isis password [<md5|clear> WORD]",
2000 "IS-IS routing protocol\n"
2001 "Configure the authentication password for a circuit\n"
2002 "HMAC-MD5 authentication\n"
2003 "Cleartext password\n"
2004 "Circuit password\n")
2006 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password", NB_OP_DESTROY
,
2009 return nb_cli_apply_changes(vty
, NULL
);
2012 void cli_show_ip_isis_password(struct vty
*vty
, const struct lyd_node
*dnode
,
2015 vty_out(vty
, " isis password %s %s\n",
2016 yang_dnode_get_string(dnode
, "./password-type"),
2017 yang_dnode_get_string(dnode
, "./password"));
2021 * XPath: /frr-interface:lib/interface/frr-isisd:isis/metric
2023 DEFPY_YANG(isis_metric
, isis_metric_cmd
,
2024 "isis metric [level-1|level-2]$level (0-16777215)$met",
2025 "IS-IS routing protocol\n"
2026 "Set default metric for circuit\n"
2027 "Specify metric for level-1 routing\n"
2028 "Specify metric for level-2 routing\n"
2029 "Default metric value\n")
2031 if (!level
|| strmatch(level
, "level-1"))
2032 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-1",
2033 NB_OP_MODIFY
, met_str
);
2034 if (!level
|| strmatch(level
, "level-2"))
2035 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-2",
2036 NB_OP_MODIFY
, met_str
);
2038 return nb_cli_apply_changes(vty
, NULL
);
2041 DEFPY_YANG(no_isis_metric
, no_isis_metric_cmd
,
2042 "no isis metric [level-1|level-2]$level [(0-16777215)]",
2044 "IS-IS routing protocol\n"
2045 "Set default metric for circuit\n"
2046 "Specify metric for level-1 routing\n"
2047 "Specify metric for level-2 routing\n"
2048 "Default metric value\n")
2050 if (!level
|| strmatch(level
, "level-1"))
2051 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-1",
2052 NB_OP_MODIFY
, NULL
);
2053 if (!level
|| strmatch(level
, "level-2"))
2054 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-2",
2055 NB_OP_MODIFY
, NULL
);
2057 return nb_cli_apply_changes(vty
, NULL
);
2060 void cli_show_ip_isis_metric(struct vty
*vty
, const struct lyd_node
*dnode
,
2063 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
2064 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
2066 if (strmatch(l1
, l2
))
2067 vty_out(vty
, " isis metric %s\n", l1
);
2069 vty_out(vty
, " isis metric level-1 %s\n", l1
);
2070 vty_out(vty
, " isis metric level-2 %s\n", l2
);
2075 * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/interval
2077 DEFPY_YANG(isis_hello_interval
, isis_hello_interval_cmd
,
2078 "isis hello-interval [level-1|level-2]$level (1-600)$intv",
2079 "IS-IS routing protocol\n"
2080 "Set Hello interval\n"
2081 "Specify hello-interval for level-1 IIHs\n"
2082 "Specify hello-interval for level-2 IIHs\n"
2083 "Holdtime 1 seconds, interval depends on multiplier\n")
2085 if (!level
|| strmatch(level
, "level-1"))
2086 nb_cli_enqueue_change(vty
,
2087 "./frr-isisd:isis/hello/interval/level-1",
2088 NB_OP_MODIFY
, intv_str
);
2089 if (!level
|| strmatch(level
, "level-2"))
2090 nb_cli_enqueue_change(vty
,
2091 "./frr-isisd:isis/hello/interval/level-2",
2092 NB_OP_MODIFY
, intv_str
);
2094 return nb_cli_apply_changes(vty
, NULL
);
2097 DEFPY_YANG(no_isis_hello_interval
, no_isis_hello_interval_cmd
,
2098 "no isis hello-interval [level-1|level-2]$level [(1-600)]",
2100 "IS-IS routing protocol\n"
2101 "Set Hello interval\n"
2102 "Specify hello-interval for level-1 IIHs\n"
2103 "Specify hello-interval for level-2 IIHs\n"
2104 "Holdtime 1 second, interval depends on multiplier\n")
2106 if (!level
|| strmatch(level
, "level-1"))
2107 nb_cli_enqueue_change(vty
,
2108 "./frr-isisd:isis/hello/interval/level-1",
2109 NB_OP_MODIFY
, NULL
);
2110 if (!level
|| strmatch(level
, "level-2"))
2111 nb_cli_enqueue_change(vty
,
2112 "./frr-isisd:isis/hello/interval/level-2",
2113 NB_OP_MODIFY
, NULL
);
2115 return nb_cli_apply_changes(vty
, NULL
);
2118 void cli_show_ip_isis_hello_interval(struct vty
*vty
,
2119 const struct lyd_node
*dnode
,
2122 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
2123 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
2125 if (strmatch(l1
, l2
))
2126 vty_out(vty
, " isis hello-interval %s\n", l1
);
2128 vty_out(vty
, " isis hello-interval level-1 %s\n", l1
);
2129 vty_out(vty
, " isis hello-interval level-2 %s\n", l2
);
2134 * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/multiplier
2136 DEFPY_YANG(isis_hello_multiplier
, isis_hello_multiplier_cmd
,
2137 "isis hello-multiplier [level-1|level-2]$level (2-100)$mult",
2138 "IS-IS routing protocol\n"
2139 "Set multiplier for Hello holding time\n"
2140 "Specify hello multiplier for level-1 IIHs\n"
2141 "Specify hello multiplier for level-2 IIHs\n"
2142 "Hello multiplier value\n")
2144 if (!level
|| strmatch(level
, "level-1"))
2145 nb_cli_enqueue_change(
2146 vty
, "./frr-isisd:isis/hello/multiplier/level-1",
2147 NB_OP_MODIFY
, mult_str
);
2148 if (!level
|| strmatch(level
, "level-2"))
2149 nb_cli_enqueue_change(
2150 vty
, "./frr-isisd:isis/hello/multiplier/level-2",
2151 NB_OP_MODIFY
, mult_str
);
2153 return nb_cli_apply_changes(vty
, NULL
);
2156 DEFPY_YANG(no_isis_hello_multiplier
, no_isis_hello_multiplier_cmd
,
2157 "no isis hello-multiplier [level-1|level-2]$level [(2-100)]",
2159 "IS-IS routing protocol\n"
2160 "Set multiplier for Hello holding time\n"
2161 "Specify hello multiplier for level-1 IIHs\n"
2162 "Specify hello multiplier for level-2 IIHs\n"
2163 "Hello multiplier value\n")
2165 if (!level
|| strmatch(level
, "level-1"))
2166 nb_cli_enqueue_change(
2167 vty
, "./frr-isisd:isis/hello/multiplier/level-1",
2168 NB_OP_MODIFY
, NULL
);
2169 if (!level
|| strmatch(level
, "level-2"))
2170 nb_cli_enqueue_change(
2171 vty
, "./frr-isisd:isis/hello/multiplier/level-2",
2172 NB_OP_MODIFY
, NULL
);
2174 return nb_cli_apply_changes(vty
, NULL
);
2177 void cli_show_ip_isis_hello_multi(struct vty
*vty
, const struct lyd_node
*dnode
,
2180 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
2181 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
2183 if (strmatch(l1
, l2
))
2184 vty_out(vty
, " isis hello-multiplier %s\n", l1
);
2186 vty_out(vty
, " isis hello-multiplier level-1 %s\n", l1
);
2187 vty_out(vty
, " isis hello-multiplier level-2 %s\n", l2
);
2193 * /frr-interface:lib/interface/frr-isisd:isis/disable-three-way-handshake
2195 DEFPY_YANG(isis_threeway_adj
, isis_threeway_adj_cmd
, "[no] isis three-way-handshake",
2198 "Enable/Disable three-way handshake\n")
2200 nb_cli_enqueue_change(vty
,
2201 "./frr-isisd:isis/disable-three-way-handshake",
2202 NB_OP_MODIFY
, no
? "true" : "false");
2204 return nb_cli_apply_changes(vty
, NULL
);
2207 void cli_show_ip_isis_threeway_shake(struct vty
*vty
,
2208 const struct lyd_node
*dnode
,
2211 if (yang_dnode_get_bool(dnode
, NULL
))
2212 vty_out(vty
, " no");
2213 vty_out(vty
, " isis three-way-handshake\n");
2217 * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/padding
2219 DEFPY_YANG(isis_hello_padding
, isis_hello_padding_cmd
, "[no] isis hello padding",
2221 "IS-IS routing protocol\n"
2222 "Add padding to IS-IS hello packets\n"
2223 "Pad hello packets\n")
2225 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/hello/padding",
2226 NB_OP_MODIFY
, no
? "false" : "true");
2228 return nb_cli_apply_changes(vty
, NULL
);
2231 void cli_show_ip_isis_hello_padding(struct vty
*vty
,
2232 const struct lyd_node
*dnode
,
2235 if (!yang_dnode_get_bool(dnode
, NULL
))
2236 vty_out(vty
, " no");
2238 vty_out(vty
, " isis hello padding\n");
2242 * XPath: /frr-interface:lib/interface/frr-isisd:isis/csnp-interval
2244 DEFPY_YANG(csnp_interval
, csnp_interval_cmd
,
2245 "isis csnp-interval (1-600)$intv [level-1|level-2]$level",
2246 "IS-IS routing protocol\n"
2247 "Set CSNP interval in seconds\n"
2248 "CSNP interval value\n"
2249 "Specify interval for level-1 CSNPs\n"
2250 "Specify interval for level-2 CSNPs\n")
2252 if (!level
|| strmatch(level
, "level-1"))
2253 nb_cli_enqueue_change(vty
,
2254 "./frr-isisd:isis/csnp-interval/level-1",
2255 NB_OP_MODIFY
, intv_str
);
2256 if (!level
|| strmatch(level
, "level-2"))
2257 nb_cli_enqueue_change(vty
,
2258 "./frr-isisd:isis/csnp-interval/level-2",
2259 NB_OP_MODIFY
, intv_str
);
2261 return nb_cli_apply_changes(vty
, NULL
);
2264 DEFPY_YANG(no_csnp_interval
, no_csnp_interval_cmd
,
2265 "no isis csnp-interval [(1-600)] [level-1|level-2]$level",
2267 "IS-IS routing protocol\n"
2268 "Set CSNP interval in seconds\n"
2269 "CSNP interval value\n"
2270 "Specify interval for level-1 CSNPs\n"
2271 "Specify interval for level-2 CSNPs\n")
2273 if (!level
|| strmatch(level
, "level-1"))
2274 nb_cli_enqueue_change(vty
,
2275 "./frr-isisd:isis/csnp-interval/level-1",
2276 NB_OP_MODIFY
, NULL
);
2277 if (!level
|| strmatch(level
, "level-2"))
2278 nb_cli_enqueue_change(vty
,
2279 "./frr-isisd:isis/csnp-interval/level-2",
2280 NB_OP_MODIFY
, NULL
);
2282 return nb_cli_apply_changes(vty
, NULL
);
2285 void cli_show_ip_isis_csnp_interval(struct vty
*vty
,
2286 const struct lyd_node
*dnode
,
2289 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
2290 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
2292 if (strmatch(l1
, l2
))
2293 vty_out(vty
, " isis csnp-interval %s\n", l1
);
2295 vty_out(vty
, " isis csnp-interval %s level-1\n", l1
);
2296 vty_out(vty
, " isis csnp-interval %s level-2\n", l2
);
2301 * XPath: /frr-interface:lib/interface/frr-isisd:isis/psnp-interval
2303 DEFPY_YANG(psnp_interval
, psnp_interval_cmd
,
2304 "isis psnp-interval (1-120)$intv [level-1|level-2]$level",
2305 "IS-IS routing protocol\n"
2306 "Set PSNP interval in seconds\n"
2307 "PSNP interval value\n"
2308 "Specify interval for level-1 PSNPs\n"
2309 "Specify interval for level-2 PSNPs\n")
2311 if (!level
|| strmatch(level
, "level-1"))
2312 nb_cli_enqueue_change(vty
,
2313 "./frr-isisd:isis/psnp-interval/level-1",
2314 NB_OP_MODIFY
, intv_str
);
2315 if (!level
|| strmatch(level
, "level-2"))
2316 nb_cli_enqueue_change(vty
,
2317 "./frr-isisd:isis/psnp-interval/level-2",
2318 NB_OP_MODIFY
, intv_str
);
2320 return nb_cli_apply_changes(vty
, NULL
);
2323 DEFPY_YANG(no_psnp_interval
, no_psnp_interval_cmd
,
2324 "no isis psnp-interval [(1-120)] [level-1|level-2]$level",
2326 "IS-IS routing protocol\n"
2327 "Set PSNP interval in seconds\n"
2328 "PSNP interval value\n"
2329 "Specify interval for level-1 PSNPs\n"
2330 "Specify interval for level-2 PSNPs\n")
2332 if (!level
|| strmatch(level
, "level-1"))
2333 nb_cli_enqueue_change(vty
,
2334 "./frr-isisd:isis/psnp-interval/level-1",
2335 NB_OP_MODIFY
, NULL
);
2336 if (!level
|| strmatch(level
, "level-2"))
2337 nb_cli_enqueue_change(vty
,
2338 "./frr-isisd:isis/psnp-interval/level-2",
2339 NB_OP_MODIFY
, NULL
);
2341 return nb_cli_apply_changes(vty
, NULL
);
2344 void cli_show_ip_isis_psnp_interval(struct vty
*vty
,
2345 const struct lyd_node
*dnode
,
2348 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
2349 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
2351 if (strmatch(l1
, l2
))
2352 vty_out(vty
, " isis psnp-interval %s\n", l1
);
2354 vty_out(vty
, " isis psnp-interval %s level-1\n", l1
);
2355 vty_out(vty
, " isis psnp-interval %s level-2\n", l2
);
2360 * XPath: /frr-interface:lib/interface/frr-isisd:isis/multi-topology
2362 DEFPY_YANG(circuit_topology
, circuit_topology_cmd
,
2363 "[no] isis topology<standard|ipv4-unicast|ipv4-mgmt|ipv6-unicast|ipv4-multicast|ipv6-multicast|ipv6-mgmt|ipv6-dstsrc>$topology",
2365 "IS-IS routing protocol\n"
2366 "Configure interface IS-IS topologies\n"
2367 "Standard topology\n"
2368 "IPv4 unicast topology\n"
2369 "IPv4 management topology\n"
2370 "IPv6 unicast topology\n"
2371 "IPv4 multicast topology\n"
2372 "IPv6 multicast topology\n"
2373 "IPv6 management topology\n"
2374 "IPv6 dst-src topology\n")
2376 nb_cli_enqueue_change(vty
, ".", NB_OP_MODIFY
, no
? "false" : "true");
2378 if (strmatch(topology
, "ipv4-mgmt"))
2379 return nb_cli_apply_changes(
2380 vty
, "./frr-isisd:isis/multi-topology/ipv4-management");
2381 else if (strmatch(topology
, "ipv6-mgmt"))
2382 return nb_cli_apply_changes(
2383 vty
, "./frr-isisd:isis/multi-topology/ipv6-management");
2384 if (strmatch(topology
, "ipv4-unicast"))
2385 return nb_cli_apply_changes(
2386 vty
, "./frr-isisd:isis/multi-topology/standard");
2388 return nb_cli_apply_changes(
2389 vty
, "./frr-isisd:isis/multi-topology/%s", topology
);
2392 void cli_show_ip_isis_mt_standard(struct vty
*vty
, const struct lyd_node
*dnode
,
2395 if (!yang_dnode_get_bool(dnode
, NULL
))
2396 vty_out(vty
, " no");
2397 vty_out(vty
, " isis topology standard\n");
2400 void cli_show_ip_isis_mt_ipv4_multicast(struct vty
*vty
,
2401 const struct lyd_node
*dnode
,
2404 if (!yang_dnode_get_bool(dnode
, NULL
))
2405 vty_out(vty
, " no");
2406 vty_out(vty
, " isis topology ipv4-multicast\n");
2409 void cli_show_ip_isis_mt_ipv4_mgmt(struct vty
*vty
,
2410 const struct lyd_node
*dnode
,
2413 if (!yang_dnode_get_bool(dnode
, NULL
))
2414 vty_out(vty
, " no");
2415 vty_out(vty
, " isis topology ipv4-mgmt\n");
2418 void cli_show_ip_isis_mt_ipv6_unicast(struct vty
*vty
,
2419 const struct lyd_node
*dnode
,
2422 if (!yang_dnode_get_bool(dnode
, NULL
))
2423 vty_out(vty
, " no");
2424 vty_out(vty
, " isis topology ipv6-unicast\n");
2427 void cli_show_ip_isis_mt_ipv6_multicast(struct vty
*vty
,
2428 const struct lyd_node
*dnode
,
2431 if (!yang_dnode_get_bool(dnode
, NULL
))
2432 vty_out(vty
, " no");
2433 vty_out(vty
, " isis topology ipv6-multicast\n");
2436 void cli_show_ip_isis_mt_ipv6_mgmt(struct vty
*vty
,
2437 const struct lyd_node
*dnode
,
2440 if (!yang_dnode_get_bool(dnode
, NULL
))
2441 vty_out(vty
, " no");
2442 vty_out(vty
, " isis topology ipv6-mgmt\n");
2445 void cli_show_ip_isis_mt_ipv6_dstsrc(struct vty
*vty
,
2446 const struct lyd_node
*dnode
,
2449 if (!yang_dnode_get_bool(dnode
, NULL
))
2450 vty_out(vty
, " no");
2451 vty_out(vty
, " isis topology ipv6-dstsrc\n");
2455 * XPath: /frr-interface:lib/interface/frr-isisd:isis/circuit-type
2457 DEFPY_YANG(isis_circuit_type
, isis_circuit_type_cmd
,
2458 "isis circuit-type <level-1|level-1-2|level-2-only>$type",
2459 "IS-IS routing protocol\n"
2460 "Configure circuit type for interface\n"
2461 "Level-1 only adjacencies are formed\n"
2462 "Level-1-2 adjacencies are formed\n"
2463 "Level-2 only adjacencies are formed\n")
2465 nb_cli_enqueue_change(
2466 vty
, "./frr-isisd:isis/circuit-type", NB_OP_MODIFY
,
2467 strmatch(type
, "level-2-only") ? "level-2" : type
);
2469 return nb_cli_apply_changes(vty
, NULL
);
2472 DEFPY_YANG(no_isis_circuit_type
, no_isis_circuit_type_cmd
,
2473 "no isis circuit-type [level-1|level-1-2|level-2-only]",
2475 "IS-IS routing protocol\n"
2476 "Configure circuit type for interface\n"
2477 "Level-1 only adjacencies are formed\n"
2478 "Level-1-2 adjacencies are formed\n"
2479 "Level-2 only adjacencies are formed\n")
2481 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/circuit-type",
2482 NB_OP_MODIFY
, NULL
);
2484 return nb_cli_apply_changes(vty
, NULL
);
2487 void cli_show_ip_isis_circ_type(struct vty
*vty
, const struct lyd_node
*dnode
,
2490 int level
= yang_dnode_get_enum(dnode
, NULL
);
2494 vty_out(vty
, " isis circuit-type level-1\n");
2497 vty_out(vty
, " isis circuit-type level-2-only\n");
2499 case IS_LEVEL_1_AND_2
:
2500 vty_out(vty
, " isis circuit-type level-1-2\n");
2506 * XPath: /frr-interface:lib/interface/frr-isisd:isis/network-type
2508 DEFPY_YANG(isis_network
, isis_network_cmd
, "[no] isis network point-to-point",
2510 "IS-IS routing protocol\n"
2511 "Set network type\n"
2512 "point-to-point network type\n")
2514 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/network-type",
2516 no
? "broadcast" : "point-to-point");
2518 return nb_cli_apply_changes(vty
, NULL
);
2521 void cli_show_ip_isis_network_type(struct vty
*vty
,
2522 const struct lyd_node
*dnode
,
2525 if (yang_dnode_get_enum(dnode
, NULL
) != CIRCUIT_T_P2P
)
2526 vty_out(vty
, " no");
2528 vty_out(vty
, " isis network point-to-point\n");
2532 * XPath: /frr-interface:lib/interface/frr-isisd:isis/priority
2534 DEFPY_YANG(isis_priority
, isis_priority_cmd
,
2535 "isis priority (0-127)$prio [level-1|level-2]$level",
2536 "IS-IS routing protocol\n"
2537 "Set priority for Designated Router election\n"
2539 "Specify priority for level-1 routing\n"
2540 "Specify priority for level-2 routing\n")
2542 if (!level
|| strmatch(level
, "level-1"))
2543 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-1",
2544 NB_OP_MODIFY
, prio_str
);
2545 if (!level
|| strmatch(level
, "level-2"))
2546 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-2",
2547 NB_OP_MODIFY
, prio_str
);
2549 return nb_cli_apply_changes(vty
, NULL
);
2552 DEFPY_YANG(no_isis_priority
, no_isis_priority_cmd
,
2553 "no isis priority [(0-127)] [level-1|level-2]$level",
2555 "IS-IS routing protocol\n"
2556 "Set priority for Designated Router election\n"
2558 "Specify priority for level-1 routing\n"
2559 "Specify priority for level-2 routing\n")
2561 if (!level
|| strmatch(level
, "level-1"))
2562 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-1",
2563 NB_OP_MODIFY
, NULL
);
2564 if (!level
|| strmatch(level
, "level-2"))
2565 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-2",
2566 NB_OP_MODIFY
, NULL
);
2568 return nb_cli_apply_changes(vty
, NULL
);
2571 void cli_show_ip_isis_priority(struct vty
*vty
, const struct lyd_node
*dnode
,
2574 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
2575 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
2577 if (strmatch(l1
, l2
))
2578 vty_out(vty
, " isis priority %s\n", l1
);
2580 vty_out(vty
, " isis priority %s level-1\n", l1
);
2581 vty_out(vty
, " isis priority %s level-2\n", l2
);
2586 * XPath: /frr-interface:lib/interface/frr-isisd:isis/fast-reroute
2588 void cli_show_ip_isis_frr(struct vty
*vty
, const struct lyd_node
*dnode
,
2591 bool l1_enabled
, l2_enabled
;
2592 bool l1_node_protection
, l2_node_protection
;
2593 bool l1_link_fallback
, l2_link_fallback
;
2596 l1_enabled
= yang_dnode_get_bool(dnode
, "./level-1/lfa/enable");
2597 l2_enabled
= yang_dnode_get_bool(dnode
, "./level-2/lfa/enable");
2599 if (l1_enabled
|| l2_enabled
) {
2600 if (l1_enabled
== l2_enabled
) {
2601 vty_out(vty
, " isis fast-reroute lfa\n");
2606 " isis fast-reroute lfa level-1\n");
2609 " isis fast-reroute lfa level-2\n");
2614 l1_enabled
= yang_dnode_get_bool(dnode
, "./level-1/remote-lfa/enable");
2615 l2_enabled
= yang_dnode_get_bool(dnode
, "./level-2/remote-lfa/enable");
2617 if (l1_enabled
|| l2_enabled
) {
2618 if (l1_enabled
== l2_enabled
) {
2620 " isis fast-reroute remote-lfa tunnel mpls-ldp\n");
2625 " isis fast-reroute remote-lfa tunnel mpls-ldp level-1\n");
2628 " isis fast-reroute remote-lfa tunnel mpls-ldp level-2\n");
2633 l1_enabled
= yang_dnode_get_bool(dnode
, "./level-1/ti-lfa/enable");
2634 l2_enabled
= yang_dnode_get_bool(dnode
, "./level-2/ti-lfa/enable");
2635 l1_node_protection
=
2636 yang_dnode_get_bool(dnode
, "./level-1/ti-lfa/node-protection");
2637 l2_node_protection
=
2638 yang_dnode_get_bool(dnode
, "./level-2/ti-lfa/node-protection");
2640 yang_dnode_get_bool(dnode
, "./level-1/ti-lfa/link-fallback");
2642 yang_dnode_get_bool(dnode
, "./level-2/ti-lfa/link-fallback");
2645 if (l1_enabled
|| l2_enabled
) {
2646 if (l1_enabled
== l2_enabled
2647 && l1_node_protection
== l2_node_protection
2648 && l1_link_fallback
== l2_link_fallback
) {
2649 vty_out(vty
, " isis fast-reroute ti-lfa");
2650 if (l1_node_protection
)
2651 vty_out(vty
, " node-protection");
2652 if (l1_link_fallback
)
2653 vty_out(vty
, " link-fallback");
2658 " isis fast-reroute ti-lfa level-1");
2659 if (l1_node_protection
)
2660 vty_out(vty
, " node-protection");
2661 if (l1_link_fallback
)
2662 vty_out(vty
, " link-fallback");
2667 " isis fast-reroute ti-lfa level-2");
2668 if (l2_node_protection
)
2669 vty_out(vty
, " node-protection");
2670 if (l2_link_fallback
)
2671 vty_out(vty
, " link-fallback");
2679 * XPath: /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/lfa/enable
2681 DEFPY(isis_lfa
, isis_lfa_cmd
,
2682 "[no] isis fast-reroute lfa [level-1|level-2]$level",
2684 "IS-IS routing protocol\n"
2685 "Interface IP Fast-reroute configuration\n"
2686 "Enable LFA computation\n"
2687 "Enable LFA computation for Level 1 only\n"
2688 "Enable LFA computation for Level 2 only\n")
2690 if (!level
|| strmatch(level
, "level-1")) {
2692 nb_cli_enqueue_change(
2694 "./frr-isisd:isis/fast-reroute/level-1/lfa/enable",
2695 NB_OP_MODIFY
, "false");
2697 nb_cli_enqueue_change(
2699 "./frr-isisd:isis/fast-reroute/level-1/lfa/enable",
2700 NB_OP_MODIFY
, "true");
2703 if (!level
|| strmatch(level
, "level-2")) {
2705 nb_cli_enqueue_change(
2707 "./frr-isisd:isis/fast-reroute/level-2/lfa/enable",
2708 NB_OP_MODIFY
, "false");
2710 nb_cli_enqueue_change(
2712 "./frr-isisd:isis/fast-reroute/level-2/lfa/enable",
2713 NB_OP_MODIFY
, "true");
2717 return nb_cli_apply_changes(vty
, NULL
);
2722 * /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/lfa/exclude-interface
2724 DEFPY(isis_lfa_exclude_interface
, isis_lfa_exclude_interface_cmd
,
2725 "[no] isis fast-reroute lfa [level-1|level-2]$level exclude interface IFNAME$ifname",
2727 "IS-IS routing protocol\n"
2728 "Interface IP Fast-reroute configuration\n"
2729 "Enable LFA computation\n"
2730 "Enable LFA computation for Level 1 only\n"
2731 "Enable LFA computation for Level 2 only\n"
2732 "FRR exclusion information\n"
2733 "Exclude an interface from computation\n"
2736 if (!level
|| strmatch(level
, "level-1")) {
2738 nb_cli_enqueue_change(
2740 "./frr-isisd:isis/fast-reroute/level-1/lfa/exclude-interface",
2741 NB_OP_DESTROY
, ifname
);
2743 nb_cli_enqueue_change(
2745 "./frr-isisd:isis/fast-reroute/level-1/lfa/exclude-interface",
2746 NB_OP_CREATE
, ifname
);
2749 if (!level
|| strmatch(level
, "level-2")) {
2751 nb_cli_enqueue_change(
2753 "./frr-isisd:isis/fast-reroute/level-2/lfa/exclude-interface",
2754 NB_OP_DESTROY
, ifname
);
2756 nb_cli_enqueue_change(
2758 "./frr-isisd:isis/fast-reroute/level-2/lfa/exclude-interface",
2759 NB_OP_CREATE
, ifname
);
2763 return nb_cli_apply_changes(vty
, NULL
);
2766 void cli_show_frr_lfa_exclude_interface(struct vty
*vty
,
2767 const struct lyd_node
*dnode
,
2770 vty_out(vty
, " isis fast-reroute lfa %s exclude interface %s\n",
2771 dnode
->parent
->parent
->schema
->name
,
2772 yang_dnode_get_string(dnode
, NULL
));
2777 * /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/remote-lfa/enable
2779 DEFPY(isis_remote_lfa
, isis_remote_lfa_cmd
,
2780 "[no] isis fast-reroute remote-lfa tunnel mpls-ldp [level-1|level-2]$level",
2782 "IS-IS routing protocol\n"
2783 "Interface IP Fast-reroute configuration\n"
2784 "Enable remote LFA computation\n"
2785 "Enable remote LFA computation using tunnels\n"
2786 "Use MPLS LDP tunnel to reach the remote LFA node\n"
2787 "Enable LFA computation for Level 1 only\n"
2788 "Enable LFA computation for Level 2 only\n")
2790 if (!level
|| strmatch(level
, "level-1")) {
2792 nb_cli_enqueue_change(
2794 "./frr-isisd:isis/fast-reroute/level-1/remote-lfa/enable",
2795 NB_OP_MODIFY
, "false");
2797 nb_cli_enqueue_change(
2799 "./frr-isisd:isis/fast-reroute/level-1/remote-lfa/enable",
2800 NB_OP_MODIFY
, "true");
2803 if (!level
|| strmatch(level
, "level-2")) {
2805 nb_cli_enqueue_change(
2807 "./frr-isisd:isis/fast-reroute/level-2/remote-lfa/enable",
2808 NB_OP_MODIFY
, "false");
2810 nb_cli_enqueue_change(
2812 "./frr-isisd:isis/fast-reroute/level-2/remote-lfa/enable",
2813 NB_OP_MODIFY
, "true");
2817 return nb_cli_apply_changes(vty
, NULL
);
2822 * /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/remote-lfa/maximum-metric
2824 DEFPY(isis_remote_lfa_max_metric
, isis_remote_lfa_max_metric_cmd
,
2825 "[no] isis fast-reroute remote-lfa maximum-metric (1-16777215)$metric [level-1|level-2]$level",
2827 "IS-IS routing protocol\n"
2828 "Interface IP Fast-reroute configuration\n"
2829 "Enable remote LFA computation\n"
2830 "Limit remote LFA node selection within the metric\n"
2831 "Value of the metric\n"
2832 "Enable LFA computation for Level 1 only\n"
2833 "Enable LFA computation for Level 2 only\n")
2835 if (!level
|| strmatch(level
, "level-1")) {
2837 nb_cli_enqueue_change(
2839 "./frr-isisd:isis/fast-reroute/level-1/remote-lfa/maximum-metric",
2840 NB_OP_DESTROY
, NULL
);
2842 nb_cli_enqueue_change(
2844 "./frr-isisd:isis/fast-reroute/level-1/remote-lfa/maximum-metric",
2845 NB_OP_MODIFY
, metric_str
);
2848 if (!level
|| strmatch(level
, "level-2")) {
2850 nb_cli_enqueue_change(
2852 "./frr-isisd:isis/fast-reroute/level-2/remote-lfa/maximum-metric",
2853 NB_OP_DESTROY
, NULL
);
2855 nb_cli_enqueue_change(
2857 "./frr-isisd:isis/fast-reroute/level-2/remote-lfa/maximum-metric",
2858 NB_OP_MODIFY
, metric_str
);
2862 return nb_cli_apply_changes(vty
, NULL
);
2865 void cli_show_frr_remote_lfa_max_metric(struct vty
*vty
,
2866 const struct lyd_node
*dnode
,
2869 vty_out(vty
, " isis fast-reroute remote-lfa maximum-metric %s %s\n",
2870 yang_dnode_get_string(dnode
, NULL
),
2871 dnode
->parent
->parent
->schema
->name
);
2875 * XPath: /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/ti-lfa/enable
2877 DEFPY(isis_ti_lfa
, isis_ti_lfa_cmd
,
2878 "[no] isis fast-reroute ti-lfa [level-1|level-2]$level [node-protection$node_protection [link-fallback$link_fallback]]",
2880 "IS-IS routing protocol\n"
2881 "Interface IP Fast-reroute configuration\n"
2882 "Enable TI-LFA computation\n"
2883 "Enable TI-LFA computation for Level 1 only\n"
2884 "Enable TI-LFA computation for Level 2 only\n"
2885 "Protect against node failures\n"
2886 "Enable link-protection fallback\n")
2888 if (!level
|| strmatch(level
, "level-1")) {
2890 nb_cli_enqueue_change(
2892 "./frr-isisd:isis/fast-reroute/level-1/ti-lfa/enable",
2893 NB_OP_MODIFY
, "false");
2894 nb_cli_enqueue_change(
2896 "./frr-isisd:isis/fast-reroute/level-1/ti-lfa/node-protection",
2897 NB_OP_MODIFY
, "false");
2898 nb_cli_enqueue_change(
2900 "./frr-isisd:isis/fast-reroute/level-1/ti-lfa/link-fallback",
2901 NB_OP_MODIFY
, "false");
2903 nb_cli_enqueue_change(
2905 "./frr-isisd:isis/fast-reroute/level-1/ti-lfa/enable",
2906 NB_OP_MODIFY
, "true");
2907 nb_cli_enqueue_change(
2909 "./frr-isisd:isis/fast-reroute/level-1/ti-lfa/node-protection",
2911 node_protection
? "true" : "false");
2912 nb_cli_enqueue_change(
2914 "./frr-isisd:isis/fast-reroute/level-1/ti-lfa/link-fallback",
2915 NB_OP_MODIFY
, link_fallback
? "true" : "false");
2918 if (!level
|| strmatch(level
, "level-2")) {
2920 nb_cli_enqueue_change(
2922 "./frr-isisd:isis/fast-reroute/level-2/ti-lfa/enable",
2923 NB_OP_MODIFY
, "false");
2924 nb_cli_enqueue_change(
2926 "./frr-isisd:isis/fast-reroute/level-2/ti-lfa/node-protection",
2927 NB_OP_MODIFY
, "false");
2928 nb_cli_enqueue_change(
2930 "./frr-isisd:isis/fast-reroute/level-2/ti-lfa/link-fallback",
2931 NB_OP_MODIFY
, "false");
2933 nb_cli_enqueue_change(
2935 "./frr-isisd:isis/fast-reroute/level-2/ti-lfa/enable",
2936 NB_OP_MODIFY
, "true");
2937 nb_cli_enqueue_change(
2939 "./frr-isisd:isis/fast-reroute/level-2/ti-lfa/node-protection",
2941 node_protection
? "true" : "false");
2942 nb_cli_enqueue_change(
2944 "./frr-isisd:isis/fast-reroute/level-2/ti-lfa/link-fallback",
2945 NB_OP_MODIFY
, link_fallback
? "true" : "false");
2949 return nb_cli_apply_changes(vty
, NULL
);
2953 * XPath: /frr-isisd:isis/instance/log-adjacency-changes
2955 DEFPY_YANG(log_adj_changes
, log_adj_changes_cmd
, "[no] log-adjacency-changes",
2956 NO_STR
"Log changes in adjacency state\n")
2958 nb_cli_enqueue_change(vty
, "./log-adjacency-changes", NB_OP_MODIFY
,
2959 no
? "false" : "true");
2961 return nb_cli_apply_changes(vty
, NULL
);
2964 void cli_show_isis_log_adjacency(struct vty
*vty
, const struct lyd_node
*dnode
,
2967 if (!yang_dnode_get_bool(dnode
, NULL
))
2968 vty_out(vty
, " no");
2969 vty_out(vty
, " log-adjacency-changes\n");
2973 * XPath: /frr-isisd:isis/instance/mpls/ldp-sync
2975 DEFPY(isis_mpls_ldp_sync
, isis_mpls_ldp_sync_cmd
, "mpls ldp-sync",
2976 MPLS_STR MPLS_LDP_SYNC_STR
)
2978 nb_cli_enqueue_change(vty
, "./mpls/ldp-sync", NB_OP_CREATE
, NULL
);
2980 return nb_cli_apply_changes(vty
, NULL
);
2983 DEFPY(no_isis_mpls_ldp_sync
, no_isis_mpls_ldp_sync_cmd
, "no mpls ldp-sync",
2984 NO_STR MPLS_STR NO_MPLS_LDP_SYNC_STR
)
2986 nb_cli_enqueue_change(vty
, "./mpls/ldp-sync", NB_OP_DESTROY
, NULL
);
2988 return nb_cli_apply_changes(vty
, NULL
);
2991 void cli_show_isis_mpls_ldp_sync(struct vty
*vty
, const struct lyd_node
*dnode
,
2994 vty_out(vty
, " mpls ldp-sync\n");
2997 DEFPY(isis_mpls_ldp_sync_holddown
, isis_mpls_ldp_sync_holddown_cmd
,
2998 "mpls ldp-sync holddown (0-10000)",
2999 MPLS_STR MPLS_LDP_SYNC_STR
3000 "Time to wait for LDP-SYNC to occur before restoring interface metric\n"
3001 "Time in seconds\n")
3003 nb_cli_enqueue_change(vty
, "./mpls/ldp-sync/holddown", NB_OP_MODIFY
,
3006 return nb_cli_apply_changes(vty
, NULL
);
3009 DEFPY(no_isis_mpls_ldp_sync_holddown
, no_isis_mpls_ldp_sync_holddown_cmd
,
3010 "no mpls ldp-sync holddown [<(1-10000)>]",
3011 NO_STR MPLS_STR MPLS_LDP_SYNC_STR NO_MPLS_LDP_SYNC_HOLDDOWN_STR
"Time in seconds\n")
3013 nb_cli_enqueue_change(vty
, "./mpls/ldp-sync/holddown", NB_OP_DESTROY
,
3016 return nb_cli_apply_changes(vty
, NULL
);
3019 void cli_show_isis_mpls_ldp_sync_holddown(struct vty
*vty
,
3020 const struct lyd_node
*dnode
,
3023 vty_out(vty
, " mpls ldp-sync holddown %s\n",
3024 yang_dnode_get_string(dnode
, NULL
));
3028 * XPath: /frr-interface:lib/interface/frr-isisd:isis/mpls/ldp-sync
3030 DEFPY(isis_mpls_if_ldp_sync
, isis_mpls_if_ldp_sync_cmd
,
3031 "[no] isis mpls ldp-sync",
3032 NO_STR
"IS-IS routing protocol\n" MPLS_STR MPLS_LDP_SYNC_STR
)
3034 const struct lyd_node
*dnode
;
3036 dnode
= yang_dnode_getf(vty
->candidate_config
->dnode
,
3037 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
3038 if (dnode
== NULL
) {
3039 vty_out(vty
, "ISIS is not enabled on this circuit\n");
3043 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/mpls/ldp-sync",
3044 NB_OP_MODIFY
, no
? "false" : "true");
3046 return nb_cli_apply_changes(vty
, NULL
);
3050 void cli_show_isis_mpls_if_ldp_sync(struct vty
*vty
,
3051 const struct lyd_node
*dnode
,
3054 if (!yang_dnode_get_bool(dnode
, NULL
))
3055 vty_out(vty
, " no");
3057 vty_out(vty
, " isis mpls ldp-sync\n");
3060 DEFPY(isis_mpls_if_ldp_sync_holddown
, isis_mpls_if_ldp_sync_holddown_cmd
,
3061 "isis mpls ldp-sync holddown (0-10000)",
3062 "IS-IS routing protocol\n" MPLS_STR MPLS_LDP_SYNC_STR
3063 "Time to wait for LDP-SYNC to occur before restoring interface metric\n"
3064 "Time in seconds\n")
3066 const struct lyd_node
*dnode
;
3068 dnode
= yang_dnode_getf(vty
->candidate_config
->dnode
,
3069 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
3070 if (dnode
== NULL
) {
3071 vty_out(vty
, "ISIS is not enabled on this circuit\n");
3075 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/mpls/holddown",
3076 NB_OP_MODIFY
, holddown_str
);
3078 return nb_cli_apply_changes(vty
, NULL
);
3081 DEFPY(no_isis_mpls_if_ldp_sync_holddown
, no_isis_mpls_if_ldp_sync_holddown_cmd
,
3082 "no isis mpls ldp-sync holddown [<(1-10000)>]",
3083 NO_STR
"IS-IS routing protocol\n" MPLS_STR NO_MPLS_LDP_SYNC_STR
3084 NO_MPLS_LDP_SYNC_HOLDDOWN_STR
"Time in seconds\n")
3086 const struct lyd_node
*dnode
;
3088 dnode
= yang_dnode_getf(vty
->candidate_config
->dnode
,
3089 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
3090 if (dnode
== NULL
) {
3091 vty_out(vty
, "ISIS is not enabled on this circuit\n");
3095 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/mpls/holddown",
3096 NB_OP_DESTROY
, NULL
);
3098 return nb_cli_apply_changes(vty
, NULL
);
3101 void cli_show_isis_mpls_if_ldp_sync_holddown(struct vty
*vty
,
3102 const struct lyd_node
*dnode
,
3105 vty_out(vty
, " isis mpls ldp-sync holddown %s\n",
3106 yang_dnode_get_string(dnode
, NULL
));
3109 void isis_cli_init(void)
3111 install_element(CONFIG_NODE
, &router_isis_cmd
);
3112 install_element(CONFIG_NODE
, &no_router_isis_cmd
);
3114 install_element(INTERFACE_NODE
, &ip_router_isis_cmd
);
3115 install_element(INTERFACE_NODE
, &ip_router_isis_vrf_cmd
);
3116 install_element(INTERFACE_NODE
, &ip6_router_isis_cmd
);
3117 install_element(INTERFACE_NODE
, &ip6_router_isis_vrf_cmd
);
3118 install_element(INTERFACE_NODE
, &no_ip_router_isis_cmd
);
3119 install_element(INTERFACE_NODE
, &no_ip_router_isis_vrf_cmd
);
3120 install_element(INTERFACE_NODE
, &isis_bfd_cmd
);
3121 install_element(INTERFACE_NODE
, &isis_bfd_profile_cmd
);
3123 install_element(ISIS_NODE
, &net_cmd
);
3125 install_element(ISIS_NODE
, &is_type_cmd
);
3126 install_element(ISIS_NODE
, &no_is_type_cmd
);
3128 install_element(ISIS_NODE
, &dynamic_hostname_cmd
);
3130 install_element(ISIS_NODE
, &set_overload_bit_cmd
);
3131 install_element(ISIS_NODE
, &set_overload_bit_on_startup_cmd
);
3132 install_element(ISIS_NODE
, &no_set_overload_bit_on_startup_cmd
);
3134 install_element(ISIS_NODE
, &attached_bit_send_cmd
);
3135 install_element(ISIS_NODE
, &attached_bit_receive_ignore_cmd
);
3137 install_element(ISIS_NODE
, &metric_style_cmd
);
3138 install_element(ISIS_NODE
, &no_metric_style_cmd
);
3140 install_element(ISIS_NODE
, &area_passwd_cmd
);
3141 install_element(ISIS_NODE
, &domain_passwd_cmd
);
3142 install_element(ISIS_NODE
, &no_area_passwd_cmd
);
3144 install_element(ISIS_NODE
, &lsp_gen_interval_cmd
);
3145 install_element(ISIS_NODE
, &no_lsp_gen_interval_cmd
);
3146 install_element(ISIS_NODE
, &lsp_refresh_interval_cmd
);
3147 install_element(ISIS_NODE
, &no_lsp_refresh_interval_cmd
);
3148 install_element(ISIS_NODE
, &max_lsp_lifetime_cmd
);
3149 install_element(ISIS_NODE
, &no_max_lsp_lifetime_cmd
);
3150 install_element(ISIS_NODE
, &lsp_timers_cmd
);
3151 install_element(ISIS_NODE
, &no_lsp_timers_cmd
);
3152 install_element(ISIS_NODE
, &area_lsp_mtu_cmd
);
3153 install_element(ISIS_NODE
, &no_area_lsp_mtu_cmd
);
3155 install_element(ISIS_NODE
, &spf_interval_cmd
);
3156 install_element(ISIS_NODE
, &no_spf_interval_cmd
);
3157 install_element(ISIS_NODE
, &spf_prefix_priority_cmd
);
3158 install_element(ISIS_NODE
, &no_spf_prefix_priority_cmd
);
3159 install_element(ISIS_NODE
, &spf_delay_ietf_cmd
);
3160 install_element(ISIS_NODE
, &no_spf_delay_ietf_cmd
);
3162 install_element(ISIS_NODE
, &area_purge_originator_cmd
);
3164 install_element(ISIS_NODE
, &isis_mpls_te_on_cmd
);
3165 install_element(ISIS_NODE
, &no_isis_mpls_te_on_cmd
);
3166 install_element(ISIS_NODE
, &isis_mpls_te_router_addr_cmd
);
3167 install_element(ISIS_NODE
, &no_isis_mpls_te_router_addr_cmd
);
3168 install_element(ISIS_NODE
, &isis_mpls_te_router_addr_v6_cmd
);
3169 install_element(ISIS_NODE
, &no_isis_mpls_te_router_addr_v6_cmd
);
3170 install_element(ISIS_NODE
, &isis_mpls_te_inter_as_cmd
);
3171 install_element(ISIS_NODE
, &isis_mpls_te_export_cmd
);
3172 install_element(ISIS_NODE
, &no_isis_mpls_te_export_cmd
);
3174 install_element(ISIS_NODE
, &isis_default_originate_cmd
);
3175 install_element(ISIS_NODE
, &isis_redistribute_cmd
);
3177 install_element(ISIS_NODE
, &isis_topology_cmd
);
3179 install_element(ISIS_NODE
, &isis_sr_enable_cmd
);
3180 install_element(ISIS_NODE
, &no_isis_sr_enable_cmd
);
3181 install_element(ISIS_NODE
, &isis_sr_global_block_label_range_cmd
);
3182 install_element(ISIS_NODE
, &no_isis_sr_global_block_label_range_cmd
);
3183 install_element(ISIS_NODE
, &isis_sr_node_msd_cmd
);
3184 install_element(ISIS_NODE
, &no_isis_sr_node_msd_cmd
);
3185 install_element(ISIS_NODE
, &isis_sr_prefix_sid_cmd
);
3186 install_element(ISIS_NODE
, &no_isis_sr_prefix_sid_cmd
);
3187 install_element(ISIS_NODE
, &isis_frr_lfa_priority_limit_cmd
);
3188 install_element(ISIS_NODE
, &isis_frr_lfa_tiebreaker_cmd
);
3189 install_element(ISIS_NODE
, &isis_frr_lfa_load_sharing_cmd
);
3190 install_element(ISIS_NODE
, &isis_frr_remote_lfa_plist_cmd
);
3191 install_element(ISIS_NODE
, &no_isis_frr_remote_lfa_plist_cmd
);
3193 install_element(INTERFACE_NODE
, &isis_passive_cmd
);
3195 install_element(INTERFACE_NODE
, &isis_passwd_cmd
);
3196 install_element(INTERFACE_NODE
, &no_isis_passwd_cmd
);
3198 install_element(INTERFACE_NODE
, &isis_metric_cmd
);
3199 install_element(INTERFACE_NODE
, &no_isis_metric_cmd
);
3201 install_element(INTERFACE_NODE
, &isis_hello_interval_cmd
);
3202 install_element(INTERFACE_NODE
, &no_isis_hello_interval_cmd
);
3204 install_element(INTERFACE_NODE
, &isis_hello_multiplier_cmd
);
3205 install_element(INTERFACE_NODE
, &no_isis_hello_multiplier_cmd
);
3207 install_element(INTERFACE_NODE
, &isis_threeway_adj_cmd
);
3209 install_element(INTERFACE_NODE
, &isis_hello_padding_cmd
);
3211 install_element(INTERFACE_NODE
, &csnp_interval_cmd
);
3212 install_element(INTERFACE_NODE
, &no_csnp_interval_cmd
);
3214 install_element(INTERFACE_NODE
, &psnp_interval_cmd
);
3215 install_element(INTERFACE_NODE
, &no_psnp_interval_cmd
);
3217 install_element(INTERFACE_NODE
, &circuit_topology_cmd
);
3219 install_element(INTERFACE_NODE
, &isis_circuit_type_cmd
);
3220 install_element(INTERFACE_NODE
, &no_isis_circuit_type_cmd
);
3222 install_element(INTERFACE_NODE
, &isis_network_cmd
);
3224 install_element(INTERFACE_NODE
, &isis_priority_cmd
);
3225 install_element(INTERFACE_NODE
, &no_isis_priority_cmd
);
3227 install_element(INTERFACE_NODE
, &isis_lfa_cmd
);
3228 install_element(INTERFACE_NODE
, &isis_lfa_exclude_interface_cmd
);
3229 install_element(INTERFACE_NODE
, &isis_remote_lfa_cmd
);
3230 install_element(INTERFACE_NODE
, &isis_remote_lfa_max_metric_cmd
);
3231 install_element(INTERFACE_NODE
, &isis_ti_lfa_cmd
);
3233 install_element(ISIS_NODE
, &log_adj_changes_cmd
);
3235 install_element(ISIS_NODE
, &isis_mpls_ldp_sync_cmd
);
3236 install_element(ISIS_NODE
, &no_isis_mpls_ldp_sync_cmd
);
3237 install_element(ISIS_NODE
, &isis_mpls_ldp_sync_holddown_cmd
);
3238 install_element(ISIS_NODE
, &no_isis_mpls_ldp_sync_holddown_cmd
);
3239 install_element(INTERFACE_NODE
, &isis_mpls_if_ldp_sync_cmd
);
3240 install_element(INTERFACE_NODE
, &isis_mpls_if_ldp_sync_holddown_cmd
);
3241 install_element(INTERFACE_NODE
, &no_isis_mpls_if_ldp_sync_holddown_cmd
);
3244 #endif /* ifndef FABRICD */