Description
This script:
#!/usr/bin/env python from __future__ import print_function from libcloud.dns.providers import get_driver as get_dns_driver from libcloud.dns.types import Provider as DNSProvider auth = { 'account': '<redacted>@developer.gserviceaccount.com', 'key': '<redacted>.pem', 'project': '<redacted>', } Driver = get_dns_driver(DNSProvider.GOOGLE) print(repr(Driver)) gce_dns = Driver(auth['account'], auth['key'], project=auth['project'], # secure=True ) print('SECURE: ' + str(gce_dns.secure)) print(gce_dns.list_zones())
Fails with:
{"error":{"errors":[{"domain":"global","reason":"sslRequired","message":"SSL is required to perform this operation."}],"code":403,"message":"SSL is required to perform this operation."}}
If I uncomment out the secure = True line (which seems like it ought to fix the above), I get:
Traceback (most recent call last): File "./dns.py", line 18, in <module> secure=True) File "/.../libcloud/dns/drivers/google.py", line 73, in __init__ super(GoogleDNSDriver, self).__init__(user_id, key, scopes, **kwargs) TypeError: __init__() got multiple values for keyword argument 'secure'
This is the first time I've tried to use libcloud's DNS api, so apologies if I'm missing something.
libcloud-0.15.1, and also replicated on the current `master`.
I dug into the code a little, and class GoogleDNSDriver's __init__ calls:
super(GoogleDNSDriver, self).__init__(user_id, key, scopes, **kwargs)
While its superclass (libcloud.base.DNSDriver) _init_ function takes:
def __init__(self, key, secret=None, secure=True, host=None, port=None, **kwargs):
...which doesn't match up at all.