Clean up some unneeded prints
This commit is contained in:
		| @@ -62,13 +62,11 @@ class DNSAggregatorInstance(object): | |||||||
|         self.dns_server_daemon.stop() |         self.dns_server_daemon.stop() | ||||||
|  |  | ||||||
|     def add_network(self, network): |     def add_network(self, network): | ||||||
|         print("adding {}".format(network)) |  | ||||||
|         self.dns_networks[network] =  DNSNetworkInstance(self.config, self.logger, self.mysql_conn, network) |         self.dns_networks[network] =  DNSNetworkInstance(self.config, self.logger, self.mysql_conn, network) | ||||||
|         self.dns_networks[network].add_network() |         self.dns_networks[network].add_network() | ||||||
|         self.dns_axfr_daemon.update_networks(self.dns_networks) |         self.dns_axfr_daemon.update_networks(self.dns_networks) | ||||||
|  |  | ||||||
|     def remove_network(self, network): |     def remove_network(self, network): | ||||||
|         print("removing {}".format(network)) |  | ||||||
|         if self.dns_networks[network]: |         if self.dns_networks[network]: | ||||||
|             self.dns_networks[network].remove_network() |             self.dns_networks[network].remove_network() | ||||||
|             del self.dns_networks[network] |             del self.dns_networks[network] | ||||||
| @@ -289,7 +287,6 @@ class AXFRDaemonInstance(object): | |||||||
|                     dnsmasq_ip = network.ip6_gateway |                     dnsmasq_ip = network.ip6_gateway | ||||||
|  |  | ||||||
|                 # Get an AXFR from the dnsmasq instance and list of records |                 # Get an AXFR from the dnsmasq instance and list of records | ||||||
|                 print('{} {}'.format(dnsmasq_ip, domain)) |  | ||||||
|                 try: |                 try: | ||||||
|                     z = dns.zone.from_xfr(dns.query.xfr(dnsmasq_ip, domain, lifetime=5.0)) |                     z = dns.zone.from_xfr(dns.query.xfr(dnsmasq_ip, domain, lifetime=5.0)) | ||||||
|                     records_raw = [z[n].to_text(n) for n in z.nodes.keys()] |                     records_raw = [z[n].to_text(n) for n in z.nodes.keys()] | ||||||
| @@ -343,9 +340,6 @@ class AXFRDaemonInstance(object): | |||||||
|                 records_new.sort() |                 records_new.sort() | ||||||
|                 records_old.sort() |                 records_old.sort() | ||||||
|  |  | ||||||
|                 print('New: {}'.format(records_new)) |  | ||||||
|                 print('Old: {}'.format(records_old)) |  | ||||||
|  |  | ||||||
|                 # Find the differences between the lists |                 # Find the differences between the lists | ||||||
|                 # Basic check one: are they completely equal |                 # Basic check one: are they completely equal | ||||||
|                 if records_new != records_old: |                 if records_new != records_old: | ||||||
| @@ -375,7 +369,6 @@ class AXFRDaemonInstance(object): | |||||||
|  |  | ||||||
|                     changed = False |                     changed = False | ||||||
|                     if len(remove_records) > 0: |                     if len(remove_records) > 0: | ||||||
|                         print(remove_records) |  | ||||||
|                         # Remove the invalid old records |                         # Remove the invalid old records | ||||||
|                         for record_id in remove_records: |                         for record_id in remove_records: | ||||||
|                             mysql_curs = self.mysql_conn.cursor() |                             mysql_curs = self.mysql_conn.cursor() | ||||||
| @@ -386,7 +379,6 @@ class AXFRDaemonInstance(object): | |||||||
|                             changed = True |                             changed = True | ||||||
|  |  | ||||||
|                     if len(in_new_not_in_old) > 0: |                     if len(in_new_not_in_old) > 0: | ||||||
|                         print(in_new_not_in_old) |  | ||||||
|                         # Add the new records |                         # Add the new records | ||||||
|                         for record in in_new_not_in_old: |                         for record in in_new_not_in_old: | ||||||
|                             # [NAME, TTL, 'IN', TYPE, DATA] |                             # [NAME, TTL, 'IN', TYPE, DATA] | ||||||
| @@ -409,7 +401,6 @@ class AXFRDaemonInstance(object): | |||||||
|                             (domain_id,) |                             (domain_id,) | ||||||
|                         ) |                         ) | ||||||
|                         soa_record = list(mysql_curs.fetchone())[0].split() |                         soa_record = list(mysql_curs.fetchone())[0].split() | ||||||
|                         print(soa_record) |  | ||||||
|                         current_serial = int(soa_record[2]) |                         current_serial = int(soa_record[2]) | ||||||
|                         new_serial = current_serial + 1 |                         new_serial = current_serial + 1 | ||||||
|                         soa_record[2] = str(new_serial) |                         soa_record[2] = str(new_serial) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user