Common components for SONiC switch state service
static analysis:
sonic-swss-common builds:
The SWitch State Service (SWSS) common library provides libraries for database communications, netlink wrappers, and other functions needed by SWSS.
Checkout the source:
git clone --recursive https://github.com/sonic-net/sonic-swss-common
Install build dependencies:
sudo apt-get install make libtool m4 autoconf dh-exec debhelper cmake pkg-config \
libhiredis-dev libnl-3-dev libnl-genl-3-dev libnl-route-3-dev \
libnl-nf-3-dev swig3.0 libpython2.7-dev libpython3-dev \
libgtest-dev libgmock-dev libboost-dev
Build and Install Google Test and Mock from DEB source packages:
cd /usr/src/gtest && sudo cmake . && sudo make
You can compile and install from source using:
./autogen.sh
./configure
make && sudo make install
You can also build a debian package using:
./autogen.sh
./configure
dpkg-buildpackage -us -uc -b
$ ./autogen.sh
$ ./configure --enable-debug 'CXXFLAGS=-O0 -g'
$ make clean
$ GCC_COLORS=1 make
sudo sed -i 's/notify-keyspace-events ""/notify-keyspace-events AKE/' /etc/redis/redis.conf
sudo service redis-server start
tests/tests
For general questions, setup help, or troubleshooting:
For bug reports or feature requests, please open an Issue.
Please read the contributors guide for information about how to contribute.
All contributors must sign an Individual Contributor License Agreement (ICLA) before contributions can be accepted. This process is managed by the Linux Foundation - EasyCLA and automated via a GitHub bot. If the contributor has not yet signed a CLA, the bot will create a comment on the pull request containing a link to electronically sign the CLA.
We're following basic GitHub Flow. If you have no idea what we're talking about, check out GitHub's official guide. Note that merge is only performed by the repository maintainer.
Guide for performing commits:
[component/folder touched]: Description intent of your changes [List of changes] Signed-off-by: Your Name [email protected]
For example:
swss-common: Stabilize the ConsumerTable * Fixing autoreconf * Fixing unit-tests by adding checkers and initialize the DB before start * Adding the ability to select from multiple channels * Health-Monitor - The idea of the patch is that if something went wrong with the notification channel, we will have the option to know about it (Query the LLEN table length). Signed-off-by: [email protected]