parameters: (self)
docstring: Handle the update request according to RFC2136.
  
          This method returns a tuple of the following elements that
          indicate the result of the request.
          - Result code of the request processing, which are:
            UPDATE_SUCCESS Update request granted and succeeded.
            UPDATE_ERROR Some error happened to be reported in the response.
            UPDATE_DROP Error happened and no response should be sent.
            Except the case of UPDATE_DROP, the UpdateSession object will have
            created a response that is to be returned to the request client,
            which can be retrieved by get_message().  If it's UPDATE_DROP,
            subsequent call to get_message() returns None.
          - The name of the updated zone (bundy.dns.Name object) in case of
            UPDATE_SUCCESS; otherwise None.
          - The RR class of the updated zone (bundy.dns.RRClass object) in case
            of UPDATE_SUCCESS; otherwise None.
          - The name of the used data source associated with DataSourceClient
            in case of UPDATE_SUCCESS; otherwise None.
docstring_summary: Handle the update request according to RFC2136.
docstring_tokens: Handle the update request according to RFC2136 .
function: def handle(self):
          '''Handle the update request according to RFC2136.
  
          This method returns a tuple of the following elements that
          indicate the result of the request.
          - Result code of the request processing, which are:
            UPDATE_SUCCESS Update request granted and succeeded.
            UPDATE_ERROR Some error happened to be reported in the response.
            UPDATE_DROP Error happened and no response should be sent.
            Except the case of UPDATE_DROP, the UpdateSession object will have
            created a response that is to be returned to the request client,
            which can be retrieved by get_message().  If it's UPDATE_DROP,
            subsequent call to get_message() returns None.
          - The name of the updated zone (bundy.dns.Name object) in case of
            UPDATE_SUCCESS; otherwise None.
          - The RR class of the updated zone (bundy.dns.RRClass object) in case
            of UPDATE_SUCCESS; otherwise None.
          - The name of the used data source associated with DataSourceClient
            in case of UPDATE_SUCCESS; otherwise None.
  
          '''
          try:
              self._get_update_zone()
              # Contrary to what RFC2136 specifies, we do ACL checks before
              # prerequisites. It's now generally considered to be a bad
              # idea, and actually does harm such as information
              # leak. It should make more sense to prevent any security issues
              # by performing ACL check as early as possible.
              self.__check_update_acl(self.__zname, self.__zclass)
              self._create_diff()
              prereq_result = self.__check_prerequisites()
              if prereq_result != Rcode.NOERROR:
                  self.__make_response(prereq_result)
                  return UPDATE_ERROR, self.__zname, self.__zclass, None
              update_result = self.__do_update()
              if update_result != Rcode.NOERROR:
                  self.__make_response(update_result)
                  return UPDATE_ERROR, self.__zname, self.__zclass, None
              self.__make_response(Rcode.NOERROR)
              datasrc_name = self.__datasrc_client.get_datasource_name()
              return UPDATE_SUCCESS, self.__zname, self.__zclass, datasrc_name
          except UpdateError as e:
              if not e.nolog:
                  logger.debug(logger.DBGLVL_TRACE_BASIC,
                               LIBDDNS_UPDATE_PROCESSING_FAILED,
                               ClientFormatter(self.__client_addr, self.__tsig),
                               ZoneFormatter(e.zname, e.zclass), e)
              # If RCODE is specified, create a corresponding resonse and return
              # ERROR; otherwise clear the message and return DROP.
              if e.rcode is not None:
                  self.__make_response(e.rcode)
                  return UPDATE_ERROR, None, None, None
              self.__message = None
              return UPDATE_DROP, None, None, None
          except bundy.datasrc.Error as e:
              logger.error(LIBDDNS_DATASRC_ERROR,
                           ClientFormatter(self.__client_addr, self.__tsig), e)
              self.__make_response(Rcode.SERVFAIL)
              return UPDATE_ERROR, None, None, None
function_tokens: def handle ( self ) : try : self . _get_update_zone ( ) # Contrary to what RFC2136 specifies, we do ACL checks before # prerequisites. It's now generally considered to be a bad # idea, and actually does harm such as information # leak. It should make more sense to prevent any security issues # by performing ACL check as early as possible. self . __check_update_acl ( self . __zname , self . __zclass ) self . _create_diff ( ) prereq_result = self . __check_prerequisites ( ) if prereq_result != Rcode . NOERROR : self . __make_response ( prereq_result ) return UPDATE_ERROR , self . __zname , self . __zclass , None update_result = self . __do_update ( ) if update_result != Rcode . NOERROR : self . __make_response ( update_result ) return UPDATE_ERROR , self . __zname , self . __zclass , None self . __make_response ( Rcode . NOERROR ) datasrc_name = self . __datasrc_client . get_datasource_name ( ) return UPDATE_SUCCESS , self . __zname , self . __zclass , datasrc_name except UpdateError as e : if not e . nolog : logger . debug ( logger . DBGLVL_TRACE_BASIC , LIBDDNS_UPDATE_PROCESSING_FAILED , ClientFormatter ( self . __client_addr , self . __tsig ) , ZoneFormatter ( e . zname , e . zclass ) , e ) # If RCODE is specified, create a corresponding resonse and return # ERROR; otherwise clear the message and return DROP. if e . rcode is not None : self . __make_response ( e . rcode ) return UPDATE_ERROR , None , None , None self . __message = None return UPDATE_DROP , None , None , None except bundy . datasrc . Error as e : logger . error ( LIBDDNS_DATASRC_ERROR , ClientFormatter ( self . __client_addr , self . __tsig ) , e ) self . __make_response ( Rcode . SERVFAIL ) return UPDATE_ERROR , None , None , None