1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

populating existing provider state is lenient

- adds lenient flag to Record.new, problems during validation are just
  warnings if it's true
- target populate calls during the plan phase pass lenient=True
- make all of the provider.populate call logging consistent including both
  target and lenient
- add source=self to Record.new in a few places that were missing it
This commit is contained in:
Ross McFarland
2017-06-23 09:01:25 -07:00
parent 8323b4c0ea
commit a97818b6ec
15 changed files with 90 additions and 42 deletions

View File

@@ -370,7 +370,7 @@ class TestRoute53Provider(TestCase):
stubber.assert_no_pending_responses()
# Delete by monkey patching in a populate that includes an extra record
def add_extra_populate(existing, target):
def add_extra_populate(existing, target, lenient):
for record in self.expected.records:
existing.records.add(record)
record = Record.new(existing, 'extra',
@@ -406,7 +406,7 @@ class TestRoute53Provider(TestCase):
# Update by monkey patching in a populate that modifies the A record
# with geos
def mod_geo_populate(existing, target):
def mod_geo_populate(existing, target, lenient):
for record in self.expected.records:
if record._type != 'A' or not record.geo:
existing.records.add(record)
@@ -502,7 +502,7 @@ class TestRoute53Provider(TestCase):
# Update converting to non-geo by monkey patching in a populate that
# modifies the A record with geos
def mod_add_geo_populate(existing, target):
def mod_add_geo_populate(existing, target, lenient):
for record in self.expected.records:
if record._type != 'A' or record.geo:
existing.records.add(record)