Browse Source

Don't abort rest of the validation if unsupported pools are not present

pull/993/head
Viranch Mehta 3 years ago
parent
commit
cd975b28f4
No known key found for this signature in database GPG Key ID: D83D1392AE9F93B4
1 changed files with 15 additions and 14 deletions
  1. +15
    -14
      octodns/provider/base.py

+ 15
- 14
octodns/provider/base.py View File

@ -66,20 +66,21 @@ class BaseProvider(BaseSource):
for value in pool.data['values']:
if value['status'] != 'obey':
unsupported_pools.append(_id)
if not unsupported_pools:
continue
unsupported_pools = ','.join(unsupported_pools)
msg = (
f'"status" flag used in pools {unsupported_pools}'
f' in {record.fqdn} is not supported'
)
fallback = 'will ignore it and respect the healthcheck'
self.supports_warn_or_except(msg, fallback)
record = record.copy()
for pool in record.dynamic.pools.values():
for value in pool.data['values']:
value['status'] = 'obey'
desired.add_record(record, replace=True)
if unsupported_pools:
unsupported_pools = ','.join(unsupported_pools)
msg = (
f'"status" flag used in pools {unsupported_pools}'
f' in {record.fqdn} is not supported'
)
fallback = (
'will ignore it and respect the healthcheck'
)
self.supports_warn_or_except(msg, fallback)
record = record.copy()
for pool in record.dynamic.pools.values():
for value in pool.data['values']:
value['status'] = 'obey'
desired.add_record(record, replace=True)
if not self.SUPPORTS_DYNAMIC_SUBNETS:
subnet_rules = []


Loading…
Cancel
Save