Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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