BIND 10 #1978: communication to b10-auth from b10-ddns

BIND 10 Development do-not-reply at isc.org
Wed Jun 6 02:53:34 UTC 2012


#1978: communication to b10-auth from b10-ddns
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  kevin_tes
  jinmei                             |                Status:  accepted
                       Type:  task   |             Milestone:
                   Priority:         |  Sprint-20120612
  medium                             |            Resolution:
                  Component:  DDNS   |             Sensitive:  0
                   Keywords:         |           Sub-Project:  DNS
            Defect Severity:  N/A    |  Estimated Difficulty:  5
Feature Depending on Ticket:         |           Total Hours:  0
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------

Comment (by kevin_tes):

 Replying to [comment:3 jinmei]:
 > I've done mostly the same thing in #1513.  Depending on your progress
 > in this ticket, you may want to start from a snapshot of trac1513.
 > Or, if you've not actually started your work, I can take over it
 > and complete it within trac1513 (so you can work on other things
 > rather than first understanding trac1513).
 >
 Jinmei:
 This ticket should wait for the trac1513 to be merged.

 The code need add a new method after:
 {{{
 if result == isc.ddns.session.UPDATE_SUCCESS:
 }}}
 called:
 {{{
 AUTH_MODULE_NAME = 'Auth'

 def _tell_auth_loadzone(server, zone_name, zone_class):
     # On a successful response of DDNS request, if the zone is served by
     # b10-auth in the in-memory data source using sqlite3 as a
     # backend, send the "loadzone" command for the zone to auth.
     datasources, is_default =\
         server._cc.get_remote_config_value(AUTH_MODULE_NAME,
 "datasources")
     if is_default:
         return
     for d in datasources:
         if "type" not in d:
             continue
         try:
             if "class" in d:
                 dclass = RRClass(d["class"])
             else:
                 dclass = RRClass("IN")
         except InvalidRRClass as err:
             logger.info(XFRIN_AUTH_CONFIG_RRCLASS_ERROR, str(err))
             continue

         if d["type"].lower() == "memory" and dclass == zone_class:
             for zone in d["zones"]:
                 if "filetype" not in zone:
                     continue
                 if "origin" not in zone:
                     continue
                 if "filetype" not in zone:
                     continue
                 try:
                     name = Name(zone["origin"])
                 except (EmptyLabel, TooLongLabel, BadLabelType, BadEscape,
 TooLongName, IncompleteName):
                     logger.info(XFRIN_AUTH_CONFIG_NAME_PARSER_ERROR,
 str(err))
                     continue

                 if zone["filetype"].lower() == "sqlite3" and name ==
 zone_name:
                     param = {"origin": zone_name.to_text(),
                              "class": zone_class.to_text(),
                              "datasrc": d["type"]}

                     logger.debug(DBG_XFRIN_TRACE, XFRIN_AUTH_LOADZONE,
                                  param["origin"], param["class"],
 param["datasrc"])

                     msg = create_command("loadzone", param)
                     seq = server._send_cc_session.group_sendmsg(msg,
 AUTH_MODULE_NAME)
                     answer, env =
 server._send_cc_session.group_recvmsg(False, seq)

 }}}

-- 
Ticket URL: <http://bind10.isc.org/ticket/1978#comment:5>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list