2 * Copyright (C) 2001,2002 Sampo Saaristo
3 * Tampere University of Technology
4 * Institute of Communications Engineering
5 * Copyright (C) 2018 Volta Networks
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the Free
10 * Software Foundation; either version 2 of the License, or (at your option)
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 * You should have received a copy of the GNU General Public License along
19 * with this program; see the file COPYING; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 #include "northbound_cli.h"
33 #include "lib/linklist.h"
34 #include "isisd/isisd.h"
35 #include "isisd/isis_nb.h"
36 #include "isisd/isis_misc.h"
37 #include "isisd/isis_circuit.h"
38 #include "isisd/isis_csm.h"
40 #ifndef VTYSH_EXTRACT_PL
41 #include "isisd/isis_cli_clippy.c"
47 * XPath: /frr-isisd:isis/instance
49 DEFPY_NOSH(router_isis
, router_isis_cmd
, "router isis WORD$tag",
52 "ISO Routing area tag\n")
55 char base_xpath
[XPATH_MAXLEN
];
57 snprintf(base_xpath
, XPATH_MAXLEN
,
58 "/frr-isisd:isis/instance[area-tag='%s']", tag
);
59 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
60 /* default value in yang for is-type is level-1, but in FRR
61 * the first instance is assigned is-type level-1-2. We
62 * need to make sure to set it in the yang model so that it
63 * is consistent with what FRR sees.
65 if (listcount(isis
->area_list
) == 0)
66 nb_cli_enqueue_change(vty
, "./is-type", NB_OP_MODIFY
,
68 ret
= nb_cli_apply_changes(vty
, base_xpath
);
69 if (ret
== CMD_SUCCESS
)
70 VTY_PUSH_XPATH(ISIS_NODE
, base_xpath
);
75 DEFPY(no_router_isis
, no_router_isis_cmd
, "no router isis WORD$tag",
78 "ISO Routing area tag\n")
80 char temp_xpath
[XPATH_MAXLEN
];
81 struct listnode
*node
, *nnode
;
82 struct isis_circuit
*circuit
= NULL
;
83 struct isis_area
*area
= NULL
;
85 if (!yang_dnode_exists(vty
->candidate_config
->dnode
,
86 "/frr-isisd:isis/instance[area-tag='%s']",
88 vty_out(vty
, "ISIS area %s not found.\n", tag
);
89 return CMD_ERR_NOTHING_TODO
;
92 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
93 area
= isis_area_lookup(tag
);
94 if (area
&& area
->circuit_list
&& listcount(area
->circuit_list
)) {
95 for (ALL_LIST_ELEMENTS(area
->circuit_list
, node
, nnode
,
97 /* add callbacks to delete each of the circuits listed
99 const char *vrf_name
=
100 vrf_lookup_by_id(circuit
->interface
->vrf_id
)
103 temp_xpath
, XPATH_MAXLEN
,
104 "/frr-interface:lib/interface[name='%s'][vrf='%s']/frr-isisd:isis",
105 circuit
->interface
->name
, vrf_name
);
106 nb_cli_enqueue_change(vty
, temp_xpath
, NB_OP_DESTROY
,
111 return nb_cli_apply_changes(
112 vty
, "/frr-isisd:isis/instance[area-tag='%s']", tag
);
115 void cli_show_router_isis(struct vty
*vty
, struct lyd_node
*dnode
,
119 vty_out(vty
, "router isis %s\n",
120 yang_dnode_get_string(dnode
, "./area-tag"));
124 * XPath: /frr-interface:lib/interface/frr-isisd:isis/
125 * XPath: /frr-interface:lib/interface/frr-isisd:isis/ipv4-routing
126 * XPath: /frr-interface:lib/interface/frr-isisd:isis/ipv6-routing
127 * XPath: /frr-isisd:isis/instance
129 DEFPY(ip_router_isis
, ip_router_isis_cmd
, "ip router isis WORD$tag",
130 "Interface Internet Protocol config commands\n"
131 "IP router interface commands\n"
132 "IS-IS routing protocol\n"
133 "Routing process tag\n")
135 char temp_xpath
[XPATH_MAXLEN
];
136 const char *circ_type
;
137 struct isis_area
*area
;
138 struct interface
*ifp
;
140 /* area will be created if it is not present. make sure the yang model
141 * is synced with FRR and call the appropriate NB cb.
143 area
= isis_area_lookup(tag
);
145 snprintf(temp_xpath
, XPATH_MAXLEN
,
146 "/frr-isisd:isis/instance[area-tag='%s']", tag
);
147 nb_cli_enqueue_change(vty
, temp_xpath
, NB_OP_CREATE
, tag
);
148 snprintf(temp_xpath
, XPATH_MAXLEN
,
149 "/frr-isisd:isis/instance[area-tag='%s']/is-type",
151 nb_cli_enqueue_change(
152 vty
, temp_xpath
, NB_OP_MODIFY
,
153 listcount(isis
->area_list
) == 0 ? "level-1-2" : NULL
);
154 nb_cli_enqueue_change(vty
, "./frr-isisd:isis", NB_OP_CREATE
,
156 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/area-tag",
158 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/ipv4-routing",
159 NB_OP_MODIFY
, "true");
160 nb_cli_enqueue_change(
161 vty
, "./frr-isisd:isis/circuit-type", NB_OP_MODIFY
,
162 listcount(isis
->area_list
) == 0 ? "level-1-2"
165 /* area exists, circuit type defaults to its area's is_type */
166 switch (area
->is_type
) {
168 circ_type
= "level-1";
171 circ_type
= "level-2";
173 case IS_LEVEL_1_AND_2
:
174 circ_type
= "level-1-2";
177 /* just to silence compiler warnings */
178 return CMD_WARNING_CONFIG_FAILED
;
180 nb_cli_enqueue_change(vty
, "./frr-isisd:isis", NB_OP_CREATE
,
182 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/area-tag",
184 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/ipv4-routing",
185 NB_OP_MODIFY
, "true");
186 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/circuit-type",
187 NB_OP_MODIFY
, circ_type
);
190 /* check if the interface is a loopback and if so set it as passive */
191 ifp
= nb_running_get_entry(NULL
, VTY_CURR_XPATH
, false);
192 if (ifp
&& if_is_loopback(ifp
))
193 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/passive",
194 NB_OP_MODIFY
, "true");
196 return nb_cli_apply_changes(vty
, NULL
);
199 DEFPY(ip6_router_isis
, ip6_router_isis_cmd
, "ipv6 router isis WORD$tag",
200 "Interface Internet Protocol config commands\n"
201 "IP router interface commands\n"
202 "IS-IS routing protocol\n"
203 "Routing process tag\n")
205 char temp_xpath
[XPATH_MAXLEN
];
206 const char *circ_type
;
207 struct isis_area
*area
;
208 struct interface
*ifp
;
210 /* area will be created if it is not present. make sure the yang model
211 * is synced with FRR and call the appropriate NB cb.
213 area
= isis_area_lookup(tag
);
215 snprintf(temp_xpath
, XPATH_MAXLEN
,
216 "/frr-isisd:isis/instance[area-tag='%s']", tag
);
217 nb_cli_enqueue_change(vty
, temp_xpath
, NB_OP_CREATE
, tag
);
218 snprintf(temp_xpath
, XPATH_MAXLEN
,
219 "/frr-isisd:isis/instance[area-tag='%s']/is-type",
221 nb_cli_enqueue_change(
222 vty
, temp_xpath
, NB_OP_MODIFY
,
223 listcount(isis
->area_list
) == 0 ? "level-1-2" : NULL
);
224 nb_cli_enqueue_change(vty
, "./frr-isisd:isis", NB_OP_CREATE
,
226 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/area-tag",
228 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/ipv6-routing",
229 NB_OP_MODIFY
, "true");
230 nb_cli_enqueue_change(
231 vty
, "./frr-isisd:isis/circuit-type", NB_OP_MODIFY
,
232 listcount(isis
->area_list
) == 0 ? "level-1-2"
235 /* area exists, circuit type defaults to its area's is_type */
236 switch (area
->is_type
) {
238 circ_type
= "level-1";
241 circ_type
= "level-2";
243 case IS_LEVEL_1_AND_2
:
244 circ_type
= "level-1-2";
247 /* just to silence compiler warnings */
248 return CMD_WARNING_CONFIG_FAILED
;
250 nb_cli_enqueue_change(vty
, "./frr-isisd:isis", NB_OP_CREATE
,
252 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/area-tag",
254 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/ipv6-routing",
255 NB_OP_MODIFY
, "true");
256 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/circuit-type",
257 NB_OP_MODIFY
, circ_type
);
260 /* check if the interface is a loopback and if so set it as passive */
261 ifp
= nb_running_get_entry(NULL
, VTY_CURR_XPATH
, false);
262 if (ifp
&& if_is_loopback(ifp
))
263 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/passive",
264 NB_OP_MODIFY
, "true");
266 return nb_cli_apply_changes(vty
, NULL
);
269 DEFPY(no_ip_router_isis
, no_ip_router_isis_cmd
,
270 "no <ip|ipv6>$ip router isis [WORD]$tag",
272 "Interface Internet Protocol config commands\n"
273 "IP router interface commands\n"
274 "IP router interface commands\n"
275 "IS-IS routing protocol\n"
276 "Routing process tag\n")
278 const struct lyd_node
*dnode
;
280 dnode
= yang_dnode_get(vty
->candidate_config
->dnode
,
281 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
286 * If both ipv4 and ipv6 are off delete the interface isis container.
288 if (strmatch(ip
, "ipv6")) {
289 if (!yang_dnode_get_bool(dnode
, "./ipv4-routing"))
290 nb_cli_enqueue_change(vty
, "./frr-isisd:isis",
291 NB_OP_DESTROY
, NULL
);
293 nb_cli_enqueue_change(vty
,
294 "./frr-isisd:isis/ipv6-routing",
295 NB_OP_MODIFY
, "false");
297 if (!yang_dnode_get_bool(dnode
, "./ipv6-routing"))
298 nb_cli_enqueue_change(vty
, "./frr-isisd:isis",
299 NB_OP_DESTROY
, NULL
);
301 nb_cli_enqueue_change(vty
,
302 "./frr-isisd:isis/ipv4-routing",
303 NB_OP_MODIFY
, "false");
306 return nb_cli_apply_changes(vty
, NULL
);
309 void cli_show_ip_isis_ipv4(struct vty
*vty
, struct lyd_node
*dnode
,
312 if (!yang_dnode_get_bool(dnode
, NULL
))
314 vty_out(vty
, " ip router isis %s\n",
315 yang_dnode_get_string(dnode
, "../area-tag"));
318 void cli_show_ip_isis_ipv6(struct vty
*vty
, struct lyd_node
*dnode
,
321 if (!yang_dnode_get_bool(dnode
, NULL
))
323 vty_out(vty
, " ipv6 router isis %s\n",
324 yang_dnode_get_string(dnode
, "../area-tag"));
328 * XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring
335 "Enable BFD support\n")
337 const struct lyd_node
*dnode
;
339 dnode
= yang_dnode_get(vty
->candidate_config
->dnode
,
340 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
342 vty_out(vty
, "ISIS is not enabled on this circuit\n");
346 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/bfd-monitoring",
347 NB_OP_MODIFY
, no
? "false" : "true");
349 return nb_cli_apply_changes(vty
, NULL
);
352 void cli_show_ip_isis_bfd_monitoring(struct vty
*vty
, struct lyd_node
*dnode
,
355 if (!yang_dnode_get_bool(dnode
, NULL
))
358 vty_out(vty
, " isis bfd\n");
362 * XPath: /frr-isisd:isis/instance/area-address
364 DEFPY(net
, net_cmd
, "[no] net WORD",
365 "Remove an existing Network Entity Title for this process\n"
366 "A Network Entity Title for this process (OSI only)\n"
367 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
369 nb_cli_enqueue_change(vty
, "./area-address",
370 no
? NB_OP_DESTROY
: NB_OP_CREATE
, net
);
372 return nb_cli_apply_changes(vty
, NULL
);
375 void cli_show_isis_area_address(struct vty
*vty
, struct lyd_node
*dnode
,
378 vty_out(vty
, " net %s\n", yang_dnode_get_string(dnode
, NULL
));
382 * XPath: /frr-isisd:isis/instance/is-type
384 DEFPY(is_type
, is_type_cmd
, "is-type <level-1|level-1-2|level-2-only>$level",
385 "IS Level for this routing process (OSI only)\n"
386 "Act as a station router only\n"
387 "Act as both a station router and an area router\n"
388 "Act as an area router only\n")
390 nb_cli_enqueue_change(vty
, "./is-type", NB_OP_MODIFY
,
391 strmatch(level
, "level-2-only") ? "level-2"
394 return nb_cli_apply_changes(vty
, NULL
);
397 DEFPY(no_is_type
, no_is_type_cmd
,
398 "no is-type [<level-1|level-1-2|level-2-only>]",
400 "IS Level for this routing process (OSI only)\n"
401 "Act as a station router only\n"
402 "Act as both a station router and an area router\n"
403 "Act as an area router only\n")
405 const char *value
= NULL
;
406 struct isis_area
*area
;
408 area
= nb_running_get_entry(NULL
, VTY_CURR_XPATH
, false);
411 * Put the is-type back to defaults:
412 * - level-1-2 on first area
413 * - level-1 for the rest
415 if (area
&& listgetdata(listhead(isis
->area_list
)) == area
)
419 nb_cli_enqueue_change(vty
, "./is-type", NB_OP_MODIFY
, value
);
421 return nb_cli_apply_changes(vty
, NULL
);
424 void cli_show_isis_is_type(struct vty
*vty
, struct lyd_node
*dnode
,
427 int is_type
= yang_dnode_get_enum(dnode
, NULL
);
431 vty_out(vty
, " is-type level-1\n");
434 vty_out(vty
, " is-type level-2-only\n");
436 case IS_LEVEL_1_AND_2
:
437 vty_out(vty
, " is-type level-1-2\n");
443 * XPath: /frr-isisd:isis/instance/dynamic-hostname
445 DEFPY(dynamic_hostname
, dynamic_hostname_cmd
, "[no] hostname dynamic",
447 "Dynamic hostname for IS-IS\n"
448 "Dynamic hostname\n")
450 nb_cli_enqueue_change(vty
, "./dynamic-hostname", NB_OP_MODIFY
,
451 no
? "false" : "true");
453 return nb_cli_apply_changes(vty
, NULL
);
456 void cli_show_isis_dynamic_hostname(struct vty
*vty
, struct lyd_node
*dnode
,
459 if (!yang_dnode_get_bool(dnode
, NULL
))
462 vty_out(vty
, " hostname dynamic\n");
466 * XPath: /frr-isisd:isis/instance/overload
468 DEFPY(set_overload_bit
, set_overload_bit_cmd
, "[no] set-overload-bit",
469 "Reset overload bit to accept transit traffic\n"
470 "Set overload bit to avoid any transit traffic\n")
472 nb_cli_enqueue_change(vty
, "./overload", NB_OP_MODIFY
,
473 no
? "false" : "true");
475 return nb_cli_apply_changes(vty
, NULL
);
478 void cli_show_isis_overload(struct vty
*vty
, struct lyd_node
*dnode
,
481 if (!yang_dnode_get_bool(dnode
, NULL
))
483 vty_out(vty
, " set-overload-bit\n");
487 * XPath: /frr-isisd:isis/instance/attached
489 DEFPY(set_attached_bit
, set_attached_bit_cmd
, "[no] set-attached-bit",
490 "Reset attached bit\n"
491 "Set attached bit to identify as L1/L2 router for inter-area traffic\n")
493 nb_cli_enqueue_change(vty
, "./attached", NB_OP_MODIFY
,
494 no
? "false" : "true");
496 return nb_cli_apply_changes(vty
, NULL
);
499 void cli_show_isis_attached(struct vty
*vty
, struct lyd_node
*dnode
,
502 if (!yang_dnode_get_bool(dnode
, NULL
))
504 vty_out(vty
, " set-attached-bit\n");
508 * XPath: /frr-isisd:isis/instance/metric-style
510 DEFPY(metric_style
, metric_style_cmd
,
511 "metric-style <narrow|transition|wide>$style",
512 "Use old-style (ISO 10589) or new-style packet formats\n"
513 "Use old style of TLVs with narrow metric\n"
514 "Send and accept both styles of TLVs during transition\n"
515 "Use new style of TLVs to carry wider metric\n")
517 nb_cli_enqueue_change(vty
, "./metric-style", NB_OP_MODIFY
, style
);
519 return nb_cli_apply_changes(vty
, NULL
);
522 DEFPY(no_metric_style
, no_metric_style_cmd
,
523 "no metric-style [narrow|transition|wide]",
525 "Use old-style (ISO 10589) or new-style packet formats\n"
526 "Use old style of TLVs with narrow metric\n"
527 "Send and accept both styles of TLVs during transition\n"
528 "Use new style of TLVs to carry wider metric\n")
530 nb_cli_enqueue_change(vty
, "./metric-style", NB_OP_MODIFY
, "narrow");
532 return nb_cli_apply_changes(vty
, NULL
);
535 void cli_show_isis_metric_style(struct vty
*vty
, struct lyd_node
*dnode
,
538 int metric
= yang_dnode_get_enum(dnode
, NULL
);
541 case ISIS_NARROW_METRIC
:
542 vty_out(vty
, " metric-style narrow\n");
544 case ISIS_WIDE_METRIC
:
545 vty_out(vty
, " metric-style wide\n");
547 case ISIS_TRANSITION_METRIC
:
548 vty_out(vty
, " metric-style transition\n");
554 * XPath: /frr-isisd:isis/instance/area-password
556 DEFPY(area_passwd
, area_passwd_cmd
,
557 "area-password <clear|md5>$pwd_type WORD$pwd [authenticate snp <send-only|validate>$snp]",
558 "Configure the authentication password for an area\n"
559 "Clear-text authentication type\n"
560 "MD5 authentication type\n"
561 "Level-wide password\n"
564 "Send but do not check PDUs on receiving\n"
565 "Send and check PDUs on receiving\n")
567 nb_cli_enqueue_change(vty
, "./area-password", NB_OP_CREATE
, NULL
);
568 nb_cli_enqueue_change(vty
, "./area-password/password", NB_OP_MODIFY
,
570 nb_cli_enqueue_change(vty
, "./area-password/password-type",
571 NB_OP_MODIFY
, pwd_type
);
572 nb_cli_enqueue_change(vty
, "./area-password/authenticate-snp",
573 NB_OP_MODIFY
, snp
? snp
: "none");
575 return nb_cli_apply_changes(vty
, NULL
);
578 void cli_show_isis_area_pwd(struct vty
*vty
, struct lyd_node
*dnode
,
583 vty_out(vty
, " area-password %s %s",
584 yang_dnode_get_string(dnode
, "./password-type"),
585 yang_dnode_get_string(dnode
, "./password"));
586 snp
= yang_dnode_get_string(dnode
, "./authenticate-snp");
587 if (!strmatch("none", snp
))
588 vty_out(vty
, " authenticate snp %s", snp
);
593 * XPath: /frr-isisd:isis/instance/domain-password
595 DEFPY(domain_passwd
, domain_passwd_cmd
,
596 "domain-password <clear|md5>$pwd_type WORD$pwd [authenticate snp <send-only|validate>$snp]",
597 "Set the authentication password for a routing domain\n"
598 "Clear-text authentication type\n"
599 "MD5 authentication type\n"
600 "Level-wide password\n"
603 "Send but do not check PDUs on receiving\n"
604 "Send and check PDUs on receiving\n")
606 nb_cli_enqueue_change(vty
, "./domain-password", NB_OP_CREATE
, NULL
);
607 nb_cli_enqueue_change(vty
, "./domain-password/password", NB_OP_MODIFY
,
609 nb_cli_enqueue_change(vty
, "./domain-password/password-type",
610 NB_OP_MODIFY
, pwd_type
);
611 nb_cli_enqueue_change(vty
, "./domain-password/authenticate-snp",
612 NB_OP_MODIFY
, snp
? snp
: "none");
614 return nb_cli_apply_changes(vty
, NULL
);
617 DEFPY(no_area_passwd
, no_area_passwd_cmd
,
618 "no <area-password|domain-password>$cmd",
620 "Configure the authentication password for an area\n"
621 "Set the authentication password for a routing domain\n")
623 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
625 return nb_cli_apply_changes(vty
, "./%s", cmd
);
628 void cli_show_isis_domain_pwd(struct vty
*vty
, struct lyd_node
*dnode
,
633 vty_out(vty
, " domain-password %s %s",
634 yang_dnode_get_string(dnode
, "./password-type"),
635 yang_dnode_get_string(dnode
, "./password"));
636 snp
= yang_dnode_get_string(dnode
, "./authenticate-snp");
637 if (!strmatch("none", snp
))
638 vty_out(vty
, " authenticate snp %s", snp
);
643 * XPath: /frr-isisd:isis/instance/lsp/generation-interval
645 DEFPY(lsp_gen_interval
, lsp_gen_interval_cmd
,
646 "lsp-gen-interval [level-1|level-2]$level (1-120)$val",
647 "Minimum interval between regenerating same LSP\n"
648 "Set interval for level 1 only\n"
649 "Set interval for level 2 only\n"
650 "Minimum interval in seconds\n")
652 if (!level
|| strmatch(level
, "level-1"))
653 nb_cli_enqueue_change(vty
, "./lsp/generation-interval/level-1",
654 NB_OP_MODIFY
, val_str
);
655 if (!level
|| strmatch(level
, "level-2"))
656 nb_cli_enqueue_change(vty
, "./lsp/generation-interval/level-2",
657 NB_OP_MODIFY
, val_str
);
659 return nb_cli_apply_changes(vty
, NULL
);
662 DEFPY(no_lsp_gen_interval
, no_lsp_gen_interval_cmd
,
663 "no lsp-gen-interval [level-1|level-2]$level [(1-120)]",
665 "Minimum interval between regenerating same LSP\n"
666 "Set interval for level 1 only\n"
667 "Set interval for level 2 only\n"
668 "Minimum interval in seconds\n")
670 if (!level
|| strmatch(level
, "level-1"))
671 nb_cli_enqueue_change(vty
, "./lsp/generation-interval/level-1",
673 if (!level
|| strmatch(level
, "level-2"))
674 nb_cli_enqueue_change(vty
, "./lsp/generation-interval/level-2",
677 return nb_cli_apply_changes(vty
, NULL
);
680 void cli_show_isis_lsp_gen_interval(struct vty
*vty
, struct lyd_node
*dnode
,
683 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
684 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
686 if (strmatch(l1
, l2
))
687 vty_out(vty
, " lsp-gen-interval %s\n", l1
);
689 vty_out(vty
, " lsp-gen-interval level-1 %s\n", l1
);
690 vty_out(vty
, " lsp-gen-interval level-2 %s\n", l2
);
695 * XPath: /frr-isisd:isis/instance/lsp/refresh-interval
697 DEFPY(lsp_refresh_interval
, lsp_refresh_interval_cmd
,
698 "lsp-refresh-interval [level-1|level-2]$level (1-65235)$val",
699 "LSP refresh interval\n"
700 "LSP refresh interval for Level 1 only\n"
701 "LSP refresh interval for Level 2 only\n"
702 "LSP refresh interval in seconds\n")
704 if (!level
|| strmatch(level
, "level-1"))
705 nb_cli_enqueue_change(vty
, "./lsp/refresh-interval/level-1",
706 NB_OP_MODIFY
, val_str
);
707 if (!level
|| strmatch(level
, "level-2"))
708 nb_cli_enqueue_change(vty
, "./lsp/refresh-interval/level-2",
709 NB_OP_MODIFY
, val_str
);
711 return nb_cli_apply_changes(vty
, NULL
);
714 DEFPY(no_lsp_refresh_interval
, no_lsp_refresh_interval_cmd
,
715 "no lsp-refresh-interval [level-1|level-2]$level [(1-65235)]",
717 "LSP refresh interval\n"
718 "LSP refresh interval for Level 1 only\n"
719 "LSP refresh interval for Level 2 only\n"
720 "LSP refresh interval in seconds\n")
722 if (!level
|| strmatch(level
, "level-1"))
723 nb_cli_enqueue_change(vty
, "./lsp/refresh-interval/level-1",
725 if (!level
|| strmatch(level
, "level-2"))
726 nb_cli_enqueue_change(vty
, "./lsp/refresh-interval/level-2",
729 return nb_cli_apply_changes(vty
, NULL
);
732 void cli_show_isis_lsp_ref_interval(struct vty
*vty
, struct lyd_node
*dnode
,
735 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
736 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
738 if (strmatch(l1
, l2
))
739 vty_out(vty
, " lsp-refresh-interval %s\n", l1
);
741 vty_out(vty
, " lsp-refresh-interval level-1 %s\n", l1
);
742 vty_out(vty
, " lsp-refresh-interval level-2 %s\n", l2
);
747 * XPath: /frr-isisd:isis/instance/lsp/maximum-lifetime
749 DEFPY(max_lsp_lifetime
, max_lsp_lifetime_cmd
,
750 "max-lsp-lifetime [level-1|level-2]$level (350-65535)$val",
751 "Maximum LSP lifetime\n"
752 "Maximum LSP lifetime for Level 1 only\n"
753 "Maximum LSP lifetime for Level 2 only\n"
754 "LSP lifetime in seconds\n")
756 if (!level
|| strmatch(level
, "level-1"))
757 nb_cli_enqueue_change(vty
, "./lsp/maximum-lifetime/level-1",
758 NB_OP_MODIFY
, val_str
);
759 if (!level
|| strmatch(level
, "level-2"))
760 nb_cli_enqueue_change(vty
, "./lsp/maximum-lifetime/level-2",
761 NB_OP_MODIFY
, val_str
);
763 return nb_cli_apply_changes(vty
, NULL
);
766 DEFPY(no_max_lsp_lifetime
, no_max_lsp_lifetime_cmd
,
767 "no max-lsp-lifetime [level-1|level-2]$level [(350-65535)]",
769 "Maximum LSP lifetime\n"
770 "Maximum LSP lifetime for Level 1 only\n"
771 "Maximum LSP lifetime for Level 2 only\n"
772 "LSP lifetime in seconds\n")
774 if (!level
|| strmatch(level
, "level-1"))
775 nb_cli_enqueue_change(vty
, "./lsp/maximum-lifetime/level-1",
777 if (!level
|| strmatch(level
, "level-2"))
778 nb_cli_enqueue_change(vty
, "./lsp/maximum-lifetime/level-2",
781 return nb_cli_apply_changes(vty
, NULL
);
784 void cli_show_isis_lsp_max_lifetime(struct vty
*vty
, struct lyd_node
*dnode
,
787 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
788 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
790 if (strmatch(l1
, l2
))
791 vty_out(vty
, " max-lsp-lifetime %s\n", l1
);
793 vty_out(vty
, " max-lsp-lifetime level-1 %s\n", l1
);
794 vty_out(vty
, " max-lsp-lifetime level-2 %s\n", l2
);
799 * XPath: /frr-isisd:isis/instance/lsp/mtu
801 DEFPY(area_lsp_mtu
, area_lsp_mtu_cmd
, "lsp-mtu (128-4352)$val",
802 "Configure the maximum size of generated LSPs\n"
803 "Maximum size of generated LSPs\n")
805 nb_cli_enqueue_change(vty
, "./lsp/mtu", NB_OP_MODIFY
, val_str
);
807 return nb_cli_apply_changes(vty
, NULL
);
810 DEFPY(no_area_lsp_mtu
, no_area_lsp_mtu_cmd
, "no lsp-mtu [(128-4352)]",
812 "Configure the maximum size of generated LSPs\n"
813 "Maximum size of generated LSPs\n")
815 nb_cli_enqueue_change(vty
, "./lsp/mtu", NB_OP_MODIFY
, NULL
);
817 return nb_cli_apply_changes(vty
, NULL
);
820 void cli_show_isis_lsp_mtu(struct vty
*vty
, struct lyd_node
*dnode
,
823 vty_out(vty
, " lsp-mtu %s\n", yang_dnode_get_string(dnode
, NULL
));
827 * XPath: /frr-isisd:isis/instance/spf/minimum-interval
829 DEFPY(spf_interval
, spf_interval_cmd
,
830 "spf-interval [level-1|level-2]$level (1-120)$val",
831 "Minimum interval between SPF calculations\n"
832 "Set interval for level 1 only\n"
833 "Set interval for level 2 only\n"
834 "Minimum interval between consecutive SPFs in seconds\n")
836 if (!level
|| strmatch(level
, "level-1"))
837 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-1",
838 NB_OP_MODIFY
, val_str
);
839 if (!level
|| strmatch(level
, "level-2"))
840 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-2",
841 NB_OP_MODIFY
, val_str
);
843 return nb_cli_apply_changes(vty
, NULL
);
846 DEFPY(no_spf_interval
, no_spf_interval_cmd
,
847 "no spf-interval [level-1|level-2]$level [(1-120)]",
849 "Minimum interval between SPF calculations\n"
850 "Set interval for level 1 only\n"
851 "Set interval for level 2 only\n"
852 "Minimum interval between consecutive SPFs in seconds\n")
854 if (!level
|| strmatch(level
, "level-1"))
855 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-1",
857 if (!level
|| strmatch(level
, "level-2"))
858 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-2",
861 return nb_cli_apply_changes(vty
, NULL
);
864 void cli_show_isis_spf_min_interval(struct vty
*vty
, struct lyd_node
*dnode
,
867 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
868 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
870 if (strmatch(l1
, l2
))
871 vty_out(vty
, " spf-interval %s\n", l1
);
873 vty_out(vty
, " spf-interval level-1 %s\n", l1
);
874 vty_out(vty
, " spf-interval level-2 %s\n", l2
);
879 * XPath: /frr-isisd:isis/instance/spf/ietf-backoff-delay
881 DEFPY(spf_delay_ietf
, spf_delay_ietf_cmd
,
882 "spf-delay-ietf init-delay (0-60000) short-delay (0-60000) long-delay (0-60000) holddown (0-60000) time-to-learn (0-60000)",
883 "IETF SPF delay algorithm\n"
884 "Delay used while in QUIET state\n"
885 "Delay used while in QUIET state in milliseconds\n"
886 "Delay used while in SHORT_WAIT state\n"
887 "Delay used while in SHORT_WAIT state in milliseconds\n"
888 "Delay used while in LONG_WAIT\n"
889 "Delay used while in LONG_WAIT state in milliseconds\n"
890 "Time with no received IGP events before considering IGP stable\n"
891 "Time with no received IGP events before considering IGP stable (in milliseconds)\n"
892 "Maximum duration needed to learn all the events related to a single failure\n"
893 "Maximum duration needed to learn all the events related to a single failure (in milliseconds)\n")
895 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay", NB_OP_CREATE
,
897 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/init-delay",
898 NB_OP_MODIFY
, init_delay_str
);
899 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/short-delay",
900 NB_OP_MODIFY
, short_delay_str
);
901 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/long-delay",
902 NB_OP_MODIFY
, long_delay_str
);
903 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/hold-down",
904 NB_OP_MODIFY
, holddown_str
);
905 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/time-to-learn",
906 NB_OP_MODIFY
, time_to_learn_str
);
908 return nb_cli_apply_changes(vty
, NULL
);
911 DEFPY(no_spf_delay_ietf
, no_spf_delay_ietf_cmd
,
912 "no spf-delay-ietf [init-delay (0-60000) short-delay (0-60000) long-delay (0-60000) holddown (0-60000) time-to-learn (0-60000)]",
914 "IETF SPF delay algorithm\n"
915 "Delay used while in QUIET state\n"
916 "Delay used while in QUIET state in milliseconds\n"
917 "Delay used while in SHORT_WAIT state\n"
918 "Delay used while in SHORT_WAIT state in milliseconds\n"
919 "Delay used while in LONG_WAIT\n"
920 "Delay used while in LONG_WAIT state in milliseconds\n"
921 "Time with no received IGP events before considering IGP stable\n"
922 "Time with no received IGP events before considering IGP stable (in milliseconds)\n"
923 "Maximum duration needed to learn all the events related to a single failure\n"
924 "Maximum duration needed to learn all the events related to a single failure (in milliseconds)\n")
926 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay", NB_OP_DESTROY
,
929 return nb_cli_apply_changes(vty
, NULL
);
932 void cli_show_isis_spf_ietf_backoff(struct vty
*vty
, struct lyd_node
*dnode
,
936 " spf-delay-ietf init-delay %s short-delay %s long-delay %s holddown %s time-to-learn %s\n",
937 yang_dnode_get_string(dnode
, "./init-delay"),
938 yang_dnode_get_string(dnode
, "./short-delay"),
939 yang_dnode_get_string(dnode
, "./long-delay"),
940 yang_dnode_get_string(dnode
, "./hold-down"),
941 yang_dnode_get_string(dnode
, "./time-to-learn"));
945 * XPath: /frr-isisd:isis/instance/purge-originator
947 DEFPY(area_purge_originator
, area_purge_originator_cmd
, "[no] purge-originator",
948 NO_STR
"Use the RFC 6232 purge-originator\n")
950 nb_cli_enqueue_change(vty
, "./purge-originator", NB_OP_MODIFY
,
951 no
? "false" : "true");
953 return nb_cli_apply_changes(vty
, NULL
);
956 void cli_show_isis_purge_origin(struct vty
*vty
, struct lyd_node
*dnode
,
959 if (!yang_dnode_get_bool(dnode
, NULL
))
961 vty_out(vty
, " purge-originator\n");
965 * XPath: /frr-isisd:isis/instance/mpls-te
967 DEFPY(isis_mpls_te_on
, isis_mpls_te_on_cmd
, "mpls-te on",
968 MPLS_TE_STR
"Enable the MPLS-TE functionality\n")
970 nb_cli_enqueue_change(vty
, "./mpls-te", NB_OP_CREATE
,
973 return nb_cli_apply_changes(vty
, NULL
);
976 DEFPY(no_isis_mpls_te_on
, no_isis_mpls_te_on_cmd
, "no mpls-te [on]",
978 "Disable the MPLS-TE functionality\n"
979 "Disable the MPLS-TE functionality\n")
981 nb_cli_enqueue_change(vty
, "./mpls-te", NB_OP_DESTROY
,
984 return nb_cli_apply_changes(vty
, NULL
);
987 void cli_show_isis_mpls_te(struct vty
*vty
, struct lyd_node
*dnode
,
990 vty_out(vty
, " mpls-te on\n");
994 * XPath: /frr-isisd:isis/instance/mpls-te/router-address
996 DEFPY(isis_mpls_te_router_addr
, isis_mpls_te_router_addr_cmd
,
997 "mpls-te router-address A.B.C.D",
999 "Stable IP address of the advertising router\n"
1000 "MPLS-TE router address in IPv4 address format\n")
1002 nb_cli_enqueue_change(vty
, "./mpls-te/router-address",
1003 NB_OP_MODIFY
, router_address_str
);
1005 return nb_cli_apply_changes(vty
, NULL
);
1008 DEFPY(no_isis_mpls_te_router_addr
, no_isis_mpls_te_router_addr_cmd
,
1009 "no mpls-te router-address [A.B.C.D]",
1011 "Delete IP address of the advertising router\n"
1012 "MPLS-TE router address in IPv4 address format\n")
1014 nb_cli_enqueue_change(vty
, "./mpls-te/router-address",
1015 NB_OP_DESTROY
, NULL
);
1017 return nb_cli_apply_changes(vty
, NULL
);
1020 void cli_show_isis_mpls_te_router_addr(struct vty
*vty
, struct lyd_node
*dnode
,
1023 vty_out(vty
, " mpls-te router-address %s\n",
1024 yang_dnode_get_string(dnode
, NULL
));
1027 DEFPY(isis_mpls_te_inter_as
, isis_mpls_te_inter_as_cmd
,
1028 "[no] mpls-te inter-as [level-1|level-1-2|level-2-only]",
1030 "Configure MPLS-TE Inter-AS support\n"
1031 "AREA native mode self originate INTER-AS LSP with L1 only flooding scope\n"
1032 "AREA native mode self originate INTER-AS LSP with L1 and L2 flooding scope\n"
1033 "AS native mode self originate INTER-AS LSP with L2 only flooding scope\n")
1035 vty_out(vty
, "MPLS-TE Inter-AS is not yet supported\n");
1040 * XPath: /frr-isisd:isis/instance/default-information-originate
1042 DEFPY(isis_default_originate
, isis_default_originate_cmd
,
1043 "[no] default-information originate <ipv4|ipv6>$ip"
1044 " <level-1|level-2>$level [always]$always"
1045 " [{metric (0-16777215)$metric|route-map WORD$rmap}]",
1047 "Control distribution of default information\n"
1048 "Distribute a default route\n"
1049 "Distribute default route for IPv4\n"
1050 "Distribute default route for IPv6\n"
1051 "Distribute default route into level-1\n"
1052 "Distribute default route into level-2\n"
1053 "Always advertise default route\n"
1054 "Metric for default route\n"
1055 "ISIS default metric\n"
1056 "Route map reference\n"
1057 "Pointer to route-map entries\n")
1060 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1062 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1063 nb_cli_enqueue_change(vty
, "./always", NB_OP_MODIFY
,
1064 always
? "true" : "false");
1065 nb_cli_enqueue_change(vty
, "./route-map",
1066 rmap
? NB_OP_MODIFY
: NB_OP_DESTROY
,
1067 rmap
? rmap
: NULL
);
1068 nb_cli_enqueue_change(vty
, "./metric", NB_OP_MODIFY
,
1069 metric_str
? metric_str
: NULL
);
1070 if (strmatch(ip
, "ipv6") && !always
) {
1072 "Zebra doesn't implement default-originate for IPv6 yet\n");
1074 "so use with care or use default-originate always.\n");
1078 return nb_cli_apply_changes(
1079 vty
, "./default-information-originate/%s[level='%s']", ip
,
1083 static void vty_print_def_origin(struct vty
*vty
, struct lyd_node
*dnode
,
1084 const char *family
, const char *level
,
1087 vty_out(vty
, " default-information originate %s %s", family
, level
);
1088 if (yang_dnode_get_bool(dnode
, "./always"))
1089 vty_out(vty
, " always");
1091 if (yang_dnode_exists(dnode
, "./route-map"))
1092 vty_out(vty
, " route-map %s",
1093 yang_dnode_get_string(dnode
, "./route-map"));
1094 if (show_defaults
|| !yang_dnode_is_default(dnode
, "./metric"))
1095 vty_out(vty
, " metric %s",
1096 yang_dnode_get_string(dnode
, "./metric"));
1101 void cli_show_isis_def_origin_ipv4(struct vty
*vty
, struct lyd_node
*dnode
,
1104 const char *level
= yang_dnode_get_string(dnode
, "./level");
1106 vty_print_def_origin(vty
, dnode
, "ipv4", level
, show_defaults
);
1109 void cli_show_isis_def_origin_ipv6(struct vty
*vty
, struct lyd_node
*dnode
,
1112 const char *level
= yang_dnode_get_string(dnode
, "./level");
1114 vty_print_def_origin(vty
, dnode
, "ipv6", level
, show_defaults
);
1118 * XPath: /frr-isisd:isis/instance/redistribute
1120 DEFPY(isis_redistribute
, isis_redistribute_cmd
,
1121 "[no] redistribute <ipv4|ipv6>$ip " PROTO_REDIST_STR
1123 " <level-1|level-2>$level"
1124 " [{metric (0-16777215)|route-map WORD}]",
1126 "Redistribute IPv4 routes\n"
1127 "Redistribute IPv6 routes\n" PROTO_REDIST_HELP
1128 "Redistribute into level-1\n"
1129 "Redistribute into level-2\n"
1130 "Metric for redistributed routes\n"
1131 "ISIS default metric\n"
1132 "Route map reference\n"
1133 "Pointer to route-map entries\n")
1136 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1138 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1139 nb_cli_enqueue_change(vty
, "./route-map",
1140 route_map
? NB_OP_MODIFY
: NB_OP_DESTROY
,
1141 route_map
? route_map
: NULL
);
1142 nb_cli_enqueue_change(vty
, "./metric", NB_OP_MODIFY
,
1143 metric_str
? metric_str
: NULL
);
1146 return nb_cli_apply_changes(
1147 vty
, "./redistribute/%s[protocol='%s'][level='%s']", ip
, proto
,
1151 static void vty_print_redistribute(struct vty
*vty
, struct lyd_node
*dnode
,
1152 bool show_defaults
, const char *family
)
1154 const char *level
= yang_dnode_get_string(dnode
, "./level");
1155 const char *protocol
= yang_dnode_get_string(dnode
, "./protocol");
1157 vty_out(vty
, " redistribute %s %s %s", family
, protocol
, level
);
1158 if (show_defaults
|| !yang_dnode_is_default(dnode
, "./metric"))
1159 vty_out(vty
, " metric %s",
1160 yang_dnode_get_string(dnode
, "./metric"));
1161 if (yang_dnode_exists(dnode
, "./route-map"))
1162 vty_out(vty
, " route-map %s",
1163 yang_dnode_get_string(dnode
, "./route-map"));
1167 void cli_show_isis_redistribute_ipv4(struct vty
*vty
, struct lyd_node
*dnode
,
1170 vty_print_redistribute(vty
, dnode
, show_defaults
, "ipv4");
1172 void cli_show_isis_redistribute_ipv6(struct vty
*vty
, struct lyd_node
*dnode
,
1175 vty_print_redistribute(vty
, dnode
, show_defaults
, "ipv6");
1179 * XPath: /frr-isisd:isis/instance/multi-topology
1181 DEFPY(isis_topology
, isis_topology_cmd
,
1189 "|ipv6-dstsrc>$topology "
1190 "[overload]$overload",
1192 "Configure IS-IS topologies\n"
1193 "IPv4 unicast topology\n"
1194 "IPv4 management topology\n"
1195 "IPv6 unicast topology\n"
1196 "IPv4 multicast topology\n"
1197 "IPv6 multicast topology\n"
1198 "IPv6 management topology\n"
1199 "IPv6 dst-src topology\n"
1200 "Set overload bit for topology\n")
1202 char base_xpath
[XPATH_MAXLEN
];
1204 /* Since IPv4-unicast is not configurable it is not present in the
1205 * YANG model, so we need to validate it here
1207 if (strmatch(topology
, "ipv4-unicast")) {
1208 vty_out(vty
, "Cannot configure IPv4 unicast topology\n");
1209 return CMD_WARNING_CONFIG_FAILED
;
1212 if (strmatch(topology
, "ipv4-mgmt"))
1213 snprintf(base_xpath
, XPATH_MAXLEN
,
1214 "./multi-topology/ipv4-management");
1215 else if (strmatch(topology
, "ipv6-mgmt"))
1216 snprintf(base_xpath
, XPATH_MAXLEN
,
1217 "./multi-topology/ipv6-management");
1219 snprintf(base_xpath
, XPATH_MAXLEN
, "./multi-topology/%s",
1223 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1225 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1226 nb_cli_enqueue_change(vty
, "./overload", NB_OP_MODIFY
,
1227 overload
? "true" : "false");
1230 return nb_cli_apply_changes(vty
, base_xpath
);
1233 void cli_show_isis_mt_ipv4_multicast(struct vty
*vty
, struct lyd_node
*dnode
,
1236 vty_out(vty
, " topology ipv4-multicast");
1237 if (yang_dnode_get_bool(dnode
, "./overload"))
1238 vty_out(vty
, " overload");
1242 void cli_show_isis_mt_ipv4_mgmt(struct vty
*vty
, struct lyd_node
*dnode
,
1245 vty_out(vty
, " topology ipv4-mgmt");
1246 if (yang_dnode_get_bool(dnode
, "./overload"))
1247 vty_out(vty
, " overload");
1251 void cli_show_isis_mt_ipv6_unicast(struct vty
*vty
, struct lyd_node
*dnode
,
1254 vty_out(vty
, " topology ipv6-unicast");
1255 if (yang_dnode_get_bool(dnode
, "./overload"))
1256 vty_out(vty
, " overload");
1260 void cli_show_isis_mt_ipv6_multicast(struct vty
*vty
, struct lyd_node
*dnode
,
1263 vty_out(vty
, " topology ipv6-multicast");
1264 if (yang_dnode_get_bool(dnode
, "./overload"))
1265 vty_out(vty
, " overload");
1269 void cli_show_isis_mt_ipv6_mgmt(struct vty
*vty
, struct lyd_node
*dnode
,
1272 vty_out(vty
, " topology ipv6-mgmt");
1273 if (yang_dnode_get_bool(dnode
, "./overload"))
1274 vty_out(vty
, " overload");
1278 void cli_show_isis_mt_ipv6_dstsrc(struct vty
*vty
, struct lyd_node
*dnode
,
1281 vty_out(vty
, " topology ipv6-dstsrc");
1282 if (yang_dnode_get_bool(dnode
, "./overload"))
1283 vty_out(vty
, " overload");
1288 * XPath: /frr-interface:lib/interface/frr-isisd:isis/passive
1290 DEFPY(isis_passive
, isis_passive_cmd
, "[no] isis passive",
1292 "IS-IS routing protocol\n"
1293 "Configure the passive mode for interface\n")
1295 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/passive", NB_OP_MODIFY
,
1296 no
? "false" : "true");
1298 return nb_cli_apply_changes(vty
, NULL
);
1301 void cli_show_ip_isis_passive(struct vty
*vty
, struct lyd_node
*dnode
,
1304 if (!yang_dnode_get_bool(dnode
, NULL
))
1305 vty_out(vty
, " no");
1306 vty_out(vty
, " isis passive\n");
1310 * XPath: /frr-interface:lib/interface/frr-isisd:isis/password
1313 DEFPY(isis_passwd
, isis_passwd_cmd
, "isis password <md5|clear>$type WORD$pwd",
1314 "IS-IS routing protocol\n"
1315 "Configure the authentication password for a circuit\n"
1316 "HMAC-MD5 authentication\n"
1317 "Cleartext password\n"
1318 "Circuit password\n")
1320 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password", NB_OP_CREATE
,
1322 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password/password",
1324 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password/password-type",
1325 NB_OP_MODIFY
, type
);
1327 return nb_cli_apply_changes(vty
, NULL
);
1330 DEFPY(no_isis_passwd
, no_isis_passwd_cmd
, "no isis password [<md5|clear> WORD]",
1332 "IS-IS routing protocol\n"
1333 "Configure the authentication password for a circuit\n"
1334 "HMAC-MD5 authentication\n"
1335 "Cleartext password\n"
1336 "Circuit password\n")
1338 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password", NB_OP_DESTROY
,
1341 return nb_cli_apply_changes(vty
, NULL
);
1344 void cli_show_ip_isis_password(struct vty
*vty
, struct lyd_node
*dnode
,
1347 vty_out(vty
, " isis password %s %s\n",
1348 yang_dnode_get_string(dnode
, "./password-type"),
1349 yang_dnode_get_string(dnode
, "./password"));
1353 * XPath: /frr-interface:lib/interface/frr-isisd:isis/metric
1355 DEFPY(isis_metric
, isis_metric_cmd
,
1356 "isis metric [level-1|level-2]$level (0-16777215)$met",
1357 "IS-IS routing protocol\n"
1358 "Set default metric for circuit\n"
1359 "Specify metric for level-1 routing\n"
1360 "Specify metric for level-2 routing\n"
1361 "Default metric value\n")
1363 if (!level
|| strmatch(level
, "level-1"))
1364 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-1",
1365 NB_OP_MODIFY
, met_str
);
1366 if (!level
|| strmatch(level
, "level-2"))
1367 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-2",
1368 NB_OP_MODIFY
, met_str
);
1370 return nb_cli_apply_changes(vty
, NULL
);
1373 DEFPY(no_isis_metric
, no_isis_metric_cmd
,
1374 "no isis metric [level-1|level-2]$level [(0-16777215)]",
1376 "IS-IS routing protocol\n"
1377 "Set default metric for circuit\n"
1378 "Specify metric for level-1 routing\n"
1379 "Specify metric for level-2 routing\n"
1380 "Default metric value\n")
1382 if (!level
|| strmatch(level
, "level-1"))
1383 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-1",
1384 NB_OP_MODIFY
, NULL
);
1385 if (!level
|| strmatch(level
, "level-2"))
1386 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-2",
1387 NB_OP_MODIFY
, NULL
);
1389 return nb_cli_apply_changes(vty
, NULL
);
1392 void cli_show_ip_isis_metric(struct vty
*vty
, struct lyd_node
*dnode
,
1395 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
1396 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
1398 if (strmatch(l1
, l2
))
1399 vty_out(vty
, " isis metric %s\n", l1
);
1401 vty_out(vty
, " isis metric %s level-1\n", l1
);
1402 vty_out(vty
, " isis metric %s level-2\n", l2
);
1407 * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/interval
1409 DEFPY(isis_hello_interval
, isis_hello_interval_cmd
,
1410 "isis hello-interval [level-1|level-2]$level (1-600)$intv",
1411 "IS-IS routing protocol\n"
1412 "Set Hello interval\n"
1413 "Specify hello-interval for level-1 IIHs\n"
1414 "Specify hello-interval for level-2 IIHs\n"
1415 "Holdtime 1 seconds, interval depends on multiplier\n")
1417 if (!level
|| strmatch(level
, "level-1"))
1418 nb_cli_enqueue_change(vty
,
1419 "./frr-isisd:isis/hello/interval/level-1",
1420 NB_OP_MODIFY
, intv_str
);
1421 if (!level
|| strmatch(level
, "level-2"))
1422 nb_cli_enqueue_change(vty
,
1423 "./frr-isisd:isis/hello/interval/level-2",
1424 NB_OP_MODIFY
, intv_str
);
1426 return nb_cli_apply_changes(vty
, NULL
);
1429 DEFPY(no_isis_hello_interval
, no_isis_hello_interval_cmd
,
1430 "no isis hello-interval [level-1|level-2]$level [(1-600)]",
1432 "IS-IS routing protocol\n"
1433 "Set Hello interval\n"
1434 "Specify hello-interval for level-1 IIHs\n"
1435 "Specify hello-interval for level-2 IIHs\n"
1436 "Holdtime 1 second, interval depends on multiplier\n")
1438 if (!level
|| strmatch(level
, "level-1"))
1439 nb_cli_enqueue_change(vty
,
1440 "./frr-isisd:isis/hello/interval/level-1",
1441 NB_OP_MODIFY
, NULL
);
1442 if (!level
|| strmatch(level
, "level-2"))
1443 nb_cli_enqueue_change(vty
,
1444 "./frr-isisd:isis/hello/interval/level-2",
1445 NB_OP_MODIFY
, NULL
);
1447 return nb_cli_apply_changes(vty
, NULL
);
1450 void cli_show_ip_isis_hello_interval(struct vty
*vty
, struct lyd_node
*dnode
,
1453 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
1454 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
1456 if (strmatch(l1
, l2
))
1457 vty_out(vty
, " isis hello-interval %s\n", l1
);
1459 vty_out(vty
, " isis hello-interval %s level-1\n", l1
);
1460 vty_out(vty
, " isis hello-interval %s level-2\n", l2
);
1465 * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/multiplier
1467 DEFPY(isis_hello_multiplier
, isis_hello_multiplier_cmd
,
1468 "isis hello-multiplier [level-1|level-2]$level (2-100)$mult",
1469 "IS-IS routing protocol\n"
1470 "Set multiplier for Hello holding time\n"
1471 "Specify hello multiplier for level-1 IIHs\n"
1472 "Specify hello multiplier for level-2 IIHs\n"
1473 "Hello multiplier value\n")
1475 if (!level
|| strmatch(level
, "level-1"))
1476 nb_cli_enqueue_change(
1477 vty
, "./frr-isisd:isis/hello/multiplier/level-1",
1478 NB_OP_MODIFY
, mult_str
);
1479 if (!level
|| strmatch(level
, "level-2"))
1480 nb_cli_enqueue_change(
1481 vty
, "./frr-isisd:isis/hello/multiplier/level-2",
1482 NB_OP_MODIFY
, mult_str
);
1484 return nb_cli_apply_changes(vty
, NULL
);
1487 DEFPY(no_isis_hello_multiplier
, no_isis_hello_multiplier_cmd
,
1488 "no isis hello-multiplier [level-1|level-2]$level [(2-100)]",
1490 "IS-IS routing protocol\n"
1491 "Set multiplier for Hello holding time\n"
1492 "Specify hello multiplier for level-1 IIHs\n"
1493 "Specify hello multiplier for level-2 IIHs\n"
1494 "Hello multiplier value\n")
1496 if (!level
|| strmatch(level
, "level-1"))
1497 nb_cli_enqueue_change(
1498 vty
, "./frr-isisd:isis/hello/multiplier/level-1",
1499 NB_OP_MODIFY
, NULL
);
1500 if (!level
|| strmatch(level
, "level-2"))
1501 nb_cli_enqueue_change(
1502 vty
, "./frr-isisd:isis/hello/multiplier/level-2",
1503 NB_OP_MODIFY
, NULL
);
1505 return nb_cli_apply_changes(vty
, NULL
);
1508 void cli_show_ip_isis_hello_multi(struct vty
*vty
, struct lyd_node
*dnode
,
1511 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
1512 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
1514 if (strmatch(l1
, l2
))
1515 vty_out(vty
, " isis hello-multiplier %s\n", l1
);
1517 vty_out(vty
, " isis hello-multiplier %s level-1\n", l1
);
1518 vty_out(vty
, " isis hello-multiplier %s level-2\n", l2
);
1524 * /frr-interface:lib/interface/frr-isisd:isis/disable-three-way-handshake
1526 DEFPY(isis_threeway_adj
, isis_threeway_adj_cmd
, "[no] isis three-way-handshake",
1529 "Enable/Disable three-way handshake\n")
1531 nb_cli_enqueue_change(vty
,
1532 "./frr-isisd:isis/disable-three-way-handshake",
1533 NB_OP_MODIFY
, no
? "true" : "false");
1535 return nb_cli_apply_changes(vty
, NULL
);
1538 void cli_show_ip_isis_threeway_shake(struct vty
*vty
, struct lyd_node
*dnode
,
1541 if (yang_dnode_get_bool(dnode
, NULL
))
1542 vty_out(vty
, " no");
1543 vty_out(vty
, " isis three-way-handshake\n");
1547 * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/padding
1549 DEFPY(isis_hello_padding
, isis_hello_padding_cmd
, "[no] isis hello padding",
1551 "IS-IS routing protocol\n"
1552 "Add padding to IS-IS hello packets\n"
1553 "Pad hello packets\n")
1555 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/hello/padding",
1556 NB_OP_MODIFY
, no
? "false" : "true");
1558 return nb_cli_apply_changes(vty
, NULL
);
1561 void cli_show_ip_isis_hello_padding(struct vty
*vty
, struct lyd_node
*dnode
,
1564 if (!yang_dnode_get_bool(dnode
, NULL
))
1565 vty_out(vty
, " no");
1567 vty_out(vty
, " isis hello padding\n");
1571 * XPath: /frr-interface:lib/interface/frr-isisd:isis/csnp-interval
1573 DEFPY(csnp_interval
, csnp_interval_cmd
,
1574 "isis csnp-interval (1-600)$intv [level-1|level-2]$level",
1575 "IS-IS routing protocol\n"
1576 "Set CSNP interval in seconds\n"
1577 "CSNP interval value\n"
1578 "Specify interval for level-1 CSNPs\n"
1579 "Specify interval for level-2 CSNPs\n")
1581 if (!level
|| strmatch(level
, "level-1"))
1582 nb_cli_enqueue_change(vty
,
1583 "./frr-isisd:isis/csnp-interval/level-1",
1584 NB_OP_MODIFY
, intv_str
);
1585 if (!level
|| strmatch(level
, "level-2"))
1586 nb_cli_enqueue_change(vty
,
1587 "./frr-isisd:isis/csnp-interval/level-2",
1588 NB_OP_MODIFY
, intv_str
);
1590 return nb_cli_apply_changes(vty
, NULL
);
1593 DEFPY(no_csnp_interval
, no_csnp_interval_cmd
,
1594 "no isis csnp-interval [(1-600)] [level-1|level-2]$level",
1596 "IS-IS routing protocol\n"
1597 "Set CSNP interval in seconds\n"
1598 "CSNP interval value\n"
1599 "Specify interval for level-1 CSNPs\n"
1600 "Specify interval for level-2 CSNPs\n")
1602 if (!level
|| strmatch(level
, "level-1"))
1603 nb_cli_enqueue_change(vty
,
1604 "./frr-isisd:isis/csnp-interval/level-1",
1605 NB_OP_MODIFY
, NULL
);
1606 if (!level
|| strmatch(level
, "level-2"))
1607 nb_cli_enqueue_change(vty
,
1608 "./frr-isisd:isis/csnp-interval/level-2",
1609 NB_OP_MODIFY
, NULL
);
1611 return nb_cli_apply_changes(vty
, NULL
);
1614 void cli_show_ip_isis_csnp_interval(struct vty
*vty
, struct lyd_node
*dnode
,
1617 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
1618 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
1620 if (strmatch(l1
, l2
))
1621 vty_out(vty
, " isis csnp-interval %s\n", l1
);
1623 vty_out(vty
, " isis csnp-interval %s level-1\n", l1
);
1624 vty_out(vty
, " isis csnp-interval %s level-2\n", l2
);
1629 * XPath: /frr-interface:lib/interface/frr-isisd:isis/psnp-interval
1631 DEFPY(psnp_interval
, psnp_interval_cmd
,
1632 "isis psnp-interval (1-120)$intv [level-1|level-2]$level",
1633 "IS-IS routing protocol\n"
1634 "Set PSNP interval in seconds\n"
1635 "PSNP interval value\n"
1636 "Specify interval for level-1 PSNPs\n"
1637 "Specify interval for level-2 PSNPs\n")
1639 if (!level
|| strmatch(level
, "level-1"))
1640 nb_cli_enqueue_change(vty
,
1641 "./frr-isisd:isis/psnp-interval/level-1",
1642 NB_OP_MODIFY
, intv_str
);
1643 if (!level
|| strmatch(level
, "level-2"))
1644 nb_cli_enqueue_change(vty
,
1645 "./frr-isisd:isis/psnp-interval/level-2",
1646 NB_OP_MODIFY
, intv_str
);
1648 return nb_cli_apply_changes(vty
, NULL
);
1651 DEFPY(no_psnp_interval
, no_psnp_interval_cmd
,
1652 "no isis psnp-interval [(1-120)] [level-1|level-2]$level",
1654 "IS-IS routing protocol\n"
1655 "Set PSNP interval in seconds\n"
1656 "PSNP interval value\n"
1657 "Specify interval for level-1 PSNPs\n"
1658 "Specify interval for level-2 PSNPs\n")
1660 if (!level
|| strmatch(level
, "level-1"))
1661 nb_cli_enqueue_change(vty
,
1662 "./frr-isisd:isis/psnp-interval/level-1",
1663 NB_OP_MODIFY
, NULL
);
1664 if (!level
|| strmatch(level
, "level-2"))
1665 nb_cli_enqueue_change(vty
,
1666 "./frr-isisd:isis/psnp-interval/level-2",
1667 NB_OP_MODIFY
, NULL
);
1669 return nb_cli_apply_changes(vty
, NULL
);
1672 void cli_show_ip_isis_psnp_interval(struct vty
*vty
, struct lyd_node
*dnode
,
1675 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
1676 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
1678 if (strmatch(l1
, l2
))
1679 vty_out(vty
, " isis psnp-interval %s\n", l1
);
1681 vty_out(vty
, " isis psnp-interval %s level-1\n", l1
);
1682 vty_out(vty
, " isis psnp-interval %s level-2\n", l2
);
1687 * XPath: /frr-interface:lib/interface/frr-isisd:isis/multi-topology
1689 DEFPY(circuit_topology
, circuit_topology_cmd
,
1690 "[no] isis topology"
1700 "IS-IS routing protocol\n"
1701 "Configure interface IS-IS topologies\n"
1702 "IPv4 unicast topology\n"
1703 "IPv4 management topology\n"
1704 "IPv6 unicast topology\n"
1705 "IPv4 multicast topology\n"
1706 "IPv6 multicast topology\n"
1707 "IPv6 management topology\n"
1708 "IPv6 dst-src topology\n")
1710 nb_cli_enqueue_change(vty
, ".", NB_OP_MODIFY
, no
? "false" : "true");
1712 if (strmatch(topology
, "ipv4-mgmt"))
1713 return nb_cli_apply_changes(
1714 vty
, "./frr-isisd:isis/multi-topology/ipv4-management");
1715 else if (strmatch(topology
, "ipv6-mgmt"))
1716 return nb_cli_apply_changes(
1717 vty
, "./frr-isisd:isis/multi-topology/ipv6-management");
1719 return nb_cli_apply_changes(
1720 vty
, "./frr-isisd:isis/multi-topology/%s", topology
);
1723 void cli_show_ip_isis_mt_ipv4_unicast(struct vty
*vty
, struct lyd_node
*dnode
,
1726 if (!yang_dnode_get_bool(dnode
, NULL
))
1727 vty_out(vty
, " no");
1728 vty_out(vty
, " isis topology ipv4-unicast\n");
1731 void cli_show_ip_isis_mt_ipv4_multicast(struct vty
*vty
, struct lyd_node
*dnode
,
1734 if (!yang_dnode_get_bool(dnode
, NULL
))
1735 vty_out(vty
, " no");
1736 vty_out(vty
, " isis topology ipv4-multicast\n");
1739 void cli_show_ip_isis_mt_ipv4_mgmt(struct vty
*vty
, struct lyd_node
*dnode
,
1742 if (!yang_dnode_get_bool(dnode
, NULL
))
1743 vty_out(vty
, " no");
1744 vty_out(vty
, " isis topology ipv4-mgmt\n");
1747 void cli_show_ip_isis_mt_ipv6_unicast(struct vty
*vty
, struct lyd_node
*dnode
,
1750 if (!yang_dnode_get_bool(dnode
, NULL
))
1751 vty_out(vty
, " no");
1752 vty_out(vty
, " isis topology ipv6-unicast\n");
1755 void cli_show_ip_isis_mt_ipv6_multicast(struct vty
*vty
, struct lyd_node
*dnode
,
1758 if (!yang_dnode_get_bool(dnode
, NULL
))
1759 vty_out(vty
, " no");
1760 vty_out(vty
, " isis topology ipv6-multicast\n");
1763 void cli_show_ip_isis_mt_ipv6_mgmt(struct vty
*vty
, struct lyd_node
*dnode
,
1766 if (!yang_dnode_get_bool(dnode
, NULL
))
1767 vty_out(vty
, " no");
1768 vty_out(vty
, " isis topology ipv6-mgmt\n");
1771 void cli_show_ip_isis_mt_ipv6_dstsrc(struct vty
*vty
, struct lyd_node
*dnode
,
1774 if (!yang_dnode_get_bool(dnode
, NULL
))
1775 vty_out(vty
, " no");
1776 vty_out(vty
, " isis topology ipv6-dstsrc\n");
1780 * XPath: /frr-interface:lib/interface/frr-isisd:isis/circuit-type
1782 DEFPY(isis_circuit_type
, isis_circuit_type_cmd
,
1783 "isis circuit-type <level-1|level-1-2|level-2-only>$type",
1784 "IS-IS routing protocol\n"
1785 "Configure circuit type for interface\n"
1786 "Level-1 only adjacencies are formed\n"
1787 "Level-1-2 adjacencies are formed\n"
1788 "Level-2 only adjacencies are formed\n")
1790 nb_cli_enqueue_change(
1791 vty
, "./frr-isisd:isis/circuit-type", NB_OP_MODIFY
,
1792 strmatch(type
, "level-2-only") ? "level-2" : type
);
1794 return nb_cli_apply_changes(vty
, NULL
);
1797 DEFPY(no_isis_circuit_type
, no_isis_circuit_type_cmd
,
1798 "no isis circuit-type [level-1|level-1-2|level-2-only]",
1800 "IS-IS routing protocol\n"
1801 "Configure circuit type for interface\n"
1802 "Level-1 only adjacencies are formed\n"
1803 "Level-1-2 adjacencies are formed\n"
1804 "Level-2 only adjacencies are formed\n")
1806 struct interface
*ifp
;
1807 struct isis_circuit
*circuit
;
1809 const char *circ_type
;
1812 * Default value depends on whether the circuit is part of an area,
1813 * and the is-type of the area if there is one. So we need to do this
1816 ifp
= nb_running_get_entry(NULL
, VTY_CURR_XPATH
, false);
1820 circuit
= circuit_scan_by_ifp(ifp
);
1824 if (circuit
->state
== C_STATE_UP
)
1825 is_type
= circuit
->area
->is_type
;
1831 circ_type
= "level-1";
1834 circ_type
= "level-2";
1836 case IS_LEVEL_1_AND_2
:
1837 circ_type
= "level-1-2";
1840 return CMD_ERR_NO_MATCH
;
1842 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/circuit-type",
1843 NB_OP_MODIFY
, circ_type
);
1845 return nb_cli_apply_changes(vty
, NULL
);
1848 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/circuit-type",
1849 NB_OP_MODIFY
, NULL
);
1851 return nb_cli_apply_changes(vty
, NULL
);
1854 void cli_show_ip_isis_circ_type(struct vty
*vty
, struct lyd_node
*dnode
,
1857 int level
= yang_dnode_get_enum(dnode
, NULL
);
1861 vty_out(vty
, " isis circuit-type level-1\n");
1864 vty_out(vty
, " isis circuit-type level-2-only\n");
1866 case IS_LEVEL_1_AND_2
:
1867 vty_out(vty
, " isis circuit-type level-1-2\n");
1873 * XPath: /frr-interface:lib/interface/frr-isisd:isis/network-type
1875 DEFPY(isis_network
, isis_network_cmd
, "[no] isis network point-to-point",
1877 "IS-IS routing protocol\n"
1878 "Set network type\n"
1879 "point-to-point network type\n")
1881 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/network-type",
1883 no
? "broadcast" : "point-to-point");
1885 return nb_cli_apply_changes(vty
, NULL
);
1888 void cli_show_ip_isis_network_type(struct vty
*vty
, struct lyd_node
*dnode
,
1891 if (yang_dnode_get_enum(dnode
, NULL
) != CIRCUIT_T_P2P
)
1892 vty_out(vty
, " no");
1894 vty_out(vty
, " isis network point-to-point\n");
1898 * XPath: /frr-interface:lib/interface/frr-isisd:isis/priority
1900 DEFPY(isis_priority
, isis_priority_cmd
,
1901 "isis priority (0-127)$prio [level-1|level-2]$level",
1902 "IS-IS routing protocol\n"
1903 "Set priority for Designated Router election\n"
1905 "Specify priority for level-1 routing\n"
1906 "Specify priority for level-2 routing\n")
1908 if (!level
|| strmatch(level
, "level-1"))
1909 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-1",
1910 NB_OP_MODIFY
, prio_str
);
1911 if (!level
|| strmatch(level
, "level-2"))
1912 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-2",
1913 NB_OP_MODIFY
, prio_str
);
1915 return nb_cli_apply_changes(vty
, NULL
);
1918 DEFPY(no_isis_priority
, no_isis_priority_cmd
,
1919 "no isis priority [(0-127)] [level-1|level-2]$level",
1921 "IS-IS routing protocol\n"
1922 "Set priority for Designated Router election\n"
1924 "Specify priority for level-1 routing\n"
1925 "Specify priority for level-2 routing\n")
1927 if (!level
|| strmatch(level
, "level-1"))
1928 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-1",
1929 NB_OP_MODIFY
, NULL
);
1930 if (!level
|| strmatch(level
, "level-2"))
1931 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-2",
1932 NB_OP_MODIFY
, NULL
);
1934 return nb_cli_apply_changes(vty
, NULL
);
1937 void cli_show_ip_isis_priority(struct vty
*vty
, struct lyd_node
*dnode
,
1940 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
1941 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
1943 if (strmatch(l1
, l2
))
1944 vty_out(vty
, " isis priority %s\n", l1
);
1946 vty_out(vty
, " isis priority %s level-1\n", l1
);
1947 vty_out(vty
, " isis priority %s level-2\n", l2
);
1952 * XPath: /frr-isisd:isis/instance/log-adjacency-changes
1954 DEFPY(log_adj_changes
, log_adj_changes_cmd
, "[no] log-adjacency-changes",
1955 NO_STR
"Log changes in adjacency state\n")
1957 nb_cli_enqueue_change(vty
, "./log-adjacency-changes", NB_OP_MODIFY
,
1958 no
? "false" : "true");
1960 return nb_cli_apply_changes(vty
, NULL
);
1963 void cli_show_isis_log_adjacency(struct vty
*vty
, struct lyd_node
*dnode
,
1966 if (!yang_dnode_get_bool(dnode
, NULL
))
1967 vty_out(vty
, " no");
1968 vty_out(vty
, " log-adjacency-changes\n");
1971 void isis_cli_init(void)
1973 install_element(CONFIG_NODE
, &router_isis_cmd
);
1974 install_element(CONFIG_NODE
, &no_router_isis_cmd
);
1976 install_element(INTERFACE_NODE
, &ip_router_isis_cmd
);
1977 install_element(INTERFACE_NODE
, &ip6_router_isis_cmd
);
1978 install_element(INTERFACE_NODE
, &no_ip_router_isis_cmd
);
1979 install_element(INTERFACE_NODE
, &isis_bfd_cmd
);
1981 install_element(ISIS_NODE
, &net_cmd
);
1983 install_element(ISIS_NODE
, &is_type_cmd
);
1984 install_element(ISIS_NODE
, &no_is_type_cmd
);
1986 install_element(ISIS_NODE
, &dynamic_hostname_cmd
);
1988 install_element(ISIS_NODE
, &set_overload_bit_cmd
);
1989 install_element(ISIS_NODE
, &set_attached_bit_cmd
);
1991 install_element(ISIS_NODE
, &metric_style_cmd
);
1992 install_element(ISIS_NODE
, &no_metric_style_cmd
);
1994 install_element(ISIS_NODE
, &area_passwd_cmd
);
1995 install_element(ISIS_NODE
, &domain_passwd_cmd
);
1996 install_element(ISIS_NODE
, &no_area_passwd_cmd
);
1998 install_element(ISIS_NODE
, &lsp_gen_interval_cmd
);
1999 install_element(ISIS_NODE
, &no_lsp_gen_interval_cmd
);
2000 install_element(ISIS_NODE
, &lsp_refresh_interval_cmd
);
2001 install_element(ISIS_NODE
, &no_lsp_refresh_interval_cmd
);
2002 install_element(ISIS_NODE
, &max_lsp_lifetime_cmd
);
2003 install_element(ISIS_NODE
, &no_max_lsp_lifetime_cmd
);
2004 install_element(ISIS_NODE
, &area_lsp_mtu_cmd
);
2005 install_element(ISIS_NODE
, &no_area_lsp_mtu_cmd
);
2007 install_element(ISIS_NODE
, &spf_interval_cmd
);
2008 install_element(ISIS_NODE
, &no_spf_interval_cmd
);
2009 install_element(ISIS_NODE
, &spf_delay_ietf_cmd
);
2010 install_element(ISIS_NODE
, &no_spf_delay_ietf_cmd
);
2012 install_element(ISIS_NODE
, &area_purge_originator_cmd
);
2014 install_element(ISIS_NODE
, &isis_mpls_te_on_cmd
);
2015 install_element(ISIS_NODE
, &no_isis_mpls_te_on_cmd
);
2016 install_element(ISIS_NODE
, &isis_mpls_te_router_addr_cmd
);
2017 install_element(ISIS_NODE
, &no_isis_mpls_te_router_addr_cmd
);
2018 install_element(ISIS_NODE
, &isis_mpls_te_inter_as_cmd
);
2020 install_element(ISIS_NODE
, &isis_default_originate_cmd
);
2021 install_element(ISIS_NODE
, &isis_redistribute_cmd
);
2023 install_element(ISIS_NODE
, &isis_topology_cmd
);
2025 install_element(INTERFACE_NODE
, &isis_passive_cmd
);
2027 install_element(INTERFACE_NODE
, &isis_passwd_cmd
);
2028 install_element(INTERFACE_NODE
, &no_isis_passwd_cmd
);
2030 install_element(INTERFACE_NODE
, &isis_metric_cmd
);
2031 install_element(INTERFACE_NODE
, &no_isis_metric_cmd
);
2033 install_element(INTERFACE_NODE
, &isis_hello_interval_cmd
);
2034 install_element(INTERFACE_NODE
, &no_isis_hello_interval_cmd
);
2036 install_element(INTERFACE_NODE
, &isis_hello_multiplier_cmd
);
2037 install_element(INTERFACE_NODE
, &no_isis_hello_multiplier_cmd
);
2039 install_element(INTERFACE_NODE
, &isis_threeway_adj_cmd
);
2041 install_element(INTERFACE_NODE
, &isis_hello_padding_cmd
);
2043 install_element(INTERFACE_NODE
, &csnp_interval_cmd
);
2044 install_element(INTERFACE_NODE
, &no_csnp_interval_cmd
);
2046 install_element(INTERFACE_NODE
, &psnp_interval_cmd
);
2047 install_element(INTERFACE_NODE
, &no_psnp_interval_cmd
);
2049 install_element(INTERFACE_NODE
, &circuit_topology_cmd
);
2051 install_element(INTERFACE_NODE
, &isis_circuit_type_cmd
);
2052 install_element(INTERFACE_NODE
, &no_isis_circuit_type_cmd
);
2054 install_element(INTERFACE_NODE
, &isis_network_cmd
);
2056 install_element(INTERFACE_NODE
, &isis_priority_cmd
);
2057 install_element(INTERFACE_NODE
, &no_isis_priority_cmd
);
2059 install_element(ISIS_NODE
, &log_adj_changes_cmd
);
2062 #endif /* ifndef FABRICD */