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

Moving to iterators in DNS. #2560

Merged
merged 2 commits into from
Oct 19, 2016
Merged

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Oct 18, 2016

Alternative to #2532 with #2558 as diffbase.

@dhermes dhermes added the api: dns Issues related to the Cloud DNS API. label Oct 18, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 18, 2016
@@ -70,31 +71,19 @@ def list_zones(self, max_results=None, page_token=None):
:param max_results: maximum number of zones to return, If not
passed, defaults to a value set by the API.

:type page_token: string
:type page_token: str

This comment was marked as spam.

@@ -115,3 +104,18 @@ def zone(self, name, dns_name=None, description=None):
"""
return ManagedZone(name, dns_name, client=self,
description=description)


def _item_to_zone(iterator, resource):

This comment was marked as spam.

client=client, path=path, items_key='changes',
item_to_value=_item_to_changes,
page_token=page_token, max_results=max_results)
iterator.zone = self

This comment was marked as spam.

This comment was marked as spam.

@tseaver
Copy link
Contributor

tseaver commented Oct 18, 2016

Travis failure is due to pylint:

************* Module unit_tests.test_zone
R:600, 4: Too many statements (51/50) (too-many-statements)

@dhermes
Copy link
Contributor Author

dhermes commented Oct 18, 2016

Yup, saw that. It's from adding self.assertIs(zone, iterator.zone) and not re-running Pylint locally. D'oh!

@dhermes dhermes merged commit 3d28a5c into googleapis:master Oct 19, 2016
@dhermes dhermes deleted the dns-iterators-alt branch October 19, 2016 00:05
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
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. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants