diff --git a/portainer.py b/portainer.py index b458947..25bc730 100755 --- a/portainer.py +++ b/portainer.py @@ -26,7 +26,6 @@ parser.add_argument("--list-containers", "-c", action="store_true", help="List c parser.add_argument("--update-stack", "-U", action="store_true", help="Update stacls") parser.add_argument("--stop-containers", "-O", action="store_true", help="Stop containers") parser.add_argument("--start-containers", "-X", action="store_true", help="Stop containers") -parser.add_argument("--delete-stack", "-d", action="store_true", help="Delete stack") parser.add_argument("--update-status", "-S", action="store_true", help="Update status") parser.add_argument("--get-stack", metavar="NAME_OR_ID", help="Get stack by name or numeric id") parser.add_argument("--action", "-a", type=str, default=None, help="Action to perform") @@ -40,13 +39,16 @@ parser.add_argument("--create-stack_new2","-N", action='store_true') parser.add_argument("--gpu","-g", action='store_true') parser.add_argument("--create-stacks","-C", action='store_true') parser.add_argument("--refresh-status","-r", action='store_true') + parser.add_argument("--stack", "-s", type=str, help="Stack ID for operations") parser.add_argument("--token-only", action="store_true", help="Print auth token and exit") parser.add_argument("--timeout", type=int, default=10, help="Request timeout seconds") parser.add_argument("--deploy-mode","-m", type=str, default="git", help="Deploy mode") parser.add_argument("--swarm","-w", action="store_true", help="Swarm mode") -print("Running version:", VERSION) args = parser.parse_args() +print("Running version:", VERSION) +print("Environment:", args.site) + _LOG_LEVEL = "INFO" LOG_FILE = "/tmp/portainer.log" if _LOG_LEVEL == "DEBUG":