Fix PrometheusAPIClient set_client_cert
The session doesn't have a 'key' property, instead it expects a '(cert, key)' pair to be assigned to the 'cert' property. See: https://docs.python-requests.org/en/latest/api/#requests.Session.cert Change-Id: I3ae5c5b4f36dfd0b17126ee563ce4912e2765af2 Signed-off-by: Jaromir Wysoglad <jwysogla@redhat.com>
This commit is contained in:
@@ -70,8 +70,7 @@ class PrometheusAPIClient(object):
|
||||
self._session.verify = ca_cert
|
||||
|
||||
def set_client_cert(self, client_cert, client_key):
|
||||
self._session.cert = client_cert
|
||||
self._session.key = client_key
|
||||
self._session.cert = (client_cert, client_key)
|
||||
|
||||
def set_basic_auth(self, auth_user, auth_password):
|
||||
self._session.auth = (auth_user, auth_password)
|
||||
|
Reference in New Issue
Block a user