Skip to content

DNS doesn't parse creationTime field #1362

Closed

Description

@kvdb

I know DNS is not oficially supported yet, but I'm reporting it anyway. I'm using the master gcloud-python repo with this code:

client = dns.Client.from_service_account_json(                              
    'service-account.json', project='xyz-eu')           
zones = client.list_zones()                 

This is the error I get:

Traceback (most recent call last):
  ..
    zones = client.list_zones()
  File "/app/src/gcloud/gcloud/dns/client.py", line 94, in list_zones
    for resource in resp['managedZones']]
  File "/app/src/gcloud/gcloud/dns/zone.py", line 67, in from_api_repr
    zone._set_properties(resource)
  File "/app/src/gcloud/gcloud/dns/zone.py", line 218, in _set_properties
    cleaned['creationTime'] = float(cleaned['creationTime'])
ValueError: invalid literal for float(): 2015-04-02T13:21:24.943Z

Activity

  1. dhermes commented on Jan 7, 2016

    @dhermes
    Contributor

    Thanks for the report!

  2. added
    api: dnsIssues related to the Cloud DNS API.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Jan 7, 2016
  3. dhermes commented on Jan 7, 2016

    @dhermes
    Contributor

    Will be "easy" to do once #1336 is in.

  4. dhermes commented on Jan 8, 2016

    @dhermes
    Contributor

    Verified from the docs: https://cloud.google.com/dns/api/v1/managedZones#resource

    creationTime: The time that this resource was created on the server. This is in RFC3339 text format.

  5. added a commit that references this issue on Jan 8, 2016
    499eda3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: dnsIssues related to the Cloud DNS API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions