Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
3 changes: 2 additions & 1 deletion debian/python-saithrift.install
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
debian/usr/local/lib/python2.7/site-packages/* /usr/lib/python2.7/dist-packages/
#compatiable with bookworm python 3.11 environment and build with python3
debian/usr/local/local/lib/python3*/dist-packages/* /usr/lib/python3/dist-packages/
5 changes: 4 additions & 1 deletion test/saithriftv2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ CTYPESGEN = /usr/local/bin/ctypesgen.py
endif

ifeq ($(platform),vs)
LIBS = -lthrift -lpthread -lsaivs -lsaimeta -lsaimetadata -lzmq
LIBS = -lthrift -lpthread -lsaivs -lsaimeta -lsaimetadata -lzmq -lswsscommon
else ifeq ($(platform),vpp)
LIBS = -lthrift -lpthread -lsaivs -lsaimeta -lsaimetadata -lzmq \
-lvlib -lvlibapi -lvppapiclient -lvlibmemoryclient -lvppinfra -lswsscommon
else
LIBS = -lthrift -lpthread -lsai -lsaimetadata
endif
Expand Down
2 changes: 1 addition & 1 deletion test/saithriftv2/convert_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class sai_common_api(SAIEnum):
import enum
class SAIEnum(enum.IntEnum):
def __str__(self):
return super().__str__().split(\".\")[1]\n"""
return self.name\n"""
ENUM_PREFIX = "enum__sai_"
SAI_NAME = "SAI"
ENUM_TYPE = "= c_int"
Expand Down
4 changes: 4 additions & 0 deletions test/saithriftv2/src/saiserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include "sai_rpc.h"
#include <swss/logger.h>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds extra dependency on SONiC swss. This is not right for the projects running independently from SONiC.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree! I was using that before to route saiserver logs to stdout for debugging. We do not need it anymore; I have pushed another commit to remove it. Thanks Fred!


#define UNREFERENCED_PARAMETER(P) (P)

Expand Down Expand Up @@ -269,6 +270,9 @@ void handleInitScript(const std::string& initScript)
int
main(int argc, char* argv[])
{
swss::Logger::getInstance().setMinPrio(swss::Logger::SWSS_DEBUG);
swss::Logger::getInstance().swssOutputNotify("saiserver", "STDOUT");

int rv = 0;

auto options = handleCmdLine(argc, argv);
Expand Down
Loading