From a1357f94c147db63e441f1c3d4f218be5f212e7c Mon Sep 17 00:00:00 2001 From: gifrerenom <lluis.gifre@cttc.es> Date: Thu, 7 Mar 2024 17:55:25 +0000 Subject: [PATCH] Optical controller: -Pre-merge cleanup --- src/service/service/ServiceServiceServicerImpl.py | 6 ++++-- src/service/service/task_scheduler/TaskExecutor.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py index 557b80bae..f65d5b59a 100644 --- a/src/service/service/ServiceServiceServicerImpl.py +++ b/src/service/service/ServiceServiceServicerImpl.py @@ -279,7 +279,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): # to get the reply form the optical module reply_txt = add_lightpath(src, dst, bitrate, bidir, ob_band) - + # reply with 2 transponders and 2 roadms reply_json = json.loads(reply_txt) optical_band_txt = "" @@ -300,7 +300,9 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): else: LOGGER.debug('Using existing optical band') if reply_txt is not None: - optical_reply = adapt_reply(devices, _service, reply_json, context_uuid_x, topology_uuid_x, optical_band_txt) + optical_reply = adapt_reply( + devices, _service, reply_json, context_uuid_x, topology_uuid_x, optical_band_txt + ) LOGGER.info('optical_reply={:s}'.format( grpc_message_to_json_string(optical_reply))) diff --git a/src/service/service/task_scheduler/TaskExecutor.py b/src/service/service/task_scheduler/TaskExecutor.py index 5ed8aefdb..b9715aae6 100644 --- a/src/service/service/task_scheduler/TaskExecutor.py +++ b/src/service/service/task_scheduler/TaskExecutor.py @@ -124,8 +124,8 @@ class TaskExecutor: myid.opticalconfig_uuid = device.device_id.device_uuid.uuid opticalconfig = OpticalConfig() setting = settings.value if settings else "" - new_config = {} + new_config = {} try: result = self._context_client.SelectOpticalConfig(myid) new_config = json.loads(result.config) -- GitLab