from .xlate import XLATOR
-__version__ = '0.7.3'
+__version__ = '0.7.4'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
self.init_temp_objects()
self.generate_slave_cfg_file()
- if self.servers:
- LOG.debug(_("Collected server configuration:") + '\n' + pp(self.servers))
- else:
- LOG.debug(_("Collected server configuration:") + ' ' + _('None'))
self.compare_files()
try:
if zone_config:
content += '\n' + zone_config
+ if self.servers:
+ LOG.debug(_("Collected server configuration:") + '\n' + pp(self.servers))
+ else:
+ LOG.debug(_("Collected server configuration:") + ' ' + _('None'))
+
+ if self.servers:
+ for server in sorted(self.servers.keys()):
+ lines = []
+ lines.append('')
+ lines.append('server {} {{'.format(server))
+ lines.append('\tkeys {')
+ for key_id in sorted(self.servers[server]['keys']):
+ lines.append("\t\t{};".format(key_id))
+ lines.append('\t};')
+ lines.append('};')
+ content += '\n'.join(lines) + '\n'
+
content += '\n// vim: ts=8 filetype=named noet noai\n'
with open(self.temp_zones_cfg_file, 'w', **self.open_args) as fh: