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_cli.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
;
139 const struct lyd_node
*dnode
=
140 yang_dnode_get(running_config
->dnode
, VTY_CURR_XPATH
);
142 /* area will be created if it is not present. make sure the yang model
143 * is synced with FRR and call the appropriate NB cb.
145 area
= isis_area_lookup(tag
);
147 snprintf(temp_xpath
, XPATH_MAXLEN
,
148 "/frr-isisd:isis/instance[area-tag='%s']", tag
);
149 nb_cli_enqueue_change(vty
, temp_xpath
, NB_OP_CREATE
, tag
);
150 snprintf(temp_xpath
, XPATH_MAXLEN
,
151 "/frr-isisd:isis/instance[area-tag='%s']/is-type",
153 nb_cli_enqueue_change(
154 vty
, temp_xpath
, NB_OP_MODIFY
,
155 listcount(isis
->area_list
) == 0 ? "level-1-2" : NULL
);
156 nb_cli_enqueue_change(vty
, "./frr-isisd:isis", NB_OP_CREATE
,
158 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/area-tag",
160 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/ipv4-routing",
161 NB_OP_MODIFY
, "true");
162 nb_cli_enqueue_change(
163 vty
, "./frr-isisd:isis/circuit-type", NB_OP_MODIFY
,
164 listcount(isis
->area_list
) == 0 ? "level-1-2"
167 /* area exists, circuit type defaults to its area's is_type */
168 switch (area
->is_type
) {
170 circ_type
= "level-1";
173 circ_type
= "level-2";
175 case IS_LEVEL_1_AND_2
:
176 circ_type
= "level-1-2";
179 /* just to silence compiler warnings */
180 return CMD_WARNING_CONFIG_FAILED
;
182 nb_cli_enqueue_change(vty
, "./frr-isisd:isis", NB_OP_CREATE
,
184 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/area-tag",
186 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/ipv4-routing",
187 NB_OP_MODIFY
, "true");
188 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/circuit-type",
189 NB_OP_MODIFY
, circ_type
);
192 /* check if the interface is a loopback and if so set it as passive */
193 ifp
= yang_dnode_get_entry(dnode
, false);
194 if (ifp
&& if_is_loopback(ifp
))
195 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/passive",
196 NB_OP_MODIFY
, "true");
198 return nb_cli_apply_changes(vty
, NULL
);
201 DEFPY(ip6_router_isis
, ip6_router_isis_cmd
, "ipv6 router isis WORD$tag",
202 "Interface Internet Protocol config commands\n"
203 "IP router interface commands\n"
204 "IS-IS routing protocol\n"
205 "Routing process tag\n")
207 char temp_xpath
[XPATH_MAXLEN
];
208 const char *circ_type
;
209 struct isis_area
*area
;
210 struct interface
*ifp
;
211 const struct lyd_node
*dnode
=
212 yang_dnode_get(running_config
->dnode
, VTY_CURR_XPATH
);
214 /* area will be created if it is not present. make sure the yang model
215 * is synced with FRR and call the appropriate NB cb.
217 area
= isis_area_lookup(tag
);
219 snprintf(temp_xpath
, XPATH_MAXLEN
,
220 "/frr-isisd:isis/instance[area-tag='%s']", tag
);
221 nb_cli_enqueue_change(vty
, temp_xpath
, NB_OP_CREATE
, tag
);
222 snprintf(temp_xpath
, XPATH_MAXLEN
,
223 "/frr-isisd:isis/instance[area-tag='%s']/is-type",
225 nb_cli_enqueue_change(
226 vty
, temp_xpath
, NB_OP_MODIFY
,
227 listcount(isis
->area_list
) == 0 ? "level-1-2" : NULL
);
228 nb_cli_enqueue_change(vty
, "./frr-isisd:isis", NB_OP_CREATE
,
230 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/area-tag",
232 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/ipv6-routing",
233 NB_OP_MODIFY
, "true");
234 nb_cli_enqueue_change(
235 vty
, "./frr-isisd:isis/circuit-type", NB_OP_MODIFY
,
236 listcount(isis
->area_list
) == 0 ? "level-1-2"
239 /* area exists, circuit type defaults to its area's is_type */
240 switch (area
->is_type
) {
242 circ_type
= "level-1";
245 circ_type
= "level-2";
247 case IS_LEVEL_1_AND_2
:
248 circ_type
= "level-1-2";
251 /* just to silence compiler warnings */
252 return CMD_WARNING_CONFIG_FAILED
;
254 nb_cli_enqueue_change(vty
, "./frr-isisd:isis", NB_OP_CREATE
,
256 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/area-tag",
258 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/ipv6-routing",
259 NB_OP_MODIFY
, "true");
260 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/circuit-type",
261 NB_OP_MODIFY
, circ_type
);
264 /* check if the interface is a loopback and if so set it as passive */
265 ifp
= yang_dnode_get_entry(dnode
, false);
266 if (ifp
&& if_is_loopback(ifp
))
267 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/passive",
268 NB_OP_MODIFY
, "true");
270 return nb_cli_apply_changes(vty
, NULL
);
273 DEFPY(no_ip_router_isis
, no_ip_router_isis_cmd
,
274 "no <ip|ipv6>$ip router isis [WORD]$tag",
276 "Interface Internet Protocol config commands\n"
277 "IP router interface commands\n"
278 "IP router interface commands\n"
279 "IS-IS routing protocol\n"
280 "Routing process tag\n")
282 const struct lyd_node
*dnode
;
284 dnode
= yang_dnode_get(vty
->candidate_config
->dnode
,
285 "%s/frr-isisd:isis", VTY_CURR_XPATH
);
290 * If both ipv4 and ipv6 are off delete the interface isis container.
292 if (strmatch(ip
, "ipv6")) {
293 if (!yang_dnode_get_bool(dnode
, "./ipv4-routing"))
294 nb_cli_enqueue_change(vty
, "./frr-isisd:isis",
295 NB_OP_DESTROY
, NULL
);
297 nb_cli_enqueue_change(vty
,
298 "./frr-isisd:isis/ipv6-routing",
299 NB_OP_MODIFY
, "false");
301 if (!yang_dnode_get_bool(dnode
, "./ipv6-routing"))
302 nb_cli_enqueue_change(vty
, "./frr-isisd:isis",
303 NB_OP_DESTROY
, NULL
);
305 nb_cli_enqueue_change(vty
,
306 "./frr-isisd:isis/ipv4-routing",
307 NB_OP_MODIFY
, "false");
310 return nb_cli_apply_changes(vty
, NULL
);
313 void cli_show_ip_isis_ipv4(struct vty
*vty
, struct lyd_node
*dnode
,
316 if (!yang_dnode_get_bool(dnode
, NULL
))
318 vty_out(vty
, " ip router isis %s\n",
319 yang_dnode_get_string(dnode
, "../area-tag"));
322 void cli_show_ip_isis_ipv6(struct vty
*vty
, struct lyd_node
*dnode
,
325 if (!yang_dnode_get_bool(dnode
, NULL
))
327 vty_out(vty
, " ipv6 router isis %s\n",
328 yang_dnode_get_string(dnode
, "../area-tag"));
332 * XPath: /frr-isisd:isis/instance/area-address
334 DEFPY(net
, net_cmd
, "[no] net WORD",
335 "Remove an existing Network Entity Title for this process\n"
336 "A Network Entity Title for this process (OSI only)\n"
337 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
339 nb_cli_enqueue_change(vty
, "./area-address",
340 no
? NB_OP_DESTROY
: NB_OP_CREATE
, net
);
342 return nb_cli_apply_changes(vty
, NULL
);
345 void cli_show_isis_area_address(struct vty
*vty
, struct lyd_node
*dnode
,
348 vty_out(vty
, " net %s\n", yang_dnode_get_string(dnode
, NULL
));
352 * XPath: /frr-isisd:isis/instance/is-type
354 DEFPY(is_type
, is_type_cmd
, "is-type <level-1|level-1-2|level-2-only>$level",
355 "IS Level for this routing process (OSI only)\n"
356 "Act as a station router only\n"
357 "Act as both a station router and an area router\n"
358 "Act as an area router only\n")
360 nb_cli_enqueue_change(vty
, "./is-type", NB_OP_MODIFY
,
361 strmatch(level
, "level-2-only") ? "level-2"
364 return nb_cli_apply_changes(vty
, NULL
);
367 DEFPY(no_is_type
, no_is_type_cmd
,
368 "no is-type [<level-1|level-1-2|level-2-only>]",
370 "IS Level for this routing process (OSI only)\n"
371 "Act as a station router only\n"
372 "Act as both a station router and an area router\n"
373 "Act as an area router only\n")
375 const char *value
= NULL
;
376 const struct lyd_node
*dnode
=
377 yang_dnode_get(running_config
->dnode
, VTY_CURR_XPATH
);
378 struct isis_area
*area
= yang_dnode_get_entry(dnode
, false);
381 * Put the is-type back to defaults:
382 * - level-1-2 on first area
383 * - level-1 for the rest
385 if (area
&& listgetdata(listhead(isis
->area_list
)) == area
)
389 nb_cli_enqueue_change(vty
, "./is-type", NB_OP_MODIFY
, value
);
391 return nb_cli_apply_changes(vty
, NULL
);
394 void cli_show_isis_is_type(struct vty
*vty
, struct lyd_node
*dnode
,
397 int is_type
= yang_dnode_get_enum(dnode
, NULL
);
401 vty_out(vty
, " is-type level-1\n");
404 vty_out(vty
, " is-type level-2-only\n");
406 case IS_LEVEL_1_AND_2
:
407 vty_out(vty
, " is-type level-1-2\n");
413 * XPath: /frr-isisd:isis/instance/dynamic-hostname
415 DEFPY(dynamic_hostname
, dynamic_hostname_cmd
, "[no] hostname dynamic",
417 "Dynamic hostname for IS-IS\n"
418 "Dynamic hostname\n")
420 nb_cli_enqueue_change(vty
, "./dynamic-hostname", NB_OP_MODIFY
,
421 no
? "false" : "true");
423 return nb_cli_apply_changes(vty
, NULL
);
426 void cli_show_isis_dynamic_hostname(struct vty
*vty
, struct lyd_node
*dnode
,
429 if (!yang_dnode_get_bool(dnode
, NULL
))
432 vty_out(vty
, " hostname dynamic\n");
436 * XPath: /frr-isisd:isis/instance/overload
438 DEFPY(set_overload_bit
, set_overload_bit_cmd
, "[no] set-overload-bit",
439 "Reset overload bit to accept transit traffic\n"
440 "Set overload bit to avoid any transit traffic\n")
442 nb_cli_enqueue_change(vty
, "./overload", NB_OP_MODIFY
,
443 no
? "false" : "true");
445 return nb_cli_apply_changes(vty
, NULL
);
448 void cli_show_isis_overload(struct vty
*vty
, struct lyd_node
*dnode
,
451 if (!yang_dnode_get_bool(dnode
, NULL
))
453 vty_out(vty
, " set-overload-bit\n");
457 * XPath: /frr-isisd:isis/instance/attached
459 DEFPY(set_attached_bit
, set_attached_bit_cmd
, "[no] set-attached-bit",
460 "Reset attached bit\n"
461 "Set attached bit to identify as L1/L2 router for inter-area traffic\n")
463 nb_cli_enqueue_change(vty
, "./attached", NB_OP_MODIFY
,
464 no
? "false" : "true");
466 return nb_cli_apply_changes(vty
, NULL
);
469 void cli_show_isis_attached(struct vty
*vty
, struct lyd_node
*dnode
,
472 if (!yang_dnode_get_bool(dnode
, NULL
))
474 vty_out(vty
, " set-attached-bit\n");
478 * XPath: /frr-isisd:isis/instance/metric-style
480 DEFPY(metric_style
, metric_style_cmd
,
481 "metric-style <narrow|transition|wide>$style",
482 "Use old-style (ISO 10589) or new-style packet formats\n"
483 "Use old style of TLVs with narrow metric\n"
484 "Send and accept both styles of TLVs during transition\n"
485 "Use new style of TLVs to carry wider metric\n")
487 nb_cli_enqueue_change(vty
, "./metric-style", NB_OP_MODIFY
, style
);
489 return nb_cli_apply_changes(vty
, NULL
);
492 DEFPY(no_metric_style
, no_metric_style_cmd
,
493 "no metric-style [narrow|transition|wide]",
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
, "narrow");
502 return nb_cli_apply_changes(vty
, NULL
);
505 void cli_show_isis_metric_style(struct vty
*vty
, struct lyd_node
*dnode
,
508 int metric
= yang_dnode_get_enum(dnode
, NULL
);
511 case ISIS_NARROW_METRIC
:
512 vty_out(vty
, " metric-style narrow\n");
514 case ISIS_WIDE_METRIC
:
515 vty_out(vty
, " metric-style wide\n");
517 case ISIS_TRANSITION_METRIC
:
518 vty_out(vty
, " metric-style transition\n");
524 * XPath: /frr-isisd:isis/instance/area-password
526 DEFPY(area_passwd
, area_passwd_cmd
,
527 "area-password <clear|md5>$pwd_type WORD$pwd [authenticate snp <send-only|validate>$snp]",
528 "Configure the authentication password for an area\n"
529 "Clear-text authentication type\n"
530 "MD5 authentication type\n"
531 "Level-wide password\n"
534 "Send but do not check PDUs on receiving\n"
535 "Send and check PDUs on receiving\n")
537 nb_cli_enqueue_change(vty
, "./area-password", NB_OP_CREATE
, NULL
);
538 nb_cli_enqueue_change(vty
, "./area-password/password", NB_OP_MODIFY
,
540 nb_cli_enqueue_change(vty
, "./area-password/password-type",
541 NB_OP_MODIFY
, pwd_type
);
542 nb_cli_enqueue_change(vty
, "./area-password/authenticate-snp",
543 NB_OP_MODIFY
, snp
? snp
: "none");
545 return nb_cli_apply_changes(vty
, NULL
);
548 void cli_show_isis_area_pwd(struct vty
*vty
, struct lyd_node
*dnode
,
553 vty_out(vty
, " area-password %s %s",
554 yang_dnode_get_string(dnode
, "./password-type"),
555 yang_dnode_get_string(dnode
, "./password"));
556 snp
= yang_dnode_get_string(dnode
, "./authenticate-snp");
557 if (!strmatch("none", snp
))
558 vty_out(vty
, " authenticate snp %s", snp
);
563 * XPath: /frr-isisd:isis/instance/domain-password
565 DEFPY(domain_passwd
, domain_passwd_cmd
,
566 "domain-password <clear|md5>$pwd_type WORD$pwd [authenticate snp <send-only|validate>$snp]",
567 "Set the authentication password for a routing domain\n"
568 "Clear-text authentication type\n"
569 "MD5 authentication type\n"
570 "Level-wide password\n"
573 "Send but do not check PDUs on receiving\n"
574 "Send and check PDUs on receiving\n")
576 nb_cli_enqueue_change(vty
, "./domain-password", NB_OP_CREATE
, NULL
);
577 nb_cli_enqueue_change(vty
, "./domain-password/password", NB_OP_MODIFY
,
579 nb_cli_enqueue_change(vty
, "./domain-password/password-type",
580 NB_OP_MODIFY
, pwd_type
);
581 nb_cli_enqueue_change(vty
, "./domain-password/authenticate-snp",
582 NB_OP_MODIFY
, snp
? snp
: "none");
584 return nb_cli_apply_changes(vty
, NULL
);
587 DEFPY(no_area_passwd
, no_area_passwd_cmd
,
588 "no <area-password|domain-password>$cmd",
590 "Configure the authentication password for an area\n"
591 "Set the authentication password for a routing domain\n")
593 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
595 return nb_cli_apply_changes(vty
, "./%s", cmd
);
598 void cli_show_isis_domain_pwd(struct vty
*vty
, struct lyd_node
*dnode
,
603 vty_out(vty
, " domain-password %s %s",
604 yang_dnode_get_string(dnode
, "./password-type"),
605 yang_dnode_get_string(dnode
, "./password"));
606 snp
= yang_dnode_get_string(dnode
, "./authenticate-snp");
607 if (!strmatch("none", snp
))
608 vty_out(vty
, " authenticate snp %s", snp
);
613 * XPath: /frr-isisd:isis/instance/lsp/generation-interval
615 DEFPY(lsp_gen_interval
, lsp_gen_interval_cmd
,
616 "lsp-gen-interval [level-1|level-2]$level (1-120)$val",
617 "Minimum interval between regenerating same LSP\n"
618 "Set interval for level 1 only\n"
619 "Set interval for level 2 only\n"
620 "Minimum interval in seconds\n")
622 if (!level
|| strmatch(level
, "level-1"))
623 nb_cli_enqueue_change(vty
, "./lsp/generation-interval/level-1",
624 NB_OP_MODIFY
, val_str
);
625 if (!level
|| strmatch(level
, "level-2"))
626 nb_cli_enqueue_change(vty
, "./lsp/generation-interval/level-2",
627 NB_OP_MODIFY
, val_str
);
629 return nb_cli_apply_changes(vty
, NULL
);
632 DEFPY(no_lsp_gen_interval
, no_lsp_gen_interval_cmd
,
633 "no lsp-gen-interval [level-1|level-2]$level [(1-120)]",
635 "Minimum interval between regenerating same LSP\n"
636 "Set interval for level 1 only\n"
637 "Set interval for level 2 only\n"
638 "Minimum interval in seconds\n")
640 if (!level
|| strmatch(level
, "level-1"))
641 nb_cli_enqueue_change(vty
, "./lsp/generation-interval/level-1",
643 if (!level
|| strmatch(level
, "level-2"))
644 nb_cli_enqueue_change(vty
, "./lsp/generation-interval/level-2",
647 return nb_cli_apply_changes(vty
, NULL
);
650 void cli_show_isis_lsp_gen_interval(struct vty
*vty
, struct lyd_node
*dnode
,
653 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
654 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
656 if (strmatch(l1
, l2
))
657 vty_out(vty
, " lsp-gen-interval %s\n", l1
);
659 vty_out(vty
, " lsp-gen-interval level-1 %s\n", l1
);
660 vty_out(vty
, " lsp-gen-interval level-2 %s\n", l2
);
665 * XPath: /frr-isisd:isis/instance/lsp/refresh-interval
667 DEFPY(lsp_refresh_interval
, lsp_refresh_interval_cmd
,
668 "lsp-refresh-interval [level-1|level-2]$level (1-65235)$val",
669 "LSP refresh interval\n"
670 "LSP refresh interval for Level 1 only\n"
671 "LSP refresh interval for Level 2 only\n"
672 "LSP refresh interval in seconds\n")
674 if (!level
|| strmatch(level
, "level-1"))
675 nb_cli_enqueue_change(vty
, "./lsp/refresh-interval/level-1",
676 NB_OP_MODIFY
, val_str
);
677 if (!level
|| strmatch(level
, "level-2"))
678 nb_cli_enqueue_change(vty
, "./lsp/refresh-interval/level-2",
679 NB_OP_MODIFY
, val_str
);
681 return nb_cli_apply_changes(vty
, NULL
);
684 DEFPY(no_lsp_refresh_interval
, no_lsp_refresh_interval_cmd
,
685 "no lsp-refresh-interval [level-1|level-2]$level [(1-65235)]",
687 "LSP refresh interval\n"
688 "LSP refresh interval for Level 1 only\n"
689 "LSP refresh interval for Level 2 only\n"
690 "LSP refresh interval in seconds\n")
692 if (!level
|| strmatch(level
, "level-1"))
693 nb_cli_enqueue_change(vty
, "./lsp/refresh-interval/level-1",
695 if (!level
|| strmatch(level
, "level-2"))
696 nb_cli_enqueue_change(vty
, "./lsp/refresh-interval/level-2",
699 return nb_cli_apply_changes(vty
, NULL
);
702 void cli_show_isis_lsp_ref_interval(struct vty
*vty
, struct lyd_node
*dnode
,
705 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
706 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
708 if (strmatch(l1
, l2
))
709 vty_out(vty
, " lsp-refresh-interval %s\n", l1
);
711 vty_out(vty
, " lsp-refresh-interval level-1 %s\n", l1
);
712 vty_out(vty
, " lsp-refresh-interval level-2 %s\n", l2
);
717 * XPath: /frr-isisd:isis/instance/lsp/maximum-lifetime
719 DEFPY(max_lsp_lifetime
, max_lsp_lifetime_cmd
,
720 "max-lsp-lifetime [level-1|level-2]$level (350-65535)$val",
721 "Maximum LSP lifetime\n"
722 "Maximum LSP lifetime for Level 1 only\n"
723 "Maximum LSP lifetime for Level 2 only\n"
724 "LSP lifetime in seconds\n")
726 if (!level
|| strmatch(level
, "level-1"))
727 nb_cli_enqueue_change(vty
, "./lsp/maximum-lifetime/level-1",
728 NB_OP_MODIFY
, val_str
);
729 if (!level
|| strmatch(level
, "level-2"))
730 nb_cli_enqueue_change(vty
, "./lsp/maximum-lifetime/level-2",
731 NB_OP_MODIFY
, val_str
);
733 return nb_cli_apply_changes(vty
, NULL
);
736 DEFPY(no_max_lsp_lifetime
, no_max_lsp_lifetime_cmd
,
737 "no max-lsp-lifetime [level-1|level-2]$level [(350-65535)]",
739 "Maximum LSP lifetime\n"
740 "Maximum LSP lifetime for Level 1 only\n"
741 "Maximum LSP lifetime for Level 2 only\n"
742 "LSP lifetime in seconds\n")
744 if (!level
|| strmatch(level
, "level-1"))
745 nb_cli_enqueue_change(vty
, "./lsp/maximum-lifetime/level-1",
747 if (!level
|| strmatch(level
, "level-2"))
748 nb_cli_enqueue_change(vty
, "./lsp/maximum-lifetime/level-2",
751 return nb_cli_apply_changes(vty
, NULL
);
754 void cli_show_isis_lsp_max_lifetime(struct vty
*vty
, struct lyd_node
*dnode
,
757 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
758 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
760 if (strmatch(l1
, l2
))
761 vty_out(vty
, " max-lsp-lifetime %s\n", l1
);
763 vty_out(vty
, " max-lsp-lifetime level-1 %s\n", l1
);
764 vty_out(vty
, " max-lsp-lifetime level-2 %s\n", l2
);
769 * XPath: /frr-isisd:isis/instance/lsp/mtu
771 DEFPY(area_lsp_mtu
, area_lsp_mtu_cmd
, "lsp-mtu (128-4352)$val",
772 "Configure the maximum size of generated LSPs\n"
773 "Maximum size of generated LSPs\n")
775 nb_cli_enqueue_change(vty
, "./lsp/mtu", NB_OP_MODIFY
, val_str
);
777 return nb_cli_apply_changes(vty
, NULL
);
780 DEFPY(no_area_lsp_mtu
, no_area_lsp_mtu_cmd
, "no lsp-mtu [(128-4352)]",
782 "Configure the maximum size of generated LSPs\n"
783 "Maximum size of generated LSPs\n")
785 nb_cli_enqueue_change(vty
, "./lsp/mtu", NB_OP_MODIFY
, NULL
);
787 return nb_cli_apply_changes(vty
, NULL
);
790 void cli_show_isis_lsp_mtu(struct vty
*vty
, struct lyd_node
*dnode
,
793 vty_out(vty
, " lsp-mtu %s\n", yang_dnode_get_string(dnode
, NULL
));
797 * XPath: /frr-isisd:isis/instance/spf/minimum-interval
799 DEFPY(spf_interval
, spf_interval_cmd
,
800 "spf-interval [level-1|level-2]$level (1-120)$val",
801 "Minimum interval between SPF calculations\n"
802 "Set interval for level 1 only\n"
803 "Set interval for level 2 only\n"
804 "Minimum interval between consecutive SPFs in seconds\n")
806 if (!level
|| strmatch(level
, "level-1"))
807 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-1",
808 NB_OP_MODIFY
, val_str
);
809 if (!level
|| strmatch(level
, "level-2"))
810 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-2",
811 NB_OP_MODIFY
, val_str
);
813 return nb_cli_apply_changes(vty
, NULL
);
816 DEFPY(no_spf_interval
, no_spf_interval_cmd
,
817 "no spf-interval [level-1|level-2]$level [(1-120)]",
819 "Minimum interval between SPF calculations\n"
820 "Set interval for level 1 only\n"
821 "Set interval for level 2 only\n"
822 "Minimum interval between consecutive SPFs in seconds\n")
824 if (!level
|| strmatch(level
, "level-1"))
825 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-1",
827 if (!level
|| strmatch(level
, "level-2"))
828 nb_cli_enqueue_change(vty
, "./spf/minimum-interval/level-2",
831 return nb_cli_apply_changes(vty
, NULL
);
834 void cli_show_isis_spf_min_interval(struct vty
*vty
, struct lyd_node
*dnode
,
837 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
838 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
840 if (strmatch(l1
, l2
))
841 vty_out(vty
, " spf-interval %s\n", l1
);
843 vty_out(vty
, " spf-interval level-1 %s\n", l1
);
844 vty_out(vty
, " spf-interval level-2 %s\n", l2
);
849 * XPath: /frr-isisd:isis/instance/spf/ietf-backoff-delay
851 DEFPY(spf_delay_ietf
, spf_delay_ietf_cmd
,
852 "spf-delay-ietf init-delay (0-60000) short-delay (0-60000) long-delay (0-60000) holddown (0-60000) time-to-learn (0-60000)",
853 "IETF SPF delay algorithm\n"
854 "Delay used while in QUIET state\n"
855 "Delay used while in QUIET state in milliseconds\n"
856 "Delay used while in SHORT_WAIT state\n"
857 "Delay used while in SHORT_WAIT state in milliseconds\n"
858 "Delay used while in LONG_WAIT\n"
859 "Delay used while in LONG_WAIT state in milliseconds\n"
860 "Time with no received IGP events before considering IGP stable\n"
861 "Time with no received IGP events before considering IGP stable (in milliseconds)\n"
862 "Maximum duration needed to learn all the events related to a single failure\n"
863 "Maximum duration needed to learn all the events related to a single failure (in milliseconds)\n")
865 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay", NB_OP_CREATE
,
867 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/init-delay",
868 NB_OP_MODIFY
, init_delay_str
);
869 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/short-delay",
870 NB_OP_MODIFY
, short_delay_str
);
871 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/long-delay",
872 NB_OP_MODIFY
, long_delay_str
);
873 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/hold-down",
874 NB_OP_MODIFY
, holddown_str
);
875 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay/time-to-learn",
876 NB_OP_MODIFY
, time_to_learn_str
);
878 return nb_cli_apply_changes(vty
, NULL
);
881 DEFPY(no_spf_delay_ietf
, no_spf_delay_ietf_cmd
,
882 "no spf-delay-ietf [init-delay (0-60000) short-delay (0-60000) long-delay (0-60000) holddown (0-60000) time-to-learn (0-60000)]",
884 "IETF SPF delay algorithm\n"
885 "Delay used while in QUIET state\n"
886 "Delay used while in QUIET state in milliseconds\n"
887 "Delay used while in SHORT_WAIT state\n"
888 "Delay used while in SHORT_WAIT state in milliseconds\n"
889 "Delay used while in LONG_WAIT\n"
890 "Delay used while in LONG_WAIT state in milliseconds\n"
891 "Time with no received IGP events before considering IGP stable\n"
892 "Time with no received IGP events before considering IGP stable (in milliseconds)\n"
893 "Maximum duration needed to learn all the events related to a single failure\n"
894 "Maximum duration needed to learn all the events related to a single failure (in milliseconds)\n")
896 nb_cli_enqueue_change(vty
, "./spf/ietf-backoff-delay", NB_OP_DESTROY
,
899 return nb_cli_apply_changes(vty
, NULL
);
902 void cli_show_isis_spf_ietf_backoff(struct vty
*vty
, struct lyd_node
*dnode
,
906 " spf-delay-ietf init-delay %s short-delay %s long-delay %s holddown %s time-to-learn %s\n",
907 yang_dnode_get_string(dnode
, "./init-delay"),
908 yang_dnode_get_string(dnode
, "./short-delay"),
909 yang_dnode_get_string(dnode
, "./long-delay"),
910 yang_dnode_get_string(dnode
, "./hold-down"),
911 yang_dnode_get_string(dnode
, "./time-to-learn"));
915 * XPath: /frr-isisd:isis/instance/purge-originator
917 DEFPY(area_purge_originator
, area_purge_originator_cmd
, "[no] purge-originator",
918 NO_STR
"Use the RFC 6232 purge-originator\n")
920 nb_cli_enqueue_change(vty
, "./purge-originator", NB_OP_MODIFY
,
921 no
? "false" : "true");
923 return nb_cli_apply_changes(vty
, NULL
);
926 void cli_show_isis_purge_origin(struct vty
*vty
, struct lyd_node
*dnode
,
929 if (!yang_dnode_get_bool(dnode
, NULL
))
931 vty_out(vty
, " purge-originator\n");
935 * XPath: /frr-isisd:isis/mpls-te
937 DEFPY(isis_mpls_te_on
, isis_mpls_te_on_cmd
, "mpls-te on",
938 MPLS_TE_STR
"Enable the MPLS-TE functionality\n")
940 nb_cli_enqueue_change(vty
, "/frr-isisd:isis/mpls-te", NB_OP_CREATE
,
943 return nb_cli_apply_changes(vty
, NULL
);
946 DEFPY(no_isis_mpls_te_on
, no_isis_mpls_te_on_cmd
, "no mpls-te [on]",
948 "Disable the MPLS-TE functionality\n"
949 "Enable the MPLS-TE functionality\n")
951 nb_cli_enqueue_change(vty
, "/frr-isisd:isis/mpls-te", NB_OP_DESTROY
,
954 return nb_cli_apply_changes(vty
, NULL
);
957 void cli_show_isis_mpls_te(struct vty
*vty
, struct lyd_node
*dnode
,
960 vty_out(vty
, " mpls-te on\n");
964 * XPath: /frr-isisd:isis/mpls-te/router-address
966 DEFPY(isis_mpls_te_router_addr
, isis_mpls_te_router_addr_cmd
,
967 "mpls-te router-address A.B.C.D",
969 "Stable IP address of the advertising router\n"
970 "MPLS-TE router address in IPv4 address format\n")
972 nb_cli_enqueue_change(vty
, "/frr-isisd:isis/mpls-te/router-address",
973 NB_OP_MODIFY
, router_address_str
);
975 return nb_cli_apply_changes(vty
, NULL
);
978 void cli_show_isis_mpls_te_router_addr(struct vty
*vty
, struct lyd_node
*dnode
,
981 vty_out(vty
, " mpls-te router-address %s\n",
982 yang_dnode_get_string(dnode
, NULL
));
985 DEFPY(isis_mpls_te_inter_as
, isis_mpls_te_inter_as_cmd
,
986 "[no] mpls-te inter-as [level-1|level-1-2|level-2-only]",
988 "Configure MPLS-TE Inter-AS support\n"
989 "AREA native mode self originate INTER-AS LSP with L1 only flooding scope\n"
990 "AREA native mode self originate INTER-AS LSP with L1 and L2 flooding scope\n"
991 "AS native mode self originate INTER-AS LSP with L2 only flooding scope\n")
993 vty_out(vty
, "MPLS-TE Inter-AS is not yet supported.");
998 * XPath: /frr-isisd:isis/instance/default-information-originate
1000 DEFPY(isis_default_originate
, isis_default_originate_cmd
,
1001 "[no] default-information originate <ipv4|ipv6>$ip"
1002 " <level-1|level-2>$level [always]$always"
1003 " [{metric (0-16777215)$metric|route-map WORD$rmap}]",
1005 "Control distribution of default information\n"
1006 "Distribute a default route\n"
1007 "Distribute default route for IPv4\n"
1008 "Distribute default route for IPv6\n"
1009 "Distribute default route into level-1\n"
1010 "Distribute default route into level-2\n"
1011 "Always advertise default route\n"
1012 "Metric for default route\n"
1013 "ISIS default metric\n"
1014 "Route map reference\n"
1015 "Pointer to route-map entries\n")
1018 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1020 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1021 nb_cli_enqueue_change(vty
, "./always", NB_OP_MODIFY
,
1022 always
? "true" : "false");
1023 nb_cli_enqueue_change(vty
, "./route-map",
1024 rmap
? NB_OP_MODIFY
: NB_OP_DESTROY
,
1025 rmap
? rmap
: NULL
);
1026 nb_cli_enqueue_change(vty
, "./metric", NB_OP_MODIFY
,
1027 metric_str
? metric_str
: NULL
);
1028 if (strmatch(ip
, "ipv6") && !always
) {
1030 "Zebra doesn't implement default-originate for IPv6 yet\n");
1032 "so use with care or use default-originate always.\n");
1036 return nb_cli_apply_changes(
1037 vty
, "./default-information-originate/%s[level='%s']", ip
,
1041 static void vty_print_def_origin(struct vty
*vty
, struct lyd_node
*dnode
,
1042 const char *family
, const char *level
,
1045 vty_out(vty
, " default-information originate %s %s", family
, level
);
1046 if (yang_dnode_get_bool(dnode
, "./always"))
1047 vty_out(vty
, " always");
1049 if (yang_dnode_exists(dnode
, "./route-map"))
1050 vty_out(vty
, " route-map %s",
1051 yang_dnode_get_string(dnode
, "./route-map"));
1052 if (show_defaults
|| !yang_dnode_is_default(dnode
, "./metric"))
1053 vty_out(vty
, " metric %s",
1054 yang_dnode_get_string(dnode
, "./metric"));
1059 void cli_show_isis_def_origin_ipv4(struct vty
*vty
, struct lyd_node
*dnode
,
1062 const char *level
= yang_dnode_get_string(dnode
, "./level");
1064 vty_print_def_origin(vty
, dnode
, "ipv4", level
, show_defaults
);
1067 void cli_show_isis_def_origin_ipv6(struct vty
*vty
, struct lyd_node
*dnode
,
1070 const char *level
= yang_dnode_get_string(dnode
, "./level");
1072 vty_print_def_origin(vty
, dnode
, "ipv6", level
, show_defaults
);
1076 * XPath: /frr-isisd:isis/instance/redistribute
1078 DEFPY(isis_redistribute
, isis_redistribute_cmd
,
1079 "[no] redistribute <ipv4|ipv6>$ip " PROTO_REDIST_STR
1081 " <level-1|level-2>$level"
1082 " [{metric (0-16777215)|route-map WORD}]",
1084 "Redistribute IPv4 routes\n"
1085 "Redistribute IPv6 routes\n" PROTO_REDIST_HELP
1086 "Redistribute into level-1\n"
1087 "Redistribute into level-2\n"
1088 "Metric for redistributed routes\n"
1089 "ISIS default metric\n"
1090 "Route map reference\n"
1091 "Pointer to route-map entries\n")
1094 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1096 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1097 nb_cli_enqueue_change(vty
, "./route-map",
1098 route_map
? NB_OP_MODIFY
: NB_OP_DESTROY
,
1099 route_map
? route_map
: NULL
);
1100 nb_cli_enqueue_change(vty
, "./metric", NB_OP_MODIFY
,
1101 metric_str
? metric_str
: NULL
);
1104 return nb_cli_apply_changes(
1105 vty
, "./redistribute/%s[protocol='%s'][level='%s']", ip
, proto
,
1109 static void vty_print_redistribute(struct vty
*vty
, struct lyd_node
*dnode
,
1110 bool show_defaults
, const char *family
)
1112 const char *level
= yang_dnode_get_string(dnode
, "./level");
1113 const char *protocol
= yang_dnode_get_string(dnode
, "./protocol");
1115 vty_out(vty
, " redistribute %s %s %s", family
, protocol
, level
);
1116 if (show_defaults
|| !yang_dnode_is_default(dnode
, "./metric"))
1117 vty_out(vty
, " metric %s",
1118 yang_dnode_get_string(dnode
, "./metric"));
1119 if (yang_dnode_exists(dnode
, "./route-map"))
1120 vty_out(vty
, " route-map %s",
1121 yang_dnode_get_string(dnode
, "./route-map"));
1125 void cli_show_isis_redistribute_ipv4(struct vty
*vty
, struct lyd_node
*dnode
,
1128 vty_print_redistribute(vty
, dnode
, show_defaults
, "ipv4");
1130 void cli_show_isis_redistribute_ipv6(struct vty
*vty
, struct lyd_node
*dnode
,
1133 vty_print_redistribute(vty
, dnode
, show_defaults
, "ipv6");
1137 * XPath: /frr-isisd:isis/instance/multi-topology
1139 DEFPY(isis_topology
, isis_topology_cmd
,
1147 "|ipv6-dstsrc>$topology "
1148 "[overload]$overload",
1150 "Configure IS-IS topologies\n"
1151 "IPv4 unicast topology\n"
1152 "IPv4 management topology\n"
1153 "IPv6 unicast topology\n"
1154 "IPv4 multicast topology\n"
1155 "IPv6 multicast topology\n"
1156 "IPv6 management topology\n"
1157 "IPv6 dst-src topology\n"
1158 "Set overload bit for topology\n")
1160 char base_xpath
[XPATH_MAXLEN
];
1162 /* Since IPv4-unicast is not configurable it is not present in the
1163 * YANG model, so we need to validate it here
1165 if (strmatch(topology
, "ipv4-unicast")) {
1166 vty_out(vty
, "Cannot configure IPv4 unicast topology\n");
1167 return CMD_WARNING_CONFIG_FAILED
;
1170 if (strmatch(topology
, "ipv4-mgmt"))
1171 snprintf(base_xpath
, XPATH_MAXLEN
,
1172 "./multi-topology/ipv4-management");
1173 else if (strmatch(topology
, "ipv6-mgmt"))
1174 snprintf(base_xpath
, XPATH_MAXLEN
,
1175 "./multi-topology/ipv6-management");
1177 snprintf(base_xpath
, XPATH_MAXLEN
, "./multi-topology/%s",
1181 nb_cli_enqueue_change(vty
, ".", NB_OP_DESTROY
, NULL
);
1183 nb_cli_enqueue_change(vty
, ".", NB_OP_CREATE
, NULL
);
1184 nb_cli_enqueue_change(vty
, "./overload", NB_OP_MODIFY
,
1185 overload
? "true" : "false");
1188 return nb_cli_apply_changes(vty
, base_xpath
);
1191 void cli_show_isis_mt_ipv4_multicast(struct vty
*vty
, struct lyd_node
*dnode
,
1194 vty_out(vty
, " topology ipv4-multicast");
1195 if (yang_dnode_get_bool(dnode
, "./overload"))
1196 vty_out(vty
, " overload");
1200 void cli_show_isis_mt_ipv4_mgmt(struct vty
*vty
, struct lyd_node
*dnode
,
1203 vty_out(vty
, " topology ipv4-mgmt");
1204 if (yang_dnode_get_bool(dnode
, "./overload"))
1205 vty_out(vty
, " overload");
1209 void cli_show_isis_mt_ipv6_unicast(struct vty
*vty
, struct lyd_node
*dnode
,
1212 vty_out(vty
, " topology ipv6-unicast");
1213 if (yang_dnode_get_bool(dnode
, "./overload"))
1214 vty_out(vty
, " overload");
1218 void cli_show_isis_mt_ipv6_multicast(struct vty
*vty
, struct lyd_node
*dnode
,
1221 vty_out(vty
, " topology ipv6-multicast");
1222 if (yang_dnode_get_bool(dnode
, "./overload"))
1223 vty_out(vty
, " overload");
1227 void cli_show_isis_mt_ipv6_mgmt(struct vty
*vty
, struct lyd_node
*dnode
,
1230 vty_out(vty
, " topology ipv6-mgmt");
1231 if (yang_dnode_get_bool(dnode
, "./overload"))
1232 vty_out(vty
, " overload");
1236 void cli_show_isis_mt_ipv6_dstsrc(struct vty
*vty
, struct lyd_node
*dnode
,
1239 vty_out(vty
, " topology ipv6-dstsrc");
1240 if (yang_dnode_get_bool(dnode
, "./overload"))
1241 vty_out(vty
, " overload");
1246 * XPath: /frr-interface:lib/interface/frr-isisd:isis/passive
1248 DEFPY(isis_passive
, isis_passive_cmd
, "[no] isis passive",
1250 "IS-IS routing protocol\n"
1251 "Configure the passive mode for interface\n")
1253 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/passive", NB_OP_MODIFY
,
1254 no
? "false" : "true");
1256 return nb_cli_apply_changes(vty
, NULL
);
1259 void cli_show_ip_isis_passive(struct vty
*vty
, struct lyd_node
*dnode
,
1262 if (!yang_dnode_get_bool(dnode
, NULL
))
1263 vty_out(vty
, " no");
1264 vty_out(vty
, " isis passive\n");
1268 * XPath: /frr-interface:lib/interface/frr-isisd:isis/password
1271 DEFPY(isis_passwd
, isis_passwd_cmd
, "isis password <md5|clear>$type WORD$pwd",
1272 "IS-IS routing protocol\n"
1273 "Configure the authentication password for a circuit\n"
1274 "HMAC-MD5 authentication\n"
1275 "Cleartext password\n"
1276 "Circuit password\n")
1278 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password", NB_OP_CREATE
,
1280 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password/password",
1282 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password/password-type",
1283 NB_OP_MODIFY
, type
);
1285 return nb_cli_apply_changes(vty
, NULL
);
1288 DEFPY(no_isis_passwd
, no_isis_passwd_cmd
, "no isis password [<md5|clear> WORD]",
1290 "IS-IS routing protocol\n"
1291 "Configure the authentication password for a circuit\n"
1292 "HMAC-MD5 authentication\n"
1293 "Cleartext password\n"
1294 "Circuit password\n")
1296 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/password", NB_OP_DESTROY
,
1299 return nb_cli_apply_changes(vty
, NULL
);
1302 void cli_show_ip_isis_password(struct vty
*vty
, struct lyd_node
*dnode
,
1305 vty_out(vty
, " isis password %s %s\n",
1306 yang_dnode_get_string(dnode
, "./password-type"),
1307 yang_dnode_get_string(dnode
, "./password"));
1311 * XPath: /frr-interface:lib/interface/frr-isisd:isis/metric
1313 DEFPY(isis_metric
, isis_metric_cmd
,
1314 "isis metric [level-1|level-2]$level (0-16777215)$met",
1315 "IS-IS routing protocol\n"
1316 "Set default metric for circuit\n"
1317 "Specify metric for level-1 routing\n"
1318 "Specify metric for level-2 routing\n"
1319 "Default metric value\n")
1321 if (!level
|| strmatch(level
, "level-1"))
1322 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-1",
1323 NB_OP_MODIFY
, met_str
);
1324 if (!level
|| strmatch(level
, "level-2"))
1325 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-2",
1326 NB_OP_MODIFY
, met_str
);
1328 return nb_cli_apply_changes(vty
, NULL
);
1331 DEFPY(no_isis_metric
, no_isis_metric_cmd
,
1332 "no isis metric [level-1|level-2]$level [(0-16777215)]",
1334 "IS-IS routing protocol\n"
1335 "Set default metric for circuit\n"
1336 "Specify metric for level-1 routing\n"
1337 "Specify metric for level-2 routing\n"
1338 "Default metric value\n")
1340 if (!level
|| strmatch(level
, "level-1"))
1341 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-1",
1342 NB_OP_MODIFY
, NULL
);
1343 if (!level
|| strmatch(level
, "level-2"))
1344 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/metric/level-2",
1345 NB_OP_MODIFY
, NULL
);
1347 return nb_cli_apply_changes(vty
, NULL
);
1350 void cli_show_ip_isis_metric(struct vty
*vty
, struct lyd_node
*dnode
,
1353 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
1354 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
1356 if (strmatch(l1
, l2
))
1357 vty_out(vty
, " isis metric %s\n", l1
);
1359 vty_out(vty
, " isis metric %s level-1\n", l1
);
1360 vty_out(vty
, " isis metric %s level-2\n", l2
);
1365 * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/interval
1367 DEFPY(isis_hello_interval
, isis_hello_interval_cmd
,
1368 "isis hello-interval [level-1|level-2]$level (1-600)$intv",
1369 "IS-IS routing protocol\n"
1370 "Set Hello interval\n"
1371 "Specify hello-interval for level-1 IIHs\n"
1372 "Specify hello-interval for level-2 IIHs\n"
1373 "Holdtime 1 seconds, interval depends on multiplier\n")
1375 if (!level
|| strmatch(level
, "level-1"))
1376 nb_cli_enqueue_change(vty
,
1377 "./frr-isisd:isis/hello/interval/level-1",
1378 NB_OP_MODIFY
, intv_str
);
1379 if (!level
|| strmatch(level
, "level-2"))
1380 nb_cli_enqueue_change(vty
,
1381 "./frr-isisd:isis/hello/interval/level-2",
1382 NB_OP_MODIFY
, intv_str
);
1384 return nb_cli_apply_changes(vty
, NULL
);
1387 DEFPY(no_isis_hello_interval
, no_isis_hello_interval_cmd
,
1388 "no isis hello-interval [level-1|level-2]$level [(1-600)]",
1390 "IS-IS routing protocol\n"
1391 "Set Hello interval\n"
1392 "Specify hello-interval for level-1 IIHs\n"
1393 "Specify hello-interval for level-2 IIHs\n"
1394 "Holdtime 1 second, interval depends on multiplier\n")
1396 if (!level
|| strmatch(level
, "level-1"))
1397 nb_cli_enqueue_change(vty
,
1398 "./frr-isisd:isis/hello/interval/level-1",
1399 NB_OP_MODIFY
, NULL
);
1400 if (!level
|| strmatch(level
, "level-2"))
1401 nb_cli_enqueue_change(vty
,
1402 "./frr-isisd:isis/hello/interval/level-2",
1403 NB_OP_MODIFY
, NULL
);
1405 return nb_cli_apply_changes(vty
, NULL
);
1408 void cli_show_ip_isis_hello_interval(struct vty
*vty
, struct lyd_node
*dnode
,
1411 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
1412 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
1414 if (strmatch(l1
, l2
))
1415 vty_out(vty
, " isis hello-interval %s\n", l1
);
1417 vty_out(vty
, " isis hello-interval %s level-1\n", l1
);
1418 vty_out(vty
, " isis hello-interval %s level-2\n", l2
);
1423 * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/multiplier
1425 DEFPY(isis_hello_multiplier
, isis_hello_multiplier_cmd
,
1426 "isis hello-multiplier [level-1|level-2]$level (2-100)$mult",
1427 "IS-IS routing protocol\n"
1428 "Set multiplier for Hello holding time\n"
1429 "Specify hello multiplier for level-1 IIHs\n"
1430 "Specify hello multiplier for level-2 IIHs\n"
1431 "Hello multiplier value\n")
1433 if (!level
|| strmatch(level
, "level-1"))
1434 nb_cli_enqueue_change(
1435 vty
, "./frr-isisd:isis/hello/multiplier/level-1",
1436 NB_OP_MODIFY
, mult_str
);
1437 if (!level
|| strmatch(level
, "level-2"))
1438 nb_cli_enqueue_change(
1439 vty
, "./frr-isisd:isis/hello/multiplier/level-2",
1440 NB_OP_MODIFY
, mult_str
);
1442 return nb_cli_apply_changes(vty
, NULL
);
1445 DEFPY(no_isis_hello_multiplier
, no_isis_hello_multiplier_cmd
,
1446 "no isis hello-multiplier [level-1|level-2]$level [(2-100)]",
1448 "IS-IS routing protocol\n"
1449 "Set multiplier for Hello holding time\n"
1450 "Specify hello multiplier for level-1 IIHs\n"
1451 "Specify hello multiplier for level-2 IIHs\n"
1452 "Hello multiplier value\n")
1454 if (!level
|| strmatch(level
, "level-1"))
1455 nb_cli_enqueue_change(
1456 vty
, "./frr-isisd:isis/hello/multiplier/level-1",
1457 NB_OP_MODIFY
, NULL
);
1458 if (!level
|| strmatch(level
, "level-2"))
1459 nb_cli_enqueue_change(
1460 vty
, "./frr-isisd:isis/hello/multiplier/level-2",
1461 NB_OP_MODIFY
, NULL
);
1463 return nb_cli_apply_changes(vty
, NULL
);
1466 void cli_show_ip_isis_hello_multi(struct vty
*vty
, struct lyd_node
*dnode
,
1469 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
1470 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
1472 if (strmatch(l1
, l2
))
1473 vty_out(vty
, " isis hello-multiplier %s\n", l1
);
1475 vty_out(vty
, " isis hello-multiplier %s level-1\n", l1
);
1476 vty_out(vty
, " isis hello-multiplier %s level-2\n", l2
);
1482 * /frr-interface:lib/interface/frr-isisd:isis/disable-three-way-handshake
1484 DEFPY(isis_threeway_adj
, isis_threeway_adj_cmd
, "[no] isis three-way-handshake",
1487 "Enable/Disable three-way handshake\n")
1489 nb_cli_enqueue_change(vty
,
1490 "./frr-isisd:isis/disable-three-way-handshake",
1491 NB_OP_MODIFY
, no
? "true" : "false");
1493 return nb_cli_apply_changes(vty
, NULL
);
1496 void cli_show_ip_isis_threeway_shake(struct vty
*vty
, struct lyd_node
*dnode
,
1499 if (yang_dnode_get_bool(dnode
, NULL
))
1500 vty_out(vty
, " no");
1501 vty_out(vty
, " isis three-way-handshake\n");
1505 * XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/padding
1507 DEFPY(isis_hello_padding
, isis_hello_padding_cmd
, "[no] isis hello padding",
1509 "IS-IS routing protocol\n"
1510 "Add padding to IS-IS hello packets\n"
1511 "Pad hello packets\n")
1513 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/hello/padding",
1514 NB_OP_MODIFY
, no
? "false" : "true");
1516 return nb_cli_apply_changes(vty
, NULL
);
1519 void cli_show_ip_isis_hello_padding(struct vty
*vty
, struct lyd_node
*dnode
,
1522 if (!yang_dnode_get_bool(dnode
, NULL
))
1523 vty_out(vty
, " no");
1525 vty_out(vty
, " isis hello padding\n");
1529 * XPath: /frr-interface:lib/interface/frr-isisd:isis/csnp-interval
1531 DEFPY(csnp_interval
, csnp_interval_cmd
,
1532 "isis csnp-interval (1-600)$intv [level-1|level-2]$level",
1533 "IS-IS routing protocol\n"
1534 "Set CSNP interval in seconds\n"
1535 "CSNP interval value\n"
1536 "Specify interval for level-1 CSNPs\n"
1537 "Specify interval for level-2 CSNPs\n")
1539 if (!level
|| strmatch(level
, "level-1"))
1540 nb_cli_enqueue_change(vty
,
1541 "./frr-isisd:isis/csnp-interval/level-1",
1542 NB_OP_MODIFY
, intv_str
);
1543 if (!level
|| strmatch(level
, "level-2"))
1544 nb_cli_enqueue_change(vty
,
1545 "./frr-isisd:isis/csnp-interval/level-2",
1546 NB_OP_MODIFY
, intv_str
);
1548 return nb_cli_apply_changes(vty
, NULL
);
1551 DEFPY(no_csnp_interval
, no_csnp_interval_cmd
,
1552 "no isis csnp-interval [(1-600)] [level-1|level-2]$level",
1554 "IS-IS routing protocol\n"
1555 "Set CSNP interval in seconds\n"
1556 "CSNP interval value\n"
1557 "Specify interval for level-1 CSNPs\n"
1558 "Specify interval for level-2 CSNPs\n")
1560 if (!level
|| strmatch(level
, "level-1"))
1561 nb_cli_enqueue_change(vty
,
1562 "./frr-isisd:isis/csnp-interval/level-1",
1563 NB_OP_MODIFY
, NULL
);
1564 if (!level
|| strmatch(level
, "level-2"))
1565 nb_cli_enqueue_change(vty
,
1566 "./frr-isisd:isis/csnp-interval/level-2",
1567 NB_OP_MODIFY
, NULL
);
1569 return nb_cli_apply_changes(vty
, NULL
);
1572 void cli_show_ip_isis_csnp_interval(struct vty
*vty
, struct lyd_node
*dnode
,
1575 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
1576 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
1578 if (strmatch(l1
, l2
))
1579 vty_out(vty
, " isis csnp-interval %s\n", l1
);
1581 vty_out(vty
, " isis csnp-interval %s level-1\n", l1
);
1582 vty_out(vty
, " isis csnp-interval %s level-2\n", l2
);
1587 * XPath: /frr-interface:lib/interface/frr-isisd:isis/psnp-interval
1589 DEFPY(psnp_interval
, psnp_interval_cmd
,
1590 "isis psnp-interval (1-120)$intv [level-1|level-2]$level",
1591 "IS-IS routing protocol\n"
1592 "Set PSNP interval in seconds\n"
1593 "PSNP interval value\n"
1594 "Specify interval for level-1 PSNPs\n"
1595 "Specify interval for level-2 PSNPs\n")
1597 if (!level
|| strmatch(level
, "level-1"))
1598 nb_cli_enqueue_change(vty
,
1599 "./frr-isisd:isis/psnp-interval/level-1",
1600 NB_OP_MODIFY
, intv_str
);
1601 if (!level
|| strmatch(level
, "level-2"))
1602 nb_cli_enqueue_change(vty
,
1603 "./frr-isisd:isis/psnp-interval/level-2",
1604 NB_OP_MODIFY
, intv_str
);
1606 return nb_cli_apply_changes(vty
, NULL
);
1609 DEFPY(no_psnp_interval
, no_psnp_interval_cmd
,
1610 "no isis psnp-interval [(1-120)] [level-1|level-2]$level",
1612 "IS-IS routing protocol\n"
1613 "Set PSNP interval in seconds\n"
1614 "PSNP interval value\n"
1615 "Specify interval for level-1 PSNPs\n"
1616 "Specify interval for level-2 PSNPs\n")
1618 if (!level
|| strmatch(level
, "level-1"))
1619 nb_cli_enqueue_change(vty
,
1620 "./frr-isisd:isis/psnp-interval/level-1",
1621 NB_OP_MODIFY
, NULL
);
1622 if (!level
|| strmatch(level
, "level-2"))
1623 nb_cli_enqueue_change(vty
,
1624 "./frr-isisd:isis/psnp-interval/level-2",
1625 NB_OP_MODIFY
, NULL
);
1627 return nb_cli_apply_changes(vty
, NULL
);
1630 void cli_show_ip_isis_psnp_interval(struct vty
*vty
, struct lyd_node
*dnode
,
1633 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
1634 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
1636 if (strmatch(l1
, l2
))
1637 vty_out(vty
, " isis psnp-interval %s\n", l1
);
1639 vty_out(vty
, " isis psnp-interval %s level-1\n", l1
);
1640 vty_out(vty
, " isis psnp-interval %s level-2\n", l2
);
1645 * XPath: /frr-interface:lib/interface/frr-isisd:isis/multi-topology
1647 DEFPY(circuit_topology
, circuit_topology_cmd
,
1648 "[no] isis topology"
1658 "IS-IS routing protocol\n"
1659 "Configure interface IS-IS topologies\n"
1660 "IPv4 unicast topology\n"
1661 "IPv4 management topology\n"
1662 "IPv6 unicast topology\n"
1663 "IPv4 multicast topology\n"
1664 "IPv6 multicast topology\n"
1665 "IPv6 management topology\n"
1666 "IPv6 dst-src topology\n")
1668 nb_cli_enqueue_change(vty
, ".", NB_OP_MODIFY
, no
? "false" : "true");
1670 if (strmatch(topology
, "ipv4-mgmt"))
1671 return nb_cli_apply_changes(
1672 vty
, "./frr-isisd:isis/multi-topology/ipv4-management");
1673 else if (strmatch(topology
, "ipv6-mgmt"))
1674 return nb_cli_apply_changes(
1675 vty
, "./frr-isisd:isis/multi-topology/ipv6-management");
1677 return nb_cli_apply_changes(
1678 vty
, "./frr-isisd:isis/multi-topology/%s", topology
);
1681 void cli_show_ip_isis_mt_ipv4_unicast(struct vty
*vty
, struct lyd_node
*dnode
,
1684 if (!yang_dnode_get_bool(dnode
, NULL
))
1685 vty_out(vty
, " no");
1686 vty_out(vty
, " isis topology ipv4-unicast\n");
1689 void cli_show_ip_isis_mt_ipv4_multicast(struct vty
*vty
, struct lyd_node
*dnode
,
1692 if (!yang_dnode_get_bool(dnode
, NULL
))
1693 vty_out(vty
, " no");
1694 vty_out(vty
, " isis topology ipv4-multicast\n");
1697 void cli_show_ip_isis_mt_ipv4_mgmt(struct vty
*vty
, struct lyd_node
*dnode
,
1700 if (!yang_dnode_get_bool(dnode
, NULL
))
1701 vty_out(vty
, " no");
1702 vty_out(vty
, " isis topology ipv4-mgmt\n");
1705 void cli_show_ip_isis_mt_ipv6_unicast(struct vty
*vty
, struct lyd_node
*dnode
,
1708 if (!yang_dnode_get_bool(dnode
, NULL
))
1709 vty_out(vty
, " no");
1710 vty_out(vty
, " isis topology ipv6-unicast\n");
1713 void cli_show_ip_isis_mt_ipv6_multicast(struct vty
*vty
, struct lyd_node
*dnode
,
1716 if (!yang_dnode_get_bool(dnode
, NULL
))
1717 vty_out(vty
, " no");
1718 vty_out(vty
, " isis topology ipv6-multicast\n");
1721 void cli_show_ip_isis_mt_ipv6_mgmt(struct vty
*vty
, struct lyd_node
*dnode
,
1724 if (!yang_dnode_get_bool(dnode
, NULL
))
1725 vty_out(vty
, " no");
1726 vty_out(vty
, " isis topology ipv6-mgmt\n");
1729 void cli_show_ip_isis_mt_ipv6_dstsrc(struct vty
*vty
, struct lyd_node
*dnode
,
1732 if (!yang_dnode_get_bool(dnode
, NULL
))
1733 vty_out(vty
, " no");
1734 vty_out(vty
, " isis topology ipv6-dstsrc\n");
1738 * XPath: /frr-interface:lib/interface/frr-isisd:isis/circuit-type
1740 DEFPY(isis_circuit_type
, isis_circuit_type_cmd
,
1741 "isis circuit-type <level-1|level-1-2|level-2-only>$type",
1742 "IS-IS routing protocol\n"
1743 "Configure circuit type for interface\n"
1744 "Level-1 only adjacencies are formed\n"
1745 "Level-1-2 adjacencies are formed\n"
1746 "Level-2 only adjacencies are formed\n")
1748 nb_cli_enqueue_change(
1749 vty
, "./frr-isisd:isis/circuit-type", NB_OP_MODIFY
,
1750 strmatch(type
, "level-2-only") ? "level-2" : type
);
1752 return nb_cli_apply_changes(vty
, NULL
);
1755 DEFPY(no_isis_circuit_type
, no_isis_circuit_type_cmd
,
1756 "no isis circuit-type [level-1|level-1-2|level-2-only]",
1758 "IS-IS routing protocol\n"
1759 "Configure circuit type for interface\n"
1760 "Level-1 only adjacencies are formed\n"
1761 "Level-1-2 adjacencies are formed\n"
1762 "Level-2 only adjacencies are formed\n")
1764 const struct lyd_node
*dnode
;
1765 struct interface
*ifp
;
1766 struct isis_circuit
*circuit
;
1768 const char *circ_type
;
1771 * Default value depends on whether the circuit is part of an area,
1772 * and the is-type of the area if there is one. So we need to do this
1775 dnode
= yang_dnode_get(running_config
->dnode
, VTY_CURR_XPATH
);
1776 ifp
= yang_dnode_get_entry(dnode
, false);
1780 circuit
= circuit_scan_by_ifp(ifp
);
1784 if (circuit
->state
== C_STATE_UP
)
1785 is_type
= circuit
->area
->is_type
;
1791 circ_type
= "level-1";
1794 circ_type
= "level-2";
1796 case IS_LEVEL_1_AND_2
:
1797 circ_type
= "level-1-2";
1800 return CMD_ERR_NO_MATCH
;
1802 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/circuit-type",
1803 NB_OP_MODIFY
, circ_type
);
1805 return nb_cli_apply_changes(vty
, NULL
);
1808 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/circuit-type",
1809 NB_OP_MODIFY
, NULL
);
1811 return nb_cli_apply_changes(vty
, NULL
);
1814 void cli_show_ip_isis_circ_type(struct vty
*vty
, struct lyd_node
*dnode
,
1817 int level
= yang_dnode_get_enum(dnode
, NULL
);
1821 vty_out(vty
, " isis circuit-type level-1\n");
1824 vty_out(vty
, " isis circuit-type level-2-only\n");
1826 case IS_LEVEL_1_AND_2
:
1827 vty_out(vty
, " isis circuit-type level-1-2\n");
1833 * XPath: /frr-interface:lib/interface/frr-isisd:isis/network-type
1835 DEFPY(isis_network
, isis_network_cmd
, "[no] isis network point-to-point",
1837 "IS-IS routing protocol\n"
1838 "Set network type\n"
1839 "point-to-point network type\n")
1841 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/network-type",
1843 no
? "broadcast" : "point-to-point");
1845 return nb_cli_apply_changes(vty
, NULL
);
1848 void cli_show_ip_isis_network_type(struct vty
*vty
, struct lyd_node
*dnode
,
1851 if (yang_dnode_get_enum(dnode
, NULL
) != CIRCUIT_T_P2P
)
1852 vty_out(vty
, " no");
1854 vty_out(vty
, " isis network point-to-point\n");
1858 * XPath: /frr-interface:lib/interface/frr-isisd:isis/priority
1860 DEFPY(isis_priority
, isis_priority_cmd
,
1861 "isis priority (0-127)$prio [level-1|level-2]$level",
1862 "IS-IS routing protocol\n"
1863 "Set priority for Designated Router election\n"
1865 "Specify priority for level-1 routing\n"
1866 "Specify priority for level-2 routing\n")
1868 if (!level
|| strmatch(level
, "level-1"))
1869 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-1",
1870 NB_OP_MODIFY
, prio_str
);
1871 if (!level
|| strmatch(level
, "level-2"))
1872 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-2",
1873 NB_OP_MODIFY
, prio_str
);
1875 return nb_cli_apply_changes(vty
, NULL
);
1878 DEFPY(no_isis_priority
, no_isis_priority_cmd
,
1879 "no isis priority [(0-127)] [level-1|level-2]$level",
1881 "IS-IS routing protocol\n"
1882 "Set priority for Designated Router election\n"
1884 "Specify priority for level-1 routing\n"
1885 "Specify priority for level-2 routing\n")
1887 if (!level
|| strmatch(level
, "level-1"))
1888 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-1",
1889 NB_OP_MODIFY
, NULL
);
1890 if (!level
|| strmatch(level
, "level-2"))
1891 nb_cli_enqueue_change(vty
, "./frr-isisd:isis/priority/level-2",
1892 NB_OP_MODIFY
, NULL
);
1894 return nb_cli_apply_changes(vty
, NULL
);
1897 void cli_show_ip_isis_priority(struct vty
*vty
, struct lyd_node
*dnode
,
1900 const char *l1
= yang_dnode_get_string(dnode
, "./level-1");
1901 const char *l2
= yang_dnode_get_string(dnode
, "./level-2");
1903 if (strmatch(l1
, l2
))
1904 vty_out(vty
, " isis priority %s\n", l1
);
1906 vty_out(vty
, " isis priority %s level-1\n", l1
);
1907 vty_out(vty
, " isis priority %s level-2\n", l2
);
1912 * XPath: /frr-isisd:isis/instance/log-adjacency-changes
1914 DEFPY(log_adj_changes
, log_adj_changes_cmd
, "[no] log-adjacency-changes",
1915 NO_STR
"Log changes in adjacency state\n")
1917 nb_cli_enqueue_change(vty
, "./log-adjacency-changes", NB_OP_MODIFY
,
1918 no
? "false" : "true");
1920 return nb_cli_apply_changes(vty
, NULL
);
1923 void cli_show_isis_log_adjacency(struct vty
*vty
, struct lyd_node
*dnode
,
1926 if (!yang_dnode_get_bool(dnode
, NULL
))
1927 vty_out(vty
, " no");
1928 vty_out(vty
, " log-adjacency-changes\n");
1931 void isis_cli_init(void)
1933 install_element(CONFIG_NODE
, &router_isis_cmd
);
1934 install_element(CONFIG_NODE
, &no_router_isis_cmd
);
1936 install_element(INTERFACE_NODE
, &ip_router_isis_cmd
);
1937 install_element(INTERFACE_NODE
, &ip6_router_isis_cmd
);
1938 install_element(INTERFACE_NODE
, &no_ip_router_isis_cmd
);
1940 install_element(ISIS_NODE
, &net_cmd
);
1942 install_element(ISIS_NODE
, &is_type_cmd
);
1943 install_element(ISIS_NODE
, &no_is_type_cmd
);
1945 install_element(ISIS_NODE
, &dynamic_hostname_cmd
);
1947 install_element(ISIS_NODE
, &set_overload_bit_cmd
);
1948 install_element(ISIS_NODE
, &set_attached_bit_cmd
);
1950 install_element(ISIS_NODE
, &metric_style_cmd
);
1951 install_element(ISIS_NODE
, &no_metric_style_cmd
);
1953 install_element(ISIS_NODE
, &area_passwd_cmd
);
1954 install_element(ISIS_NODE
, &domain_passwd_cmd
);
1955 install_element(ISIS_NODE
, &no_area_passwd_cmd
);
1957 install_element(ISIS_NODE
, &lsp_gen_interval_cmd
);
1958 install_element(ISIS_NODE
, &no_lsp_gen_interval_cmd
);
1959 install_element(ISIS_NODE
, &lsp_refresh_interval_cmd
);
1960 install_element(ISIS_NODE
, &no_lsp_refresh_interval_cmd
);
1961 install_element(ISIS_NODE
, &max_lsp_lifetime_cmd
);
1962 install_element(ISIS_NODE
, &no_max_lsp_lifetime_cmd
);
1963 install_element(ISIS_NODE
, &area_lsp_mtu_cmd
);
1964 install_element(ISIS_NODE
, &no_area_lsp_mtu_cmd
);
1966 install_element(ISIS_NODE
, &spf_interval_cmd
);
1967 install_element(ISIS_NODE
, &no_spf_interval_cmd
);
1968 install_element(ISIS_NODE
, &spf_delay_ietf_cmd
);
1969 install_element(ISIS_NODE
, &no_spf_delay_ietf_cmd
);
1971 install_element(ISIS_NODE
, &area_purge_originator_cmd
);
1973 install_element(ISIS_NODE
, &isis_mpls_te_on_cmd
);
1974 install_element(ISIS_NODE
, &no_isis_mpls_te_on_cmd
);
1975 install_element(ISIS_NODE
, &isis_mpls_te_router_addr_cmd
);
1976 install_element(ISIS_NODE
, &isis_mpls_te_inter_as_cmd
);
1978 install_element(ISIS_NODE
, &isis_default_originate_cmd
);
1979 install_element(ISIS_NODE
, &isis_redistribute_cmd
);
1981 install_element(ISIS_NODE
, &isis_topology_cmd
);
1983 install_element(INTERFACE_NODE
, &isis_passive_cmd
);
1985 install_element(INTERFACE_NODE
, &isis_passwd_cmd
);
1986 install_element(INTERFACE_NODE
, &no_isis_passwd_cmd
);
1988 install_element(INTERFACE_NODE
, &isis_metric_cmd
);
1989 install_element(INTERFACE_NODE
, &no_isis_metric_cmd
);
1991 install_element(INTERFACE_NODE
, &isis_hello_interval_cmd
);
1992 install_element(INTERFACE_NODE
, &no_isis_hello_interval_cmd
);
1994 install_element(INTERFACE_NODE
, &isis_hello_multiplier_cmd
);
1995 install_element(INTERFACE_NODE
, &no_isis_hello_multiplier_cmd
);
1997 install_element(INTERFACE_NODE
, &isis_threeway_adj_cmd
);
1999 install_element(INTERFACE_NODE
, &isis_hello_padding_cmd
);
2001 install_element(INTERFACE_NODE
, &csnp_interval_cmd
);
2002 install_element(INTERFACE_NODE
, &no_csnp_interval_cmd
);
2004 install_element(INTERFACE_NODE
, &psnp_interval_cmd
);
2005 install_element(INTERFACE_NODE
, &no_psnp_interval_cmd
);
2007 install_element(INTERFACE_NODE
, &circuit_topology_cmd
);
2009 install_element(INTERFACE_NODE
, &isis_circuit_type_cmd
);
2010 install_element(INTERFACE_NODE
, &no_isis_circuit_type_cmd
);
2012 install_element(INTERFACE_NODE
, &isis_network_cmd
);
2014 install_element(INTERFACE_NODE
, &isis_priority_cmd
);
2015 install_element(INTERFACE_NODE
, &no_isis_priority_cmd
);
2017 install_element(ISIS_NODE
, &log_adj_changes_cmd
);
2020 #endif /* ifndef FABRICD */