This commit is contained in:
2025-12-02 21:29:55 +01:00
parent 28b745b2cc
commit 5be1560be6
2 changed files with 31 additions and 48 deletions

View File

@@ -163,6 +163,7 @@ class Portainer:
self.get_endpoints()
self.get_stacks(self)
self.get_containers(self)
return True
def get_stacks(self, endpoint_id="all", timeout=10):
if endpoint_id != "all":
@@ -819,4 +820,4 @@ class Portainer:
path = f"/endpoints/{endpoint_id}/docker/secrets/create"
encoded = base64.b64encode(value.encode()).decode()
data = {"Name": name, "Data": encoded}
self.api_post(path, data, timeout=timeout)
return self.api_post(path, data, timeout=timeout)