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
auroradns: Add support for Health Checks #672
Conversation
@@ -140,6 +272,14 @@ def list_zones(self): | |||
return zones | |||
|
|||
def list_records(self, zone): | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to add docstring for methods which are the same as the ones already defined in the base class - those docstrings are automatically inherited from the parent class methods.
c4381fd
to
3651364
Compare
@@ -1,6 +1,5 @@ | |||
from libcloud.dns.types import Provider | |||
from libcloud.dns.types import Provider, RecordType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We tend to use one import per line - this makes searching and grepping a bit easier.
ecff808
to
97575b6
Compare
@Kami Thank you for the quick reviews! I just force pushed a new version |
a6132bf
to
c1f4062
Compare
:param enabled: (optional) If this healthcheck is enabled to run | ||
:type enabled: ``bool`` | ||
|
||
:param extra: (optional) Extra attributes (driver specific). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra
doesn't seem to be used. Is it needed? Are there other 'health check' drivers that use it and this is just allowing it to be passed in for consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is correct. It is indeed just there for consistency with the other APIs
A more generic approach for health checks might be nice, I think that Route 53 and Google DNS also support this.
c874f39
to
31f8284
Compare
AuroraDNS supports Health Checks and based on the state of these checks records will be served or not. This way a Round-Robin DNS balancing can be achieved pointing to only healthy servers/services.
I updated the commit with tests for AuroraDNS. They were merged in #679 Tests are passing on my system, waiting for Travis CI :) |
Thanks @wido |
|
||
def __res_to_zone(self, zone): | ||
return Zone(id=zone['id'], domain=zone['name'], type=DEFAULT_ZONE_TYPE, | ||
return Zone(id=zone['id'], domain=zone['name'], | ||
type=DEFAULT_ZONE_TYPE, | ||
ttl=DEFAULT_ZONE_TTL, driver=self, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
@tonybaloney Thanks for the feedback! I wasn't aware of that. Fixed that in a new commit. |
thanks. merging |
AuroraDNS supports Health Checks and based on the state of these
checks records will be served or not.
This way a Round-Robin DNS balancing can be achieved pointing to
only healthy servers/services.