Commit f0f25bfa authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Forecaster component:

- Removed TODO.txt file
parent b85b910d
Loading
Loading
Loading
Loading

src/forecaster/service/TODO.txt

deleted100644 → 0
+0 −25
Original line number Diff line number Diff line

## 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