How to use the proxmoxer.backends.https.ProxmoxHTTPTokenAuth function in proxmoxer

To help you get started, we’ve selected a few proxmoxer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github swayf / proxmoxer / proxmoxer / backends / https.py View on Github external
def __init__(self, host, user, password, port=8006, verify_ssl=True,
                 mode='json', timeout=5, auth_token=None, csrf_token=None):
        self.base_url = "https://{0}:{1}/api2/{2}".format(host, port, mode)
        if auth_token is not None:
            self.auth = ProxmoxHTTPTokenAuth(auth_token, csrf_token)
        else:
            self.auth = ProxmoxHTTPAuth(self.base_url, user, password, verify_ssl)
        self.verify_ssl = verify_ssl
        self.mode = mode
        self.timeout = timeout