summaryrefslogtreecommitdiff
path: root/zebra/zebra_mlag.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-12-09 20:48:21 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-12-15 09:36:23 -0500
commit14d9bbbe5c6526f729f0bdbd7e0513d69feb1a87 (patch)
tree933c6981fdfc0c21ebd467f52525463546a92b52 /zebra/zebra_mlag.c
parentf4d7bc0820f04df798eb208fcce5f5f7e4b18034 (diff)
zebra: Allow zebra_mlag to compile with no j factor
If you compile FRR with no j factor zebra_mlag.c fails to build because the vtysh extraction methodology runs first before the protobuf compiler runs and that compilation does not have the proper dependancy chain built for the inclusions that zebra_mlag.c had. Moving the DEF* code into a zebra_mlag_vty.c which can be included in the vtysh extraction code and has no mlag.proto dependancies makes the compilation work better. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_mlag.c')
-rw-r--r--zebra/zebra_mlag.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/zebra/zebra_mlag.c b/zebra/zebra_mlag.c
index 7fbc9c118b..021a52c3a5 100644
--- a/zebra/zebra_mlag.c
+++ b/zebra/zebra_mlag.c
@@ -32,10 +32,6 @@
#include "zebra/zapi_msg.h"
#include "zebra/debug.h"
-#ifndef VTYSH_EXTRACT_PL
-#include "zebra/zebra_mlag_clippy.c"
-#endif
-
DEFINE_HOOK(zebra_mlag_private_write_data,
(uint8_t *data, uint32_t len), (data, len))
DEFINE_HOOK(zebra_mlag_private_monitor_state, (), ())
@@ -586,29 +582,8 @@ enum mlag_role zebra_mlag_get_role(void)
return zrouter.mlag_info.role;
}
-DEFUN_HIDDEN (show_mlag,
- show_mlag_cmd,
- "show zebra mlag",
- SHOW_STR
- ZEBRA_STR
- "The mlag role on this machine\n")
-{
- char buf[MLAG_ROLE_STRSIZE];
-
- vty_out(vty, "MLag is configured to: %s\n",
- mlag_role2str(zrouter.mlag_info.role, buf, sizeof(buf)));
-
- return CMD_SUCCESS;
-}
-
-DEFPY_HIDDEN(test_mlag, test_mlag_cmd,
- "test zebra mlag <none$none|primary$primary|secondary$secondary>",
- "Test code\n"
- ZEBRA_STR
- "Modify the Mlag state\n"
- "Mlag is not setup on the machine\n"
- "Mlag is setup to be primary\n"
- "Mlag is setup to be the secondary\n")
+int32_t zebra_mlag_test_mlag_internal(const char *none, const char *primary,
+ const char *secondary)
{
enum mlag_role orig = zrouter.mlag_info.role;
char buf1[MLAG_ROLE_STRSIZE], buf2[MLAG_ROLE_STRSIZE];
@@ -650,8 +625,7 @@ DEFPY_HIDDEN(test_mlag, test_mlag_cmd,
void zebra_mlag_init(void)
{
- install_element(VIEW_NODE, &show_mlag_cmd);
- install_element(ENABLE_NODE, &test_mlag_cmd);
+ zebra_mlag_vty_init();
/*
* Intialiaze the MLAG Global variables