Browse Source

_find_or_create_*_pool should add new pool to pools so it can find next time

pull/312/head
Ross McFarland 7 years ago
parent
commit
28f3a75061
No known key found for this signature in database GPG Key ID: 61C10C4FC8FE4A89
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      octodns/provider/dyn.py

+ 14
- 0
octodns/provider/dyn.py View File

@ -859,6 +859,13 @@ class DynProvider(BaseProvider):
chain = DSFFailoverChain(label, record_sets=[record_set])
pool = DSFResponsePool(label, rs_chains=[chain])
pool.create(td)
# We need to store the newly created pool in the pools list since the
# caller won't know if it was newly created or not. This will allow us
# to find this pool again if another rule references it and avoid
# creating duplicates
pools.append(pool)
return pool
def _dynamic_records_for_A(self, values, record_extras):
@ -908,6 +915,13 @@ class DynProvider(BaseProvider):
chain = DSFFailoverChain(label, record_sets=[record_set])
pool = DSFResponsePool(label, rs_chains=[chain])
pool.create(td)
# We need to store the newly created pool in the pools list since the
# caller won't know if it was newly created or not. This will allow us
# to find this pool again if another rule references it and avoid
# creating duplicates
pools.append(pool)
return pool
def _mod_geo_rulesets(self, td, change):


Loading…
Cancel
Save