Skip to content

[Libcloud-732] Add implementation for World Wide DNS provider #566

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

Merged
merged 1 commit into from
Sep 25, 2015

Conversation

aleGpereira
Copy link
Contributor

@aleGpereira aleGpereira force-pushed the LIBCLOUD-732_worldwidedns branch 2 times, most recently from f50e263 to 9a282c1 Compare August 26, 2015 22:06
@aleGpereira
Copy link
Contributor Author

I'm not sure if i followed the contributor guideline in the correct way. I'll expect for comments.

@Kami
Copy link
Member

Kami commented Aug 27, 2015

Great, thanks. I will look as soon as I can.

:rtype: ``str``
"""
if self._code_response(self.body):
codes = self.body.split('\r\n')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a regular expression and re.split would be safer (e.g. \r?\n) unless the body always contains carriage return (\r).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always contains the carriage. At least the documentation says that.

@Kami
Copy link
Member

Kami commented Aug 30, 2015

@aleGpereira Thanks. I've added some comments.

Overall it looks good 👍, there are just some small things which need to be addressed.

aleGpereira pushed a commit to aleGpereira/libcloud that referenced this pull request Aug 31, 2015
@aleGpereira
Copy link
Contributor Author

Ok, changes are pushed :).

aleGpereira pushed a commit to aleGpereira/libcloud that referenced this pull request Sep 1, 2015
@aleGpereira aleGpereira force-pushed the LIBCLOUD-732_worldwidedns branch from eeaa936 to 45be41a Compare September 1, 2015 16:17
@Kami
Copy link
Member

Kami commented Sep 4, 2015

Thanks. I just wanted to merge it, but I encountered an issue with a bunch of test failing:

======================================================================
ERROR: test_delete_zone_success (__main__.WorldWideDNSTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "libcloud/test/dns/test_worldwidedns.py", line 220, in test_delete_zone_success
    zone = self.driver.list_zones()[0]
  File "/w/lc/libcloud/libcloud/dns/drivers/worldwidedns.py", line 106, in list_zones
    return self._to_zones(zones.body)
  File "/w/lc/libcloud/libcloud/dns/drivers/worldwidedns.py", line 450, in _to_zones
    zone = self._to_zone(line)
  File "/w/lc/libcloud/libcloud/dns/drivers/worldwidedns.py", line 466, in _to_zone
    extra = {'HOSTMASTER': soa_block[0], 'REFRESH': soa_block[1],
IndexError: list index out of range

I had a look and it looks like something weird is going on with the splitting. As mentioned above, to be one the safe side and make it more robust I think we should also use regexed when splitting so we handle both, windows and linux new lines (with and without the carriage return).

On top of that, lint is also failing but it's a minor issue - https://travis-ci.org/apache/libcloud/builds/78253070

@aleGpereira Can you please have a look and fix it? Thanks.

@aleGpereira
Copy link
Contributor Author

Ok. I'll check for that. Thanks.

@aleGpereira aleGpereira force-pushed the LIBCLOUD-732_worldwidedns branch from f99dee7 to 0a7a629 Compare September 7, 2015 21:01
@aleGpereira aleGpereira force-pushed the LIBCLOUD-732_worldwidedns branch from 3f6d888 to 4eed2b2 Compare September 7, 2015 21:05
@aleGpereira
Copy link
Contributor Author

Ok. I've fix the problem. Sorry for that. I didn't ran with tox before. The regex is taking place now.

@Kami
Copy link
Member

Kami commented Sep 25, 2015

@aleGpereira One thing I forgot - since those contributions are pretty big, can you please also sign an ICLA - https://www.apache.org/licenses/#clas

@asfgit asfgit merged commit 4eed2b2 into apache:trunk Sep 25, 2015
asfgit pushed a commit that referenced this pull request Sep 25, 2015
Closes #566

Signed-off-by: Tomaz Muraus <tomaz@apache.org>

Conflicts:
	CHANGES.rst
@Kami
Copy link
Member

Kami commented Sep 25, 2015

Merged, thanks!

@aleGpereira
Copy link
Contributor Author

@Kami ICLA is signed and filed :).

@aleGpereira aleGpereira deleted the LIBCLOUD-732_worldwidedns branch October 12, 2015 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants