Skip to content

Commit

Permalink
Check execution style
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminPelletier committed Oct 23, 2023
1 parent 38d912a commit d07705c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions monitoring/monitorlib/clients/flight_planning/client_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ def try_update_flight(
def try_end_flight(
self, flight_id: FlightID, execution_style: ExecutionStyle
) -> PlanningActivityResponse:
if execution_style != ExecutionStyle.IfAllowed:
raise NotImplementedError(
"Only IfAllowed execution style is currently allowed"
)
op = api.OPERATIONS[api.OperationID.DeleteFlightPlan]
url = op.path.format(flight_plan_id=flight_id)
query = query_and_describe(self._session, op.verb, url, scope=Scope.Plan)
Expand Down

0 comments on commit d07705c

Please sign in to comment.