From 474d3eece250426a267edeb177602cc895ba7247 Mon Sep 17 00:00:00 2001 From: Komal Thareja Date: Wed, 30 Oct 2024 13:03:55 -0400 Subject: [PATCH] add log and update future start time in DB for Slice --- fabric_cf/actor/core/manage/management_utils.py | 1 + fabric_cf/orchestrator/core/orchestrator_handler.py | 1 + 2 files changed, 2 insertions(+) diff --git a/fabric_cf/actor/core/manage/management_utils.py b/fabric_cf/actor/core/manage/management_utils.py index 2b2e8aad..1977b1fc 100644 --- a/fabric_cf/actor/core/manage/management_utils.py +++ b/fabric_cf/actor/core/manage/management_utils.py @@ -67,6 +67,7 @@ class ManagementUtils: @staticmethod def update_slice(*, slice_obj: ABCSlice, slice_mng: SliceAvro) -> ABCSlice: slice_obj.set_graph_id(graph_id=slice_mng.get_graph_id()) + slice_obj.set_lease_start(lease_start=slice_mng.get_lease_start()) slice_obj.set_lease_end(lease_end=slice_mng.get_lease_end()) slice_obj.set_config_properties(value=slice_mng.get_config_properties()) return slice_obj diff --git a/fabric_cf/orchestrator/core/orchestrator_handler.py b/fabric_cf/orchestrator/core/orchestrator_handler.py index c7cc8299..1e917be2 100644 --- a/fabric_cf/orchestrator/core/orchestrator_handler.py +++ b/fabric_cf/orchestrator/core/orchestrator_handler.py @@ -328,6 +328,7 @@ def create_slice(self, *, token: str, slice_name: str, slice_graph: str, ssh_key future_start, future_end = self.controller_state.determine_future_lease_time(computed_reservations=computed_reservations, start=lease_start_time, end=lease_end_time, duration=lifetime) + self.logger.debug(f"Advanced Scheduling: Slice: {slice_name}({slice_id}) lifetime: {future_start} to {future_end}") slice_obj.set_lease_start(lease_start=future_start) slice_obj.set_lease_end(lease_end=future_end) self.logger.debug(f"Update Slice {slice_name}")