libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Cuthbertson (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LIBCLOUD-624) google dns provider unusable - access without SSL is disabled, and can't enable SSL
Date Mon, 13 Oct 2014 03:57:33 GMT
Tim Cuthbertson created LIBCLOUD-624:
----------------------------------------

             Summary: google dns provider unusable - access without SSL is disabled, and can't
enable SSL
                 Key: LIBCLOUD-624
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-624
             Project: Libcloud
          Issue Type: Bug
          Components: DNS
            Reporter: Tim Cuthbertson


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.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message