Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Calling DNS#QOUTAS #1650

Closed
ojengwa opened this issue Mar 23, 2016 · 2 comments
Closed

Error Calling DNS#QOUTAS #1650

ojengwa opened this issue Mar 23, 2016 · 2 comments
Assignees
Labels
api: dns Issues related to the Cloud DNS API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@ojengwa
Copy link
Contributor

ojengwa commented Mar 23, 2016

When I tried to call the dns.qoutas method, I got the following errors.

...
.../.virtualenvs/panda/lib/python2.7/site-packages/gcloud/dns/client.py", line 59, in quotas
    return dict([(key, int(value))
ValueError: invalid literal for int() with base 10: 'dns#quota'

On introspection, it turns out that the error stems from the attempt to cast the values within the quota dictionary as an integer, specifically this call: int(value) where some of the values are not strings. Except it breaks the client somewhere else, I don't see how what purpose the casting serves in the first place.
Here's a snippet of the return value from the function call:

{u'quota': {u'kind': u'dns#quota', ...},...}
@dhermes dhermes added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: dns Issues related to the Cloud DNS API. labels Mar 23, 2016
ojengwa added a commit to ojengwa/gcloud-python that referenced this issue Mar 23, 2016
@dhermes
Copy link
Contributor

dhermes commented Mar 23, 2016

Thanks for the report!

@tseaver We should get system tests up and running for DNS soon, it'll help catch stuff like this. We've got a domain we can use now (let's chat via email).

ojengwa added a commit to ojengwa/gcloud-python that referenced this issue Mar 29, 2016
fix failing tests

remove typing from expected value

remove schema marker from dns#quotas return value

update test specs for dns.Client#quotas

remove schema marker from dns#quotas return value

update test specs for dns.Client#quotas

remove schema marker from dns#quotas return value

fix failing tests for dns#quotas return value

conditional skipping of the `kind` key
@ojengwa
Copy link
Contributor Author

ojengwa commented Mar 29, 2016

I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: dns Issues related to the Cloud DNS API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants