Workflow: Some modifications
This commit is contained in:
parent
5023b85d7c
commit
d7c239a6f6
6 changed files with 27 additions and 13 deletions
|
@ -37,20 +37,21 @@ if __name__ == '__main__':
|
|||
DB.enter_step('feed_switch')
|
||||
if dtype == 'a':
|
||||
for rule in DB.get_ip4(value):
|
||||
if not list(DB.get_domain_in_zone(name)):
|
||||
if not any(DB.get_domain_in_zone(name)):
|
||||
|
||||
DB.set_hostname(name, source=rule,
|
||||
updated=int(timestamp))
|
||||
# updated=int(data['timestamp']))
|
||||
elif dtype == 'c':
|
||||
for rule in DB.get_domain(value):
|
||||
if not list(DB.get_domain_in_zone(name)):
|
||||
if not any(DB.get_domain_in_zone(name)):
|
||||
DB.set_hostname(name, source=rule,
|
||||
updated=int(timestamp))
|
||||
# updated=int(data['timestamp']))
|
||||
elif dtype == 'p':
|
||||
for rule in DB.get_domain(value):
|
||||
if not list(DB.get_ip4_in_network(name)):
|
||||
if not any(DB.get_ip4_in_network(name)):
|
||||
log.debug('%s matched by %d: add %s', value, rule, name)
|
||||
DB.set_ip4address(name, source=rule,
|
||||
updated=int(timestamp))
|
||||
# updated=int(data['timestamp']))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue