Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
15d0534
Merge pull request #1 from futurewei-cloud/master
lfu-ps Aug 18, 2021
8958009
Merge branch 'futurewei-cloud:master' into master
lfu-ps Aug 27, 2021
514fee3
Enhance openflow driver performance
lfu-ps Aug 17, 2021
877e7f6
Launch openflow controller in aca_main
lfu-ps Aug 17, 2021
a792e89
Integration with main
lfu-ps Aug 18, 2021
223ee07
Prepare ovs dependencies in init script
lfu-ps Aug 27, 2021
e0270d8
Revert relative path to locate proto files
lfu-ps Aug 27, 2021
5d305c9
Fix relative path to proto files for grpc folder
lfu-ps Aug 27, 2021
23b93b2
Also prepare ovs dependencies in docker preparation
lfu-ps Aug 27, 2021
afbf429
Fix docker file
lfu-ps Aug 27, 2021
767ea55
Force apt get install in docker file
lfu-ps Aug 27, 2021
e4452eb
Fix ovs dependency and installation
lfu-ps Aug 27, 2021
79574ad
Call openflow execution from OFConnection instead, otherwise flows au…
lfu-ps Aug 31, 2021
c814163
setup default flow
lfu-ps Aug 31, 2021
49ba59a
Integrate with packet-in and packet-out for dhcp and on-demand
lfu-ps Sep 2, 2021
92b4cab
Leverage smart pointer to avoid memory leak
lfu-ps Sep 2, 2021
e1bb690
Fix aca_vlan_manager output of_port number
lfu-ps Sep 2, 2021
8b9c113
Fix default allow flows for both br-int and br-tun
lfu-ps Sep 2, 2021
7d5ef1c
Fix missing L2 neighbor rule
lfu-ps Sep 2, 2021
77301cd
Pass packet-in event processing to on-demand-engine thread pool for b…
lfu-ps Sep 2, 2021
ea57254
Add common dependencies installation in init sh
lfu-ps Sep 3, 2021
29e6625
Fix init scripts for fresh runtime preparation
lfu-ps Sep 3, 2021
e135023
Address code review feedbacks
lfu-ps Sep 9, 2021
4934df2
Fix environment setup script for Jenkins CI/CD run
lfu-ps Sep 9, 2021
9d430e4
Run shell commands from sudo
lfu-ps Sep 9, 2021
5a88544
Move bash to top of the file
lfu-ps Sep 9, 2021
105aaf6
Fix docker file
lfu-ps Sep 9, 2021
489db61
Address license reference for included library and written files
lfu-ps Sep 10, 2021
bfa8c6a
Fix author
lfu-ps Sep 10, 2021
ad87fab
Revert debug mode
lfu-ps Sep 10, 2021
8d78f13
Enhance openflow communication performance (#261)
lfu-ps Sep 11, 2021
cb5f44b
Update pulsar to 2.8.0 (#263)
zzxgzgz Sep 14, 2021
57682ee
Batching and parallel resource state processing for million ovs flows…
zzxgzgz Oct 2, 2021
35ccab3
Changed implementation for adding/removing switches from maps, in ord…
zzxgzgz Oct 20, 2021
e08d47b
Changed to use of controller to delete l2 neighbor (#270)
zzxgzgz Oct 28, 2021
d0c6271
Merge branch 'master' into of_controller_lock
zzxgzgz Oct 28, 2021
0a2f0b6
Removed commented code, also added comments for OFController::add_swi…
zzxgzgz Oct 28, 2021
0ffe4f0
Merge pull request #271 from zzxgzgz/of_controller_lock
lfu-ps Nov 1, 2021
02e05c4
Tried to let client know a call is finished
zzxgzgz Nov 16, 2021
717bbf6
Tried to let client know a call is finished
zzxgzgz Nov 16, 2021
1508029
Tried to let client know a call is finished
zzxgzgz Nov 16, 2021
d2fd955
Suspect if it is the gsoperationreply.clear() that causes the crash
zzxgzgz Nov 16, 2021
15c46da
Try to clear a reply right before it is FINISHed
zzxgzgz Nov 16, 2021
cfae06e
Maybe shouldn't clear the reply, probably doesn't have to, too
zzxgzgz Nov 16, 2021
9bbe195
Still crashing
zzxgzgz Nov 16, 2021
22d15fe
Try to not delete the call object
zzxgzgz Nov 16, 2021
861b930
Try to delete call object separately
zzxgzgz Nov 16, 2021
f1bd3f3
Try to delete call object separately
zzxgzgz Nov 16, 2021
e734418
Added logs in DEFAULT state
zzxgzgz Nov 16, 2021
a023cb4
Added more logs
zzxgzgz Nov 16, 2021
0d735c8
Added DESTROY state for deleting the call object
zzxgzgz Nov 16, 2021
724e48a
Added DESTROY state for deleting the call object
zzxgzgz Nov 16, 2021
49b5650
Removed logs
zzxgzgz Nov 18, 2021
29a15d3
Merge pull request #272 from zzxgzgz/onCompleted_onError
lfu-ps Nov 24, 2021
a5c1da0
Update submodule Alcor to latest version (#273)
VanderChen Dec 10, 2021
74a78cf
Add listeners for mulitcast and unicast consumers (#268)
luyaoluo Dec 10, 2021
3bb4ee3
ACA task framework refactoring (#275)
zzxgzgz Jan 27, 2022
0e7ee82
Add description of deprecated code path of ovs control, but also enab…
lfu-ps Jan 27, 2022
c3108a7
Routing rule gsv2 (#267)
zzxgzgz Feb 1, 2022
3a49c06
Merge branch 'master' of https://github.com/futurewei-cloud/alcor-con…
lfu-ps Jun 9, 2022
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
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ IncludeCategories:
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
#IndentPPDirectives: None # Unknown to clang-format-5.0
IndentWidth: 2
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(CPPKAFKA_VERSION "${CPPKAFKA_VERSION_MAJOR}.${CPPKAFKA_VERSION_MINOR}.${CPPK
set(RDKAFKA_MIN_VERSION 0x00090400)

#add_compile_options(-O0) # enable no optimization during development
add_compile_options(-Wall -Wextra -pedantic -Wpedantic -Werror)
add_compile_options(-Wall -Wextra -pedantic -Wpedantic -Wno-error -Wno-unused-variable -Wno-unused-parameter -Wno-sequence-point -Wno-parentheses -Wno-pedantic -Wno-reorder -Wno-sign-compare)

add_subdirectory(src)
add_subdirectory(test)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ This main repository of Alcor Control Agent is organized as follows:

## Notes
* ovs_control.h and ovs_control.cpp is based on https://github.com/openvswitch/ovs/blob/master/utilities/ovs-ofctl.c
* libfluid-base/*.h(*.cpp) and libfluid-msg/*.h(*.cpp) are based on https://github.com/OpenNetworkingFoundation/libfluid, the usage of derived class is based on https://github.com/OpenNetworkingFoundation/libfluid/tree/master/examples/controller
* aca_grpc.cpp is based on https://github.com/grpc/grpc/blob/v1.30.0/examples/cpp/route_guide/route_guide_server.cc
* HashMap.h and HashNode.h is based on https://github.com/kshk123/hashMap
86 changes: 80 additions & 6 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FROM fwnetworking/ubuntu:18.04
RUN rm -rf /var/local/git && mkdir -p /var/local/git

RUN echo "1--- installing common dependencies ---" && \
apt-get update -y && apt-get install -y \
rpcbind \
Expand Down Expand Up @@ -108,26 +110,98 @@ RUN echo "4--- cloning grpc repo ---" && \
rm -rf /var/local/git/grpc && \
cd ~

ENV OVS_RELEASE_TAG branch-2.12
ENV OVS_INCLUDE_HEADERS='include/openvswitch/compiler.h \
include/openvswitch/dynamic-string.h \
include/openvswitch/hmap.h \
include/openvswitch/flow.h \
include/openvswitch/geneve.h \
include/openvswitch/json.h \
include/openvswitch/list.h \
include/openvswitch/netdev.h \
include/openvswitch/match.h \
include/openvswitch/meta-flow.h \
include/openvswitch/ofpbuf.h \
include/openvswitch/ofp-actions.h \
include/openvswitch/ofp-ed-props.h \
include/openvswitch/ofp-errors.h \
include/openvswitch/ofp-msgs.h \
include/openvswitch/ofp-parse.h \
include/openvswitch/ofp-print.h \
include/openvswitch/ofp-prop.h \
include/openvswitch/ofp-util.h \
include/openvswitch/packets.h \
include/openvswitch/poll-loop.h \
include/openvswitch/rconn.h \
include/openvswitch/shash.h \
include/openvswitch/thread.h \
include/openvswitch/token-bucket.h \
include/openvswitch/tun-metadata.h \
include/openvswitch/type-props.h \
include/openvswitch/types.h \
include/openvswitch/util.h \
include/openvswitch/uuid.h \
include/openvswitch/version.h \
include/openvswitch/vconn.h \
include/openvswitch/vlog.h \
include/openvswitch/nsh.h '
ENV OPENFLOW_HEADERS='include/openflow/intel-ext.h \
include/openflow/netronome-ext.h \
include/openflow/nicira-ext.h \
include/openflow/openflow-1.0.h \
include/openflow/openflow-1.1.h \
include/openflow/openflow-1.2.h \
include/openflow/openflow-1.3.h \
include/openflow/openflow-1.4.h \
include/openflow/openflow-1.5.h \
include/openflow/openflow-1.6.h \
include/openflow/openflow-common.h \
include/openflow/openflow.h '
RUN echo "5--- installing openvswitch dependancies ---" && \
git clone -b ${OVS_RELEASE_TAG} https://github.com/openvswitch/ovs.git /var/local/git/openvswitch && \
rm -f /tmp/get-pip.py > /dev/null 2>&1 && \
apt-get install -y python2.7 && \
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py -O /tmp/get-pip.py && \
python2.7 /tmp/get-pip.py && \
pip2 install six && \
apt-get install -y libevent-dev && \
mkdir -p /var/local/git/openvswitch && \
cd /var/local/git/openvswitch && \
git clone -b "branch-2.12" https://github.com/openvswitch/ovs.git /var/local/git/openvswitch && \
cd /var/local/git/openvswitch && \
./boot.sh && \
./configure --prefix=/usr/local --localstatedir=/var --sysconfdir=/etc --enable-shared --enable-ndebug && \
make && \
make install && \
mkdir -p /usr/local/include/openvswitch && \
cp /var/local/git/openvswitch/lib/vconn-provider.h /usr/local/include/openvswitch/vconn-provider.h && \
cp ./lib/vconn-provider.h /usr/local/include/openvswitch && \
cp ./include/openvswitch/namemap.h /usr/local/include/openvswitch && \
cd /var/local/git/openvswitch && \
wget https://www.openvswitch.org/releases/openvswitch-2.9.8.tar.gz && \
tar -xvzf openvswitch-2.9.8.tar.gz && \
cd openvswitch-2.9.8 && \
./configure && make && \
cp ${OVS_INCLUDE_HEADERS} /usr/local/include/openvswitch && \
cp ${OPENFLOW_HEADERS} /usr/local/include/openflow && \
cp ./lib/.libs/libopenvswitch.a /usr/local/lib/ && \
rm -rf /var/local/git/openvswitch && \
test -f /usr/bin/ovs-vsctl && rm -rf /usr/local/sbin/ov* /usr/local/bin/ov* /usr/local/bin/vtep* && \
cd ~

ENV PULSAR_RELEASE_TAG='pulsar-2.6.1'
RUN echo "7--- installing pulsar dependacies ---" && \
ENV PULSAR_RELEASE_TAG='pulsar-2.8.1'
RUN echo "6--- installing pulsar dependacies ---" && \
mkdir -p /var/local/git/pulsar && \
wget https://archive.apache.org/dist/pulsar/${PULSAR_RELEASE_TAG}/DEB/apache-pulsar-client.deb -O /var/local/git/pulsar/apache-pulsar-client.deb && \
wget https://archive.apache.org/dist/pulsar/${PULSAR_RELEASE_TAG}/DEB/apache-pulsar-client-dev.deb -O /var/local/git/pulsar/apache-pulsar-client-dev.deb && \
cd /var/local/git/pulsar && \
apt install -y ./apache-pulsar-client*.deb && \
rm -rf /var/local/git/pulsar

RUN echo "7--- installing marl ---" && \
mkdir -p /var/local/git/marl && \
cd /var/local/git/marl && \
git clone https://github.com/google/marl.git && \
cd /var/local/git/marl/marl && \
git submodule update --init && \
mkdir /var/local/git/marl/marl/build && \
cd /var/local/git/marl/marl/build && \
cmake .. -DMARL_BUILD_EXAMPLES=1 -DMARL_BUILD_TESTS=1 && \
make && \
cd ~
134 changes: 117 additions & 17 deletions build/aca-machine-init.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

# MIT License
# Copyright(c) 2020 Futurewei Cloud
#
Expand All @@ -12,20 +14,30 @@
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#!/bin/bash

BUILD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo "build path is $BUILD"

rm -rf /var/local/git
mkdir -p /var/local/git

# TODO: remove the unneeded dependencies
echo "1--- installing mizar dependencies ---" && \
echo "1--- installing common dependencies ---" && \
apt-get update -y && apt-get install -y \
rpcbind \
rsyslog \
build-essential \
make \
g++ \
unzip \
cmake \
clang-9 \
llvm-9 \
libelf-dev \
doxygen \
zlib1g-dev \
libssl-dev \
libboost-program-options-dev \
libboost-all-dev \
iproute2 \
net-tools \
iputils-ping \
Expand All @@ -35,7 +47,15 @@ echo "1--- installing mizar dependencies ---" && \
python3-pip \
netcat \
libcmocka-dev \
lcov
lcov \
git \
autoconf \
automake \
dh-autoreconf \
pkg-config \
libtool \
wget \
uuid-dev
pip3 install httpserver netaddr

echo "2--- installing librdkafka ---" && \
Expand Down Expand Up @@ -105,21 +125,94 @@ echo "5--- cloning grpc repo ---" && \
rm -rf /var/local/git/grpc && \
cd ~

OVS_RELEASE_TAG="branch-2.12"
OVS_INCLUDE_HEADERS="include/openvswitch/compiler.h \
include/openvswitch/dynamic-string.h \
include/openvswitch/hmap.h \
include/openvswitch/flow.h \
include/openvswitch/geneve.h \
include/openvswitch/json.h \
include/openvswitch/list.h \
include/openvswitch/netdev.h \
include/openvswitch/match.h \
include/openvswitch/meta-flow.h \
include/openvswitch/ofpbuf.h \
include/openvswitch/ofp-actions.h \
include/openvswitch/ofp-ed-props.h \
include/openvswitch/ofp-errors.h \
include/openvswitch/ofp-msgs.h \
include/openvswitch/ofp-parse.h \
include/openvswitch/ofp-print.h \
include/openvswitch/ofp-prop.h \
include/openvswitch/ofp-util.h \
include/openvswitch/packets.h \
include/openvswitch/poll-loop.h \
include/openvswitch/rconn.h \
include/openvswitch/shash.h \
include/openvswitch/thread.h \
include/openvswitch/token-bucket.h \
include/openvswitch/tun-metadata.h \
include/openvswitch/type-props.h \
include/openvswitch/types.h \
include/openvswitch/util.h \
include/openvswitch/uuid.h \
include/openvswitch/version.h \
include/openvswitch/vconn.h \
include/openvswitch/vlog.h \
include/openvswitch/nsh.h "
OPENFLOW_HEADERS="include/openflow/intel-ext.h \
include/openflow/netronome-ext.h \
include/openflow/nicira-ext.h \
include/openflow/openflow-1.0.h \
include/openflow/openflow-1.1.h \
include/openflow/openflow-1.2.h \
include/openflow/openflow-1.3.h \
include/openflow/openflow-1.4.h \
include/openflow/openflow-1.5.h \
include/openflow/openflow-1.6.h \
include/openflow/openflow-common.h \
include/openflow/openflow.h "
echo "6--- installing openvswitch dependancies ---" && \
git clone -b $OVS_RELEASE_TAG https://github.com/openvswitch/ovs.git /var/local/git/openvswitch && \
sudo rm -f /tmp/get-pip.py > /dev/null 2>&1 && \
sudo apt-get install -y python2.7 && \
sudo wget https://bootstrap.pypa.io/pip/2.7/get-pip.py -O /tmp/get-pip.py && \
sudo python2.7 /tmp/get-pip.py && \
sudo pip2 install six && \
apt-get install -y libevent-dev && \
mkdir -p /var/local/git/openvswitch && \
git clone -b "branch-2.12" https://github.com/openvswitch/ovs.git /var/local/git/openvswitch && \
cd /var/local/git/openvswitch && \
./boot.sh && \
./configure --prefix=/usr/local --localstatedir=/var --sysconfdir=/etc --enable-shared --enable-ndebug && \
make && \
make install && \
cp /var/local/git/openvswitch/lib/vconn-provider.h /usr/local/include/openvswitch/vconn-provider.h && \
cp ./lib/vconn-provider.h /usr/local/include/openvswitch && \
cp ./include/openvswitch/namemap.h /usr/local/include/openvswitch && \
cd /var/local/git/openvswitch && \
wget https://www.openvswitch.org/releases/openvswitch-2.9.8.tar.gz && \
tar -xvzf openvswitch-2.9.8.tar.gz && \
cd openvswitch-2.9.8 && \
./configure && make && \
cp $OVS_INCLUDE_HEADERS /usr/local/include/openvswitch && \
cp $OPENFLOW_HEADERS /usr/local/include/openflow && \
cp ./lib/.libs/libopenvswitch.a /usr/local/lib/ && \
rm -rf /var/local/git/openvswitch && \
test -f /usr/bin/ovs-vsctl && rm -rf /usr/local/sbin/ov* /usr/local/bin/ov* /usr/local/bin/vtep* && \
cd ~

PULSAR_RELEASE_TAG='pulsar-2.6.1'
echo "7--- installing pulsar dependacies ---" && \
echo "7--- installing marl ---" && \
mkdir -p /var/local/git/marl && \
cd /var/local/git/marl && \
git clone https://github.com/google/marl.git && \
cd /var/local/git/marl/marl && \
git submodule update --init && \
mkdir /var/local/git/marl/marl/build && \
cd /var/local/git/marl/marl/build && \
cmake .. -DMARL_BUILD_EXAMPLES=1 -DMARL_BUILD_TESTS=1 && \
make && \
cd ~

PULSAR_RELEASE_TAG='pulsar-2.8.1'
echo "8--- installing pulsar dependacies ---" && \
mkdir -p /var/local/git/pulsar && \
wget https://archive.apache.org/dist/pulsar/${PULSAR_RELEASE_TAG}/DEB/apache-pulsar-client.deb -O /var/local/git/pulsar/apache-pulsar-client.deb && \
wget https://archive.apache.org/dist/pulsar/${PULSAR_RELEASE_TAG}/DEB/apache-pulsar-client-dev.deb -O /var/local/git/pulsar/apache-pulsar-client-dev.deb && \
Expand All @@ -128,16 +221,23 @@ echo "7--- installing pulsar dependacies ---" && \
rm -rf /var/local/git/pulsar
cd ~

echo "8--- building alcor-control-agent"
cd $BUILD/.. && cmake . && make

if [ "$1" == "delete-bridges" ]; then
echo "9--- deleting br-tun and br-int if requested"
echo "9--- building alcor-control-agent"
cd $BUILD/.. && cmake . && \
# after cmake ., modify the generated link.txt s so that the "-lssl" and "-lcrypto" appears after the openvswitch, so that it can compile
sed -i 's/\(-ldl -lrt -lm -lpthread\)/-lssl -lcrypto \1/' src/CMakeFiles/AlcorControlAgent.dir/link.txt && \
sed -i 's/\(-ldl -lrt -lm -lpthread\)/-lssl -lcrypto \1/' test/CMakeFiles/aca_tests.dir/link.txt && \
sed -i 's/\(-ldl -lrt -lm -lpthread\)/-lssl -lcrypto \1/' test/CMakeFiles/gs_tests.dir/link.txt && \
make
if [ -n "$1" -a "$1" = "delete-bridges" ]; then
echo "10--- deleting br-tun and br-int if requested"
PATH=$PATH:/usr/local/share/openvswitch/scripts \
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
ovs-ctl --system-id=random --delete-bridges restart
fi

echo "10--- running alcor-control-agent"
# sends output to null device, but stderr to console
nohup $BUILD/bin/AlcorControlAgent -d > /dev/null 2>&1 &
echo "11--- running alcor-control-agent"
# kill current AlcorControlAgent process if any
pkill -f AlcorControlAgent
# launch newly built AlcorControlAgent with default debug mode as 'false'
# sends output to null device, but stderr to console
nohup $BUILD/bin/AlcorControlAgent > /dev/null 2>&1 &
20 changes: 15 additions & 5 deletions build/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

# MIT License
# Copyright(c) 2020 Futurewei Cloud
#
Expand All @@ -12,8 +14,6 @@
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#!/bin/bash

BUILD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo "build path is $BUILD"

Expand All @@ -32,14 +32,20 @@ docker start a1
if [ "$1" != "test" ]; then
# Build alcor control agent
echo "--- building alcor-control-agent ---"
docker exec a1 bash -c "cd /mnt/host/code && cmake . && make && \
docker exec a1 bash -c "cd /mnt/host/code && cmake . && \
sed -i 's/\(-ldl -lrt -lm -lpthread\)/-lssl -lcrypto \1/' src/CMakeFiles/AlcorControlAgent.dir/link.txt && \
sed -i 's/\(-ldl -lrt -lm -lpthread\)/-lssl -lcrypto \1/' test/CMakeFiles/aca_tests.dir/link.txt && \
sed -i 's/\(-ldl -lrt -lm -lpthread\)/-lssl -lcrypto \1/' test/CMakeFiles/gs_tests.dir/link.txt && make && \
/etc/init.d/openvswitch-switch restart && \
ovs-vswitchd --pidfile --detach"
else
sed -i.bak -E 's/("add-br )([a-z]+-[a-z]+)(")/\1\2 -- set bridge \2 datapath_type=netdev\3/g' $BUILD/../src/ovs/aca_ovs_l2_programmer.cpp
# Build alcor control agent
echo "--- building alcor-control-agent pre test ---"
docker exec a1 bash -c "cd /mnt/host/code && cmake . && make"
docker exec a1 bash -c "cd /mnt/host/code && cmake . && \
sed -i 's/\(-ldl -lrt -lm -lpthread\)/-lssl -lcrypto \1/' src/CMakeFiles/AlcorControlAgent.dir/link.txt && \
sed -i 's/\(-ldl -lrt -lm -lpthread\)/-lssl -lcrypto \1/' test/CMakeFiles/aca_tests.dir/link.txt && \
sed -i 's/\(-ldl -lrt -lm -lpthread\)/-lssl -lcrypto \1/' test/CMakeFiles/gs_tests.dir/link.txt && make"

echo "--- Start ACA Unit test ---"
echo " --- rebuilding br-tun and br-int"
Expand Down Expand Up @@ -73,7 +79,11 @@ else
mv -f $BUILD/../src/ovs/aca_ovs_l2_programmer.cpp.bak $BUILD/../src/ovs/aca_ovs_l2_programmer.cpp
# Build alcor control agent
echo "--- building alcor-control-agent post test ---"
docker exec a1 bash -c "cd /mnt/host/code && make"
docker exec a1 bash -c "cd /mnt/host/code && \
sed -i 's/\(-ldl -lrt -lm -lpthread\)/-lssl -lcrypto \1/' src/CMakeFiles/AlcorControlAgent.dir/link.txt && \
sed -i 's/\(-ldl -lrt -lm -lpthread\)/-lssl -lcrypto \1/' test/CMakeFiles/aca_tests.dir/link.txt && \
sed -i 's/\(-ldl -lrt -lm -lpthread\)/-lssl -lcrypto \1/' test/CMakeFiles/gs_tests.dir/link.txt && \
make"

fi

4 changes: 4 additions & 0 deletions include/aca_comm_mgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ class Aca_Comm_Manager {
int deserialize(const unsigned char *mq_buffer, size_t buffer_length,
alcor::schema::GoalState &parsed_struct);

int deserialize(const unsigned char *mq_buffer, size_t buffer_length,
alcor::schema::GoalStateV2 &parsed_struct);

int update_goal_state(alcor::schema::GoalState &goal_state_message,
alcor::schema::GoalStateOperationReply &gsOperationReply);

Expand All @@ -47,6 +50,7 @@ class Aca_Comm_Manager {
void print_goal_state(alcor::schema::GoalState parsed_struct);

void print_goal_state(alcor::schema::GoalStateV2 parsed_struct);

};
} // namespace aca_comm_manager
#endif
Loading