This commit is contained in:
2025-12-12 15:19:53 +01:00
parent 5864085ec3
commit d6842eab62
2 changed files with 29 additions and 11 deletions

View File

@@ -121,6 +121,7 @@ parser.add_argument("--action", "-a", type=str, default=None, help="Action to pe
parser.add_argument(
"--autostart", "-Z", action="store_true", help="Auto-start created stacks"
)
parser.add_argument("--update", "-u", action="store_true", help="Update service if it exists")
parser.add_argument("--debug", "-D", action="store_true")
parser.add_argument("--gpu", "-g", action="store_true")
parser.add_argument("--timeout", type=int, default=10, help="Request timeout seconds")
@@ -353,7 +354,6 @@ def prompt_missing_args(args_in, defaults_in, fields, action=None,stacks=None):
return args
if __name__ == "__main__":
# Example usage: set PORTAINER_USER and PORTAINER_PASS in env, or pass literals below.
# token = get_portainer_token(base,"admin","l4c1j4yd33Du5lo") # or get_portainer_token(base, "admin", "secret")
@@ -530,7 +530,7 @@ if __name__ == "__main__":
("endpoint_id", "Endpoint ID")
],
)
por.update_service(args.endpoint_id, args.service_id)
por.update_service()
sys.exit()
if args.action == "list_stacks":
args = prompt_missing_args(