Fix typos, add a log for filter updates

This commit is contained in:
Pavan Chandrashekar
2020-03-25 15:30:00 -07:00
parent f42300b983
commit 438bea46c3
+4 -2
View File
@@ -1138,7 +1138,7 @@ class Ns1Provider(BaseProvider):
ns1_record['domain'],
ns1_record['type'])
if 'filters' in full_rec:
filter_key = '{}.'format(ns1_record['domain'])
filter_key = '{}.'.format(ns1_record['domain'])
ns1_filters[filter_key] = full_rec['filters']
return ns1_filters
@@ -1165,12 +1165,14 @@ class Ns1Provider(BaseProvider):
# Check if filters for existing domains need an update
# Needs an explicit check since there might be no change in the
# config at all. Filters however might still need an update
domain = '{}.{}'format(record.name, record.zone.name)
domain = '{}.{}'.format(record.name, record.zone.name)
if domain in ns1_filters:
domain_filters = ns1_filters[domain]
if not self._disabled_flag_in_filters(domain_filters, domain):
# 'disabled' entry absent in filter config. Need to update
# filters. Update record
self.log.info('_extra_changes: change in filters for %s',
domain)
extra.append(Update(record, record))
continue