]>
git.proxmox.com Git - mirror_frr.git/blob - zebra/zebra_mlag_vty.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Zebra Mlag vty Code.
3 * Copyright (C) 2019 Cumulus Networks, Inc.
11 #include "zebra_router.h"
12 #include "zebra_mlag_vty.h"
16 #include "zebra/zebra_mlag_vty_clippy.c"
18 DEFUN_HIDDEN (show_mlag
,
23 "The mlag role on this machine\n")
25 char buf
[MLAG_ROLE_STRSIZE
];
27 vty_out(vty
, "MLag is configured to: %s\n",
28 mlag_role2str(zrouter
.mlag_info
.role
, buf
, sizeof(buf
)));
33 DEFPY_HIDDEN(test_mlag
, test_mlag_cmd
,
34 "test zebra mlag <none$none|primary$primary|secondary$secondary>",
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")
42 return zebra_mlag_test_mlag_internal(none
, primary
, secondary
);
45 void zebra_mlag_vty_init(void)
47 install_element(VIEW_NODE
, &show_mlag_cmd
);
48 install_element(ENABLE_NODE
, &test_mlag_cmd
);