Beispiel #1
0
    def _init_notify_out(self, datasrc_file):
        '''Get all the zones name and its notify target's address.

        TODO, currently the zones are got by going through the zone
        table in database. There should be a better way to get them
        and also the setting 'also_notify', and there should be one
        mechanism to cover the changed datasrc.

        '''
        self._db_file = datasrc_file
        for zone_name, zone_class in sqlite3_ds.get_zones_info(datasrc_file):
            zone_id = (zone_name, zone_class)
            self._notify_infos[zone_id] = ZoneNotifyInfo(zone_name, zone_class)
            slaves = self._get_notify_slaves_from_ns(Name(zone_name),
                                                     RRClass(zone_class))
            for item in slaves:
                self._notify_infos[zone_id].notify_slaves.append((item, 53))
Beispiel #2
0
 def add_slave(self, address, port):
     for zone_name, zone_class in sqlite3_ds.get_zones_info(self._db_file):
         zone_id = (zone_name, zone_class)
         if zone_id in self._notify_infos:
             self._notify_infos[zone_id].notify_slaves.append((address, port))