update bw to 4.3, add .provides() to metadata reactors
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
7f0fb7a6e2
commit
2d42e5f7dd
29 changed files with 158 additions and 47 deletions
|
@ -38,7 +38,9 @@ defaults = {
|
|||
}
|
||||
|
||||
|
||||
@metadata_reactor
|
||||
@metadata_reactor.provides(
|
||||
'icinga2_api/powerdns/services',
|
||||
)
|
||||
def monitoring_for_primary_nameserver(metadata):
|
||||
if metadata.get('powerdns/is_secondary', False):
|
||||
return {}
|
||||
|
@ -56,7 +58,9 @@ def monitoring_for_primary_nameserver(metadata):
|
|||
}
|
||||
|
||||
|
||||
@metadata_reactor
|
||||
@metadata_reactor.provides(
|
||||
'powerdns/my_secondary_servers',
|
||||
)
|
||||
def get_ips_of_secondary_nameservers(metadata):
|
||||
if metadata.get('powerdns/is_secondary', False):
|
||||
return {}
|
||||
|
@ -73,7 +77,9 @@ def get_ips_of_secondary_nameservers(metadata):
|
|||
},
|
||||
}
|
||||
|
||||
@metadata_reactor
|
||||
@metadata_reactor.provides(
|
||||
'powerdns/my_primary_servers',
|
||||
)
|
||||
def get_ips_of_primary_nameservers(metadata):
|
||||
if not metadata.get('powerdns/is_secondary', False):
|
||||
return {}
|
||||
|
@ -91,7 +97,9 @@ def get_ips_of_primary_nameservers(metadata):
|
|||
}
|
||||
|
||||
|
||||
@metadata_reactor
|
||||
@metadata_reactor.provides(
|
||||
'powerdns/bind-zones/kunbox.net/records',
|
||||
)
|
||||
def generate_dns_entries_for_nodes(metadata):
|
||||
results = set()
|
||||
|
||||
|
@ -133,7 +141,9 @@ def generate_dns_entries_for_nodes(metadata):
|
|||
}
|
||||
|
||||
|
||||
@metadata_reactor
|
||||
@metadata_reactor.provides(
|
||||
'hosts/entries',
|
||||
)
|
||||
def hosts_entries_for_all_dns_servers(metadata):
|
||||
entries = {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue