PlacementStrategy.place#
- abstractmethod PlacementStrategy.place(infrastructure, application, placements, placement_view)[source]
Defines the placement logic.
Given an infrastructure, an application, a dictionary of placements, and a placement view, return a mapping of services IDs to node IDs, for the application.
This method must be overridden by the user.
- Parameters:
infrastructure (Infrastructure) – The infrastructure to place the application onto.
application (Application) – The application to place onto the infrastructure.
placements (dict[str, Placement]) – A dictionary of placements.
placement_view (PlacementView) – The placement view to use for the placement.
- Returns:
A dictionary mapping service IDs to node IDs.
- Return type:
dict[str, str]