Repository: sogno-platform/dpsim (language: python)

Issue:
Update VILLASnode version
The version of VILLASnode used in the current Dockerfiles is over 6 months old. It should probably be updated at some point.

Related to #231 


Discussion / hints:
@JTS22 Please take note that the correct spelling is "VILLASnode", not "Villas Node" or "VILLASNode" or "VILLAS node" :)
@stv0g Thanks for the reminder, I updated the spelling in all relevant issues / PRs :)

Fix patch:
diff --git a/dpsim-villas/src/InterfaceWorkerVillas.cpp b/dpsim-villas/src/InterfaceWorkerVillas.cpp
index a1eef5c6f8..a073597900 100644
--- a/dpsim-villas/src/InterfaceWorkerVillas.cpp
+++ b/dpsim-villas/src/InterfaceWorkerVillas.cpp
@@ -56,9 +56,7 @@ void InterfaceWorkerVillas::open() {
 	mNode = node::NodeFactory::make(nodeTypeString);
 
 	int ret = 0;
-	uuid_t fakeSuperNodeUUID;
-	uuid_generate_random(fakeSuperNodeUUID);
-	ret = mNode->parse(config, fakeSuperNodeUUID);
+	ret = mNode->parse(config);
 	if (ret < 0) {
 		SPDLOG_LOGGER_ERROR(mLog, "Error: Node in InterfaceVillas failed to parse config. Parse returned code {}", ret);
 		std::exit(1);
diff --git a/packaging/Docker/Dockerfile.dev b/packaging/Docker/Dockerfile.dev
index 8cbad04c30..e793b4b874 100644
--- a/packaging/Docker/Dockerfile.dev
+++ b/packaging/Docker/Dockerfile.dev
@@ -1,16 +1,16 @@
 FROM fedora:36 AS base
 
 ARG CIM_VERSION=CGMES_2.4.15_16FEB2016
-ARG VILLAS_VERSION=c976cd62d8c6667a078be0785ca3e623a05f7456
+ARG VILLAS_VERSION=5185c25ba7442c3e9264f4225f9a46829956732c
 
 ARG CMAKE_OPTS
 ARG MAKE_OPTS=-j4
 
 LABEL \
-	org.opencontainers.image.title = "DPsim" \
-	org.opencontainers.image.licenses = "MPL 2.0" \
-	org.opencontainers.image.url = "http://dpsim.fein-aachen.org/" \
-	org.opencontainers.image.source = "https://github.com/sogno-platform/dpsim"
+	org.opencontainers.image.title="DPsim" \
+	org.opencontainers.image.licenses="MPL 2.0" \
+	org.opencontainers.image.url="http://dpsim.fein-aachen.org/" \
+	org.opencontainers.image.source="https://github.com/sogno-platform/dpsim"
 
 RUN dnf -y update
 
diff --git a/packaging/Docker/Dockerfile.dev-rocky b/packaging/Docker/Dockerfile.dev-rocky
index f560c809bc..335c7acd26 100644
--- a/packaging/Docker/Dockerfile.dev-rocky
+++ b/packaging/Docker/Dockerfile.dev-rocky
@@ -6,10 +6,10 @@ ARG CMAKE_OPTS
 ARG MAKE_OPTS=-j4
 
 LABEL \
-	org.opencontainers.image.title = "DPsim" \
-	org.opencontainers.image.licenses = "MPL 2.0" \
-	org.opencontainers.image.url = "http://dpsim.fein-aachen.org/" \
-	org.opencontainers.image.source = "https://github.com/sogno-platform/dpsim"
+	org.opencontainers.image.title="DPsim" \
+	org.opencontainers.image.licenses="MPL 2.0" \
+	org.opencontainers.image.url="http://dpsim.fein-aachen.org/" \
+	org.opencontainers.image.source="https://github.com/sogno-platform/dpsim"
 
 RUN dnf -y update && \
 	dnf install -y epel-release dnf-plugins-core && \
@@ -54,6 +54,7 @@ RUN dnf -y install \
 	openssl-devel \
 	libuuid-devel \
 	libconfig-devel \
+	libwebsockets-devel \
 	libnl3-devel \
 	libcurl-devel \
 	jansson-devel \
@@ -79,18 +80,6 @@ RUN git clone --branch 3.0 --recurse-submodules --depth 1 https://git.rwth-aache
 ENV PATH="$PWD/cricket/bin:${PATH}"
 ENV LD_LIBRARY_PATH="$PWD/cricket/bin:${LD_LIBRARY_PATH}"
 
-# Install Libwebsockets from source because the repo variant is not suitable
-RUN git clone --branch v4.3-stable --depth 1 https://libwebsockets.org/repo/libwebsockets && \
-	mkdir -p libwebsockets/build && \
-	pushd libwebsockets/build && \
-	cmake ${CMAKE_OPTS} .. \
-		-DLWS_WITH_IPV6=ON \
-		-DLWS_WITHOUT_TESTAPPS=ON \
-		-DLWS_WITHOUT_EXTENSIONS=OFF \
-		-DLWS_WITH_SERVER_STATUS=ON && \
-	make ${MAKE_OPTS} ${TARGET} && \
-	popd
-
 # Profiling dependencies
 RUN dnf -y install \
 	graphviz \
diff --git a/packaging/Docker/Dockerfile.manylinux b/packaging/Docker/Dockerfile.manylinux
index 8e5bc2b1f1..9fe896db07 100644
--- a/packaging/Docker/Dockerfile.manylinux
+++ b/packaging/Docker/Dockerfile.manylinux
@@ -6,7 +6,7 @@
 FROM quay.io/pypa/manylinux_2_28_x86_64
 
 ARG CIM_VERSION=CGMES_2.4.15_16FEB2016
-ARG VILLAS_VERSION=c976cd62d8c6667a078be0785ca3e623a05f7456
+ARG VILLAS_VERSION=5185c25ba7442c3e9264f4225f9a46829956732c
 
 ARG CMAKE_OPTS
 ARG MAKE_OPTS=-j4
@@ -14,10 +14,10 @@ ARG MAKE_OPTS=-j4
 ENV PLAT=manylinux_2_28_x86_64
 
 LABEL \
-	org.opencontainers.image.title = "DPsim" \
-	org.opencontainers.image.licenses = "MPL 2.0" \
-	org.opencontainers.image.url = "http://dpsim.fein-aachen.org/" \
-	org.opencontainers.image.source = "https://github.com/sogno-platform/dpsim"
+	org.opencontainers.image.title="DPsim" \
+	org.opencontainers.image.licenses="MPL 2.0" \
+	org.opencontainers.image.url="http://dpsim.fein-aachen.org/" \
+	org.opencontainers.image.source="https://github.com/sogno-platform/dpsim"
 
 RUN dnf -y update
 RUN yum install -y epel-release


Test patch:
diff --git a/.github/workflows/build_test_linux_fedora.yaml b/.github/workflows/build_test_linux_fedora.yaml
index 9c66e09ce6..e8ce4628cc 100644
--- a/.github/workflows/build_test_linux_fedora.yaml
+++ b/.github/workflows/build_test_linux_fedora.yaml
@@ -269,8 +269,8 @@ jobs:
       container_commands: |
         docker exec dpsim-compose_dpsim_1 /bin/bash -c "pip install paho-mqtt"
         docker exec dpsim-compose_mqtt_1 mosquitto_sub -t "/dpsim-mqtt" -u wildcard -v&
-        docker exec dpsim-compose_dpsim_1 /bin/bash -c "cd /dpsim && python /dpsim/examples/villas/dpsim-mqtt-producer.py"&
-        docker exec dpsim-compose_dpsim_1 /bin/bash -c "cd /dpsim && python /dpsim/examples/villas/dpsim-mqtt.py"
+        docker exec dpsim-compose_dpsim_1 /bin/bash -c "cd /dpsim && python3 /dpsim/examples/villas/dpsim-mqtt-producer.py"&
+        docker exec dpsim-compose_dpsim_1 /bin/bash -c "cd /dpsim && python3 /dpsim/examples/villas/dpsim-mqtt.py"
 
   test-villas-examples-2:
     name: Run dpsim-mqtt-import-export VILLASnode example
@@ -280,7 +280,7 @@ jobs:
       compose_file_path: examples/villas/docker-compose-tests
       container_commands: |
         docker exec dpsim-compose_mqtt_1 mosquitto_sub -t "#" -u wildcard -v&
-        docker exec dpsim-compose_dpsim_1 /bin/bash -c "cd /dpsim && python /dpsim/examples/villas/dpsim-mqtt-import-export.py"
+        docker exec dpsim-compose_dpsim_1 /bin/bash -c "cd /dpsim && python3 /dpsim/examples/villas/dpsim-mqtt-import-export.py"
 
   test-villas-examples-3:
     name: Run dpsim-mqtt-import-export-MIMO VILLASnode example
@@ -291,7 +291,7 @@ jobs:
       continue_on_error: true
       container_commands: |
         docker exec dpsim-compose_mqtt_1 mosquitto_sub -t "#" -u wildcard -v&
-        docker exec dpsim-compose_dpsim_1 /bin/bash -c "cd /dpsim && python /dpsim/examples/villas/dpsim-mqtt-import-export-MIMO.py"
+        docker exec dpsim-compose_dpsim_1 /bin/bash -c "cd /dpsim && python3 /dpsim/examples/villas/dpsim-mqtt-import-export-MIMO.py"
 
   test-villas-examples-4:
     name: Run dpsim-file VILLASnode example
@@ -302,7 +302,7 @@ jobs:
       continue_on_error: true
       container_commands: |
         docker exec dpsim-compose_dpsim_1 /bin/bash -c "sleep 3 && tail -f /dpsim/logs/output.csv"&
-        docker exec dpsim-compose_dpsim_1 /bin/bash -c "cd /dpsim && python /dpsim/examples/villas/dpsim-file.py"
+        docker exec dpsim-compose_dpsim_1 /bin/bash -c "cd /dpsim && python3 /dpsim/examples/villas/dpsim-file.py"
 
   test-villas-examples-5:
     name: Run mqtt-cigre-mv-pf-profiles VILLASnode example
@@ -312,4 +312,4 @@ jobs:
       compose_file_path: examples/villas/docker-compose-tests
       container_commands: |
         docker exec dpsim-compose_mqtt_1 mosquitto_sub -t "#" -u wildcard -v&
-        docker exec dpsim-compose_dpsim_1 /bin/bash -c "cd /dpsim && python /dpsim/examples/villas/dpsim-mqtt-cigre-mv-pf-profiles.py"
+        docker exec dpsim-compose_dpsim_1 /bin/bash -c "cd /dpsim && python3 /dpsim/examples/villas/dpsim-mqtt-cigre-mv-pf-profiles.py"