diff --git a/pylxd/client.py b/pylxd/client.py index c5c5c1eb..236139e1 100644 --- a/pylxd/client.py +++ b/pylxd/client.py @@ -482,7 +482,11 @@ def authenticate(self, secret): if self.trusted: return cert = open(self.api.session.cert[0]).read().encode("utf-8") - self.certificates.create(secret, cert) + + if self.has_api_extension("explicit_trust_token"): + self.certificates.create(secret=secret, cert) + else: + self.certificates.create(password=secret, cert) # Refresh the host info response = self.api.get()