diff --git a/nsupdate/api/views.py b/nsupdate/api/views.py index 7343a5f..7d34a23 100644 --- a/nsupdate/api/views.py +++ b/nsupdate/api/views.py @@ -258,6 +258,17 @@ class AuthorizedNicUpdateView(View): def _update(host, hostname, ipaddr, agent='unknown', ssl=False, logger=None): + """ + common code shared by the 2 update views + + :param host: host object + :param hostname: hostname (fqdn) + :param ipaddr: new ip addr (v4 or v6) + :param agent: remote's user agent string + :param ssl: True if we use SSL/https + :param logger: a logger object + :return: Response object with dyndns2 response + """ # we are doing abuse / available checks rather late, so the client might # get more specific responses (like 'badagent' or 'notfqdn') by earlier # checks. it also avoids some code duplication if done here: diff --git a/nsupdate/main/dnstools.py b/nsupdate/main/dnstools.py index e6bb931..33dad23 100644 --- a/nsupdate/main/dnstools.py +++ b/nsupdate/main/dnstools.py @@ -265,7 +265,7 @@ def get_ns_info(fqdn, origin=None): def update_ns(fqdn, rdtype='A', ipaddr=None, origin=None, action='upd', ttl=60): """ - update our master server + update the master server :param fqdn: the fully qualified domain name to update (str) :param rdtype: the record type (default: 'A') (str)