Commit 12b72af0 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[1372] cleanup: naming consistency

parent ecd9c5fc
...@@ -336,7 +336,7 @@ class XfroutSession(): ...@@ -336,7 +336,7 @@ class XfroutSession():
return (Rcode.SERVFAIL(), None) return (Rcode.SERVFAIL(), None)
return (Rcode.NOERROR(), soa_rrset) return (Rcode.NOERROR(), soa_rrset)
def __setup_axfr(self, zone_name): def __axfr_setup(self, zone_name):
'''Setup a zone iterator for AXFR or AXFR-style IXFR. '''Setup a zone iterator for AXFR or AXFR-style IXFR.
''' '''
...@@ -364,7 +364,7 @@ class XfroutSession(): ...@@ -364,7 +364,7 @@ class XfroutSession():
return Rcode.NOERROR() return Rcode.NOERROR()
def __setup_ixfr(self, request_msg, zone_name): def __ixfr_setup(self, request_msg, zone_name):
'''Setup a zone journal reader for IXFR. '''Setup a zone journal reader for IXFR.
If the underlying data source does not know the requested range If the underlying data source does not know the requested range
...@@ -389,11 +389,11 @@ class XfroutSession(): ...@@ -389,11 +389,11 @@ class XfroutSession():
# The underlying data source doesn't support journaling. # The underlying data source doesn't support journaling.
# Fallback to AXFR-style IXFR. # Fallback to AXFR-style IXFR.
# TBD: log it. # TBD: log it.
return self.__setup_axfr(zone_name) return self.__axfr_setup(zone_name)
if code == ZoneJournalReader.NO_SUCH_VERSION: if code == ZoneJournalReader.NO_SUCH_VERSION:
# fallback to AXFR-style IXFR # fallback to AXFR-style IXFR
# TBD: log it. # TBD: log it.
return self.__setup_axfr(zone_name) return self.__axfr_setup(zone_name)
if code == ZoneJournalReader.NO_SUCH_ZONE: if code == ZoneJournalReader.NO_SUCH_ZONE:
# this is quite unexpected as we know zone's SOA exists. # this is quite unexpected as we know zone's SOA exists.
# It might be a bug or the data source is somehow broken, # It might be a bug or the data source is somehow broken,
...@@ -425,9 +425,9 @@ class XfroutSession(): ...@@ -425,9 +425,9 @@ class XfroutSession():
self._datasrc_client = self.ClientClass('sqlite3', datasrc_config) self._datasrc_client = self.ClientClass('sqlite3', datasrc_config)
if self._request_type == RRType.AXFR(): if self._request_type == RRType.AXFR():
return self.__setup_axfr(zone_name) return self.__axfr_setup(zone_name)
else: else:
return self.__setup_ixfr(request_msg, zone_name) return self.__ixfr_setup(request_msg, zone_name)
def dns_xfrout_start(self, sock_fd, msg_query, quota_ok=True): def dns_xfrout_start(self, sock_fd, msg_query, quota_ok=True):
rcode_, msg = self._parse_query_message(msg_query) rcode_, msg = self._parse_query_message(msg_query)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment