From f0f25bfad69bafb5750455f6c17b5e0849b19448 Mon Sep 17 00:00:00 2001 From: gifrerenom <lluis.gifre@cttc.es> Date: Wed, 15 Nov 2023 09:23:16 +0000 Subject: [PATCH] Forecaster component: - Removed TODO.txt file --- src/forecaster/service/TODO.txt | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 src/forecaster/service/TODO.txt diff --git a/src/forecaster/service/TODO.txt b/src/forecaster/service/TODO.txt deleted file mode 100644 index 621a31654..000000000 --- a/src/forecaster/service/TODO.txt +++ /dev/null @@ -1,25 +0,0 @@ - -## PathComp Impact -After retrieving the topology, if the service has a duration constraint configured, the PathComp component should interrogate the Forecaster and request a topology forecast according to the requested duration of the service. The computed link capacity forecast should be used as link capacity in path computations. - -``` - link_capacities : Dict[str, float] = dict() # link_uuid => available_capacity_gbps - service_duration = get_service_duration(request.service) - if service_duration is None: - topology = context_client.GetTopologyDetails(topology_id) - for link in topology.links: - link_capacities[link.link_id.uuid] = link.available_capacity_gbps - else: - forecast_request = ForecastTopology( - topology_id = TopologyId(service.context_id, admin), - forecast_window_seconds = service.duration - ) - forecast_reply = forecaster_client.ComputeTopologyForecast(forecast_request) - for link_capacity in forecast_reply.link_capacities: - total_capacity_gbps = link_capacity.total_capacity_gbps - forecast_used_capacity_gbps = link_capacity.forecast_used_capacity_gbps - forecast_available_capacity_gbps = total_capacity_gbps - forecast_used_capacity_gbps - link_capacities[link_capacity.link_id.uuid] = forecast_available_capacity_gbps - - # Continue path computation passing link_capacities to the path comp algorithms. -``` \ No newline at end of file -- GitLab