[ 
https://issues.apache.org/jira/browse/LIBCLOUD-624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Johnson resolved LIBCLOUD-624.
-----------------------------------
    Resolution: Fixed

> 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
>            Assignee: Eric Johnson
>              Labels: Google
>
> This script:
> {code}
> #!/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())
> {code}
> Fails with:
> {code}
>       
> {"error":{"errors":[{"domain":"global","reason":"sslRequired","message":"SSL 
> is required to perform this operation."}],"code":403,"message":"SSL is 
> required to perform this operation."}}
> {code}
> If I uncomment out the {{secure = True}} line (which seems like it ought to 
> fix the above), I get:
> {code}
> 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'
> {code}
> 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:
> {code}
>       super(GoogleDNSDriver, self).__init__(user_id, key, scopes, **kwargs)
> {code}
> While its superclass (libcloud.base.DNSDriver) __init__ function takes:
> {code}
>       def __init__(self, key, secret=None, secure=True, host=None, port=None, 
> **kwargs):
> {code}
> ...which doesn't match up at all.



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

Reply via email to