self.cmd_restart = self.default_cmd_restart
self.named_keys = {}
+ self.servers = {}
self.zone_tsig_key = None
self.init_temp_objects()
self.generate_slave_cfg_file()
+ if self.servers:
+ self.debug(_("Collected server configuration:") + '\n' + pp(self.servers))
+ else:
+ self.debug(_("Collected server configuration:") + ' ' + _('None'))
self.compare_files()
try:
allow_line = '\tallow-transfer {'
for key_id in zone.master_tsig_key_ids:
- allow_line += 'key "{}";'.format(key_id)
+ allow_line += ' key "{}";'.format(key_id)
allow_line += ' };'
lines.append(allow_line)
+ for master in self.zone_masters:
+ if master not in self.servers:
+ self.servers[master] = {}
+ if 'keys' not in self.servers[master]:
+ self.servers[master]['keys'] = set()
+ for key_id in zone.master_tsig_key_ids:
+ self.servers[master]['keys'].add(key_id)
+
lines.append('};')
return '\n'.join(lines) + '\n'