-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Initial/wip changelists support #41
Conversation
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.
Comments inline.
@@ -287,7 +321,10 @@ def _apply_Delete(self, change): | |||
name = self._set_full_name(change.existing.name, zone) | |||
record_type = change.existing._type | |||
|
|||
self._dns_client.record_delete(zone, name, record_type) | |||
if self.use_changelist: | |||
self._dns_client.changelist_record_delete(zone, content) |
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.
coho:octodns-edgedns ross$ ./script/lint
octodns_edgedns/__init__.py:325:61: undefined name 'content'
@@ -70,18 +70,36 @@ def record_create(self, zone, name, record_type, content): | |||
|
|||
return result | |||
|
|||
def changelist_record_create(self, zone, content): |
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.
I think it'd be cleaner to have a single record_create
method and then do an if self.use_changelist:
in that method to decide how to go about things. Same goes for all the other methods here. That'll avoid spreading the logic of use_changelist
all throughout the code and instead push it down to a single point for each action.
@@ -253,10 +277,16 @@ def _apply(self, plan): | |||
self._dns_client.zone_changelist_create(zone_name) | |||
self._dns_client.zone_changelist_submit(zone_name) | |||
|
|||
if self.use_changelist: | |||
self._dns_client.zone_changelist_create(zone_name, overwrite=True) |
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.
Doesn't this always recreate the zone or is it more of a create if not exists sort of thing?
[TODO]
/cc @TheDJVG as the author of the patch
/cc Fixes #38