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

[LIBCLOUD-748] Add Durable DNS provider implementation #588

Closed

Conversation

aleGpereira
Copy link
Contributor

Ok. Last one. Thanks again :).

@aleGpereira aleGpereira force-pushed the LIBCLOUD-748_durabledns_provider branch 2 times, most recently from abe971d to 2b6c2da Compare September 25, 2015 19:59
@aleGpereira
Copy link
Contributor Author

I couldn't get why happen the error that travis is showing. I got that error sometimes in my local enviorenment but if i run it with the docker container, everything goes well. Any clue?

@aleGpereira aleGpereira force-pushed the LIBCLOUD-748_durabledns_provider branch from 2b6c2da to eede464 Compare September 25, 2015 23:32
@Kami
Copy link
Member

Kami commented Sep 27, 2015

Thanks!

Will have a look.

@Kami
Copy link
Member

Kami commented Sep 27, 2015

It looks like issue is related to missing BeatifulSoup module:

(libcloud-trunk)kami ~/w/lc/libcloud (git:LIBCLOUD-748_durabledns_provider)$ PYTHONPATH=. python libcloud/test/dns/test_durabledns.py 
Traceback (most recent call last):
  File "libcloud/test/dns/test_durabledns.py", line 28, in <module>
    from libcloud.dns.drivers.durabledns import DurableDNSDriver
  File "/home/kami/w/lc/libcloud/libcloud/dns/drivers/durabledns.py", line 26, in <module>
    from libcloud.common.durabledns import DurableConnection, DurableResponse
  File "/home/kami/w/lc/libcloud/libcloud/common/durabledns.py", line 16, in <module>
    from bs4 import BeautifulSoup
ImportError: No module named bs4

Can you please use ElementTree module which is available in standard library same as the other drivers which handle xml (e.g. see EC2 driver for an example).

On a related note - I also need to have a look and improve setup.py test target, it's really annoying since it doesn't print the actual error message.

@Kami
Copy link
Member

Kami commented Sep 27, 2015

I've pushed a change so it will be easier to identify issues like this in the future - 011d16c

API_HOST = 'durabledns.com'

# REQUEST SCHEMAS
LIST_ZONES = """
Copy link
Member

Choose a reason for hiding this comment

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

Please use ElementTree module to construct XML documents (see EC2, S3 and other XML based drivers for an example).

Creating XML by manually concatenating strings is not safe nor robust.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright. Noted, 👍

@aleGpereira aleGpereira force-pushed the LIBCLOUD-748_durabledns_provider branch 3 times, most recently from b4bb650 to 54b428d Compare September 29, 2015 22:18
for attribute in attributes:
ET.SubElement(urn, 'urn:%s:%s' % (urn_nid, attribute))
return soap

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made this builder for the xml schemas.

@aleGpereira aleGpereira force-pushed the LIBCLOUD-748_durabledns_provider branch from 54b428d to 674299f Compare September 29, 2015 22:39
@aleGpereira
Copy link
Contributor Author

I did i bunch of changes. I believe is ready for rock and roll! Thanks a lot!

@aleGpereira aleGpereira force-pushed the LIBCLOUD-748_durabledns_provider branch 2 times, most recently from 4121c0a to 9894b85 Compare September 30, 2015 13:06
@aleGpereira aleGpereira force-pushed the LIBCLOUD-748_durabledns_provider branch from 9894b85 to aa4661c Compare September 30, 2015 13:30
@asfgit asfgit closed this in 1c1a89f Oct 9, 2015
@Kami
Copy link
Member

Kami commented Oct 9, 2015

Merged, thanks!

@aleGpereira aleGpereira deleted the LIBCLOUD-748_durabledns_provider branch October 12, 2015 15:24
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