server: service discovery over UDP.

implement RFC-005
- server broadcasts once on startup and answers to broadcasts
- small tool for listening on the port and sending broadcasts

Change-Id: I02d1184d6be62bef6f964eb9d238220aef062e94
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/34851
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Georg Brandl <g.brandl@fz-juelich.de>
This commit is contained in:
Alexander Zaft
2024-10-22 14:56:40 +02:00
committed by Markus Zolliker
parent 0f34418435
commit eac58982d9
5 changed files with 323 additions and 0 deletions

View File

@@ -54,8 +54,17 @@ class SecNode:
self.name = name
def add_secnode_property(self, prop, value):
"""Add SECNode property. If starting with an underscore, it is exported
in the description."""
self.nodeprops[prop] = value
def get_secnode_property(self, prop):
"""Get SECNode property.
Returns None if not present.
"""
return self.nodeprops.get(prop)
def get_module(self, modulename):
""" Returns a fully initialized module. Or None, if something went
wrong during instatiating/initializing the module."""