Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VOQ][saidump] Enhance saidump with new option -r to parser the JSON file and displays/format the right output, fix compiling error #1335

Open
wants to merge 7 commits into
base: 202305
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
autoconf-archive \
uuid-dev \
libjansson-dev \
nlohmann-json3-dev \
python

- if: matrix.language == 'cpp'
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ AC_OUTPUT(Makefile
unittest/lib/Makefile
unittest/vslib/Makefile
unittest/syncd/Makefile
unittest/saidump/Makefile
pyext/Makefile
pyext/py2/Makefile
pyext/py3/Makefile)
5 changes: 4 additions & 1 deletion saidump/Makefile.am
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ AM_CXXFLAGS = $(SAIINC) -I$(top_srcdir)/lib

bin_PROGRAMS = saidump

saidump_SOURCES = saidump.cpp
saidump_SOURCES = main.cpp saidump.cpp
saidump_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
saidump_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS)
saidump_LDADD = -lhiredis -lswsscommon -lpthread -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta \
-L$(top_srcdir)/lib/.libs -lsairedis -lzmq $(CODE_COVERAGE_LIBS)

noinst_LIBRARIES = libsaidump.a
libsaidump_a_SOURCES = saidump.cpp
21 changes: 21 additions & 0 deletions saidump/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include "saidump.h"

using namespace syncd;

int main(int argc, char **argv)
{
SWSS_LOG_ENTER();
swss::Logger::getInstance().setMinPrio(swss::Logger::SWSS_DEBUG);
swss::Logger::getInstance().setMinPrio(swss::Logger::SWSS_NOTICE);
swss::Logger::getInstance().setMinPrio(swss::Logger::SWSS_INFO);
JunhongMao marked this conversation as resolved.
Show resolved Hide resolved

SaiDump m_saiDump;

if(SAI_STATUS_SUCCESS != m_saiDump.handleCmdLine(argc, argv))
{
return EXIT_FAILURE;
}

m_saiDump.dumpFromRedisDb();
return EXIT_SUCCESS;
}
Loading
Loading