This commit is contained in:
2025-12-05 17:09:05 +01:00
parent 19a91c17c6
commit 45900138fc
2 changed files with 146 additions and 30 deletions

View File

@@ -27,6 +27,7 @@ class Portainer:
def __init__(self, site, timeout=10):
self.base_url = None
self.token = None
self.action = None
self._debug = False
self.timeout = timeout
self.git_url = "git@gitlab.sectorq.eu:home/docker-compose.git"
@@ -36,6 +37,7 @@ class Portainer:
self.stack_ids = []
self.endpoint_name = None
self.endpoint_id = None
# self.git_url = "https://gitlab.sectorq.eu/home/docker-compose.git"
self.git_url = "git@gitlab.sectorq.eu:home/docker-compose.git"
self.repo_dir = "/tmp/docker-compose"
@@ -192,7 +194,7 @@ class Portainer:
self.get_containers(self)
return True
def get_stacks(self, endpoint_id="all", timeout=10):
def get_stacks(self, endpoint_id="all", timeout=20):
'''Get a list of stacks for a specific endpoint or all endpoints.'''
if endpoint_id != "all":
endpoint_id = self.get_endpoint_id(endpoint_id)