mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2026-01-29 04:49:44 +01:00
build
This commit is contained in:
2
port.py
2
port.py
@@ -21,7 +21,7 @@ from prompt_toolkit.shortcuts import radiolist_dialog
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class Portainer:
|
class PortainerApi:
|
||||||
"""
|
"""
|
||||||
Simple wrapper around the module-level Portainer helper functions.
|
Simple wrapper around the module-level Portainer helper functions.
|
||||||
Instantiate with base_url and optional token/timeout and call methods
|
Instantiate with base_url and optional token/timeout and call methods
|
||||||
|
|||||||
@@ -11,11 +11,9 @@ import signal
|
|||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
import argparse
|
import argparse
|
||||||
import tty
|
|
||||||
import termios
|
|
||||||
import hvac
|
import hvac
|
||||||
from tabulate import tabulate
|
from tabulate import tabulate
|
||||||
from port import Portainer
|
from port import PortainerApi
|
||||||
from prompt_toolkit import prompt
|
from prompt_toolkit import prompt
|
||||||
from prompt_toolkit.completion import WordCompleter
|
from prompt_toolkit.completion import WordCompleter
|
||||||
from prompt_toolkit.shortcuts import checkboxlist_dialog
|
from prompt_toolkit.shortcuts import checkboxlist_dialog
|
||||||
@@ -427,7 +425,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
os.system("cls" if os.name == "nt" else "clear")
|
os.system("cls" if os.name == "nt" else "clear")
|
||||||
# Example: list endpoints
|
# Example: list endpoints
|
||||||
por = Portainer(cur_config["PORTAINER_SITE"], args)
|
por = PortainerApi(cur_config["PORTAINER_SITE"], args)
|
||||||
por.set_defaults(cur_config)
|
por.set_defaults(cur_config)
|
||||||
if args.debug:
|
if args.debug:
|
||||||
por._debug = True
|
por._debug = True
|
||||||
|
|||||||
Reference in New Issue
Block a user