mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2025-12-14 10:44:52 +01:00
build
This commit is contained in:
11
port.py
11
port.py
@@ -766,15 +766,16 @@ class Portainer:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def stop_stack(self, stack, endpoint_id):
|
def stop_stack(self, stack, endpoint_id):
|
||||||
|
|
||||||
"""Stop one stack or all stacks on an endpoint."""
|
"""Stop one stack or all stacks on an endpoint."""
|
||||||
print(f"Stopping stack {stack}")
|
print(f"Stopping stack {stack}")
|
||||||
|
|
||||||
if endpoint_id is not None:
|
if endpoint_id is not None:
|
||||||
self.get_endpoint(endpoint_id)
|
self.get_endpoint(endpoint_id)
|
||||||
if stack == "all":
|
|
||||||
self.get_stack(stack, endpoint_id)
|
if stack is not None:
|
||||||
else:
|
for s in stack:
|
||||||
if stack is not None:
|
self.stack_ids = [self._resolve_stack_id(s, endpoint_id)]
|
||||||
self.stack_ids = [self._resolve_stack_id(stack, endpoint_id)]
|
|
||||||
# print(self.stack_ids)
|
# print(self.stack_ids)
|
||||||
for stck in self.stack_ids:
|
for stck in self.stack_ids:
|
||||||
path = f"/stacks/{stck}/stop"
|
path = f"/stacks/{stck}/stop"
|
||||||
|
|||||||
Reference in New Issue
Block a user