]> git.proxmox.com Git - mirror_frr.git/blob - isisd/isis_vty_fabricd.c
Merge pull request #3418 from pguibert6WIND/bgp_rfapi_path_info_extra_free
[mirror_frr.git] / isisd / isis_vty_fabricd.c
1 /*
2 * IS-IS Rout(e)ing protocol - isis_vty_fabricd.c
3 *
4 * This file contains the CLI that is specific to OpenFabric
5 *
6 * Copyright (C) 2018 Christian Franke, for NetDEF, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public Licenseas published by the Free
10 * Software Foundation; either version 2 of the License, or (at your option)
11 * any later version.
12 *
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
16 * more details.
17 *
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
21 */
22 #include <zebra.h>
23
24 #include "command.h"
25
26 #include "isisd.h"
27 #include "isis_vty_common.h"
28 #include "fabricd.h"
29 #include "isis_tlvs.h"
30
31 DEFUN (fabric_tier,
32 fabric_tier_cmd,
33 "fabric-tier (0-14)",
34 "Statically configure the tier to advertise\n"
35 "Tier to advertise\n")
36 {
37 VTY_DECLVAR_CONTEXT(isis_area, area);
38
39 uint8_t tier = atoi(argv[1]->arg);
40
41 fabricd_configure_tier(area, tier);
42 return CMD_SUCCESS;
43 }
44
45 DEFUN (no_fabric_tier,
46 no_fabric_tier_cmd,
47 "no fabric-tier [(0-14)]",
48 NO_STR
49 "Statically configure the tier to advertise\n"
50 "Tier to advertise\n")
51 {
52 VTY_DECLVAR_CONTEXT(isis_area, area);
53
54 fabricd_configure_tier(area, ISIS_TIER_UNDEFINED);
55 return CMD_SUCCESS;
56 }
57
58 DEFUN (debug_fabric_flooding,
59 debug_fabric_flooding_cmd,
60 "debug openfabric flooding",
61 DEBUG_STR
62 PROTO_HELP
63 "Flooding optimization algorithm\n")
64 {
65 isis->debugs |= DEBUG_FABRICD_FLOODING;
66 print_debug(vty, DEBUG_FABRICD_FLOODING, 1);
67
68 return CMD_SUCCESS;
69 }
70
71 DEFUN (no_debug_fabric_flooding,
72 no_debug_fabric_flooding_cmd,
73 "no debug openfabric flooding",
74 NO_STR
75 UNDEBUG_STR
76 PROTO_HELP
77 "Flooding optimization algorithm\n")
78 {
79 isis->debugs &= ~DEBUG_FABRICD_FLOODING;
80 print_debug(vty, DEBUG_FABRICD_FLOODING, 0);
81
82 return CMD_SUCCESS;
83 }
84
85
86 void isis_vty_daemon_init(void)
87 {
88 install_element(ROUTER_NODE, &fabric_tier_cmd);
89 install_element(ROUTER_NODE, &no_fabric_tier_cmd);
90 install_element(ENABLE_NODE, &debug_fabric_flooding_cmd);
91 install_element(ENABLE_NODE, &no_debug_fabric_flooding_cmd);
92 install_element(CONFIG_NODE, &debug_fabric_flooding_cmd);
93 install_element(CONFIG_NODE, &no_debug_fabric_flooding_cmd);
94 }