mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-17 20:38:06 +00:00
on shutdown of scalesets & pools, only return boolresponse (#169)
This commit is contained in:
@ -849,7 +849,7 @@ class Pool(Endpoint):
|
||||
|
||||
return config
|
||||
|
||||
def shutdown(self, name: str, *, now: bool = False) -> models.Pool:
|
||||
def shutdown(self, name: str, *, now: bool = False) -> responses.BoolResult:
|
||||
expanded_name = self._disambiguate(
|
||||
"name", name, lambda x: False, lambda: [x.name for x in self.list()]
|
||||
)
|
||||
@ -857,7 +857,7 @@ class Pool(Endpoint):
|
||||
self.logger.debug("shutdown worker pool: %s (now: %s)", expanded_name, now)
|
||||
return self._req_model(
|
||||
"DELETE",
|
||||
models.Pool,
|
||||
responses.BoolResult,
|
||||
json_data={"name": expanded_name, "now": now},
|
||||
)
|
||||
|
||||
@ -1019,7 +1019,7 @@ class Scaleset(Endpoint):
|
||||
|
||||
def shutdown(
|
||||
self, scaleset_id: UUID_EXPANSION, *, now: bool = False
|
||||
) -> models.Scaleset:
|
||||
) -> responses.BoolResult:
|
||||
scaleset_id_expanded = self._disambiguate_uuid(
|
||||
"scaleset_id",
|
||||
scaleset_id,
|
||||
@ -1029,7 +1029,7 @@ class Scaleset(Endpoint):
|
||||
self.logger.debug("shutdown scaleset: %s (now: %s)", scaleset_id_expanded, now)
|
||||
return self._req_model(
|
||||
"DELETE",
|
||||
models.Scaleset,
|
||||
responses.BoolResult,
|
||||
json_data={"scaleset_id": scaleset_id_expanded, "now": now},
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user