]> git.proxmox.com Git - mirror_frr.git/blame - zebra/zebra_mlag_vty.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / zebra / zebra_mlag_vty.c
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
14d9bbbe
DS
2/* Zebra Mlag vty Code.
3 * Copyright (C) 2019 Cumulus Networks, Inc.
4 * Donald Sharp
14d9bbbe
DS
5 */
6#include <zebra.h>
7
8#include "vty.h"
9#include "command.h"
10
11#include "zebra_router.h"
fd193241 12#include "zebra_mlag_vty.h"
14d9bbbe
DS
13#include "debug.h"
14#include "zapi_msg.h"
15
14d9bbbe 16#include "zebra/zebra_mlag_vty_clippy.c"
14d9bbbe
DS
17
18DEFUN_HIDDEN (show_mlag,
19 show_mlag_cmd,
20 "show zebra mlag",
21 SHOW_STR
22 ZEBRA_STR
23 "The mlag role on this machine\n")
24{
25 char buf[MLAG_ROLE_STRSIZE];
26
27 vty_out(vty, "MLag is configured to: %s\n",
28 mlag_role2str(zrouter.mlag_info.role, buf, sizeof(buf)));
29
30 return CMD_SUCCESS;
31}
32
33DEFPY_HIDDEN(test_mlag, test_mlag_cmd,
34 "test zebra mlag <none$none|primary$primary|secondary$secondary>",
35 "Test code\n"
36 ZEBRA_STR
37 "Modify the Mlag state\n"
38 "Mlag is not setup on the machine\n"
39 "Mlag is setup to be primary\n"
40 "Mlag is setup to be the secondary\n")
41{
42 return zebra_mlag_test_mlag_internal(none, primary, secondary);
43}
44
45void zebra_mlag_vty_init(void)
46{
47 install_element(VIEW_NODE, &show_mlag_cmd);
48 install_element(ENABLE_NODE, &test_mlag_cmd);
49}