From 9b6f049b407f9e38697bb2d1496a82adcc5a0299 Mon Sep 17 00:00:00 2001 From: Amber Date: Thu, 19 Sep 2024 08:42:54 +0200 Subject: [PATCH] Unify Configuration. Signed-off-by: Amber --- detd/ipc.proto | 1 - detd/manager.py | 2 +- detd/proxy.py | 1 - detd/scheduler.py | 10 ---------- detd/service.py | 4 +--- 5 files changed, 2 insertions(+), 16 deletions(-) diff --git a/detd/ipc.proto b/detd/ipc.proto index a22eec5..e7b8dce 100644 --- a/detd/ipc.proto +++ b/detd/ipc.proto @@ -28,7 +28,6 @@ message StreamQosRequest { bool hints_preemption = 15; bool hints_launch_time_control = 16; bool talker = 17; - string maddress = 18; } diff --git a/detd/manager.py b/detd/manager.py index 4451c64..379adf0 100644 --- a/detd/manager.py +++ b/detd/manager.py @@ -273,7 +273,7 @@ def add_listener(self, config): # Configure the system try: - self.interface.setup_listener(self.mapping, self.scheduler, config.stream, config.maddress, self.hints) + self.interface.setup_listener(self.mapping, self.scheduler, config.stream, config.stream.addr, self.hints) except RuntimeError: logger.error("Error applying the configuration on the system") raise diff --git a/detd/proxy.py b/detd/proxy.py index 6f748df..bd4d040 100644 --- a/detd/proxy.py +++ b/detd/proxy.py @@ -142,7 +142,6 @@ def send_qos_listener_request(self, configuration, setup_socket): request.txmin = configuration.stream.txoffset request.txmax = configuration.stream.txoffset request.setup_socket = setup_socket - request.maddress = configuration.maddress request.talker = False request.hints_available = False diff --git a/detd/scheduler.py b/detd/scheduler.py index 97a24ed..930f042 100644 --- a/detd/scheduler.py +++ b/detd/scheduler.py @@ -46,16 +46,6 @@ def __init__(self, interface, stream, traffic, hints = None): self.traffic = traffic self.hints = hints -class ListenerConfiguration: - - def __init__(self, interface, stream, traffic, maddress, hints = None): - - self.interface = interface - self.stream = stream - self.traffic = traffic - self.maddress = maddress - self.hints = hints - class StreamConfiguration: def __init__(self, addr, vid, pcp, txoffset, base_time=None): diff --git a/detd/service.py b/detd/service.py index 63d6f24..a624c7f 100644 --- a/detd/service.py +++ b/detd/service.py @@ -39,7 +39,6 @@ from .scheduler import Configuration from .scheduler import StreamConfiguration -from .scheduler import ListenerConfiguration from .scheduler import TrafficSpecification from .scheduler import Hints @@ -343,7 +342,6 @@ def _add_listener(self, request): txoffset = request.txmin interval = request.period size = request.size - maddress = request.maddress interface_name = request.interface hints = None @@ -351,7 +349,7 @@ def _add_listener(self, request): stream = StreamConfiguration(addr, vid, pcp, txoffset) traffic = TrafficSpecification(interval, size) - config = ListenerConfiguration(interface, stream, traffic, maddress, hints) + config = Configuration(interface, stream, traffic, hints) vlan_interface, soprio = self.server.manager.add_listener(config)