From: JINMEI Tatuya Date: Fri, 25 May 2012 06:09:28 +0000 (-0700) Subject: [1458] added documentation for ACL related methods of ZoneConfig. X-Git-Tag: trac2351_base~226^2~64^2^2^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c4e3386e7c0b60f46ba4283dfdea069437fc3932;p=thirdparty%2Fkea.git [1458] added documentation for ACL related methods of ZoneConfig. --- diff --git a/src/lib/python/isc/ddns/zone_config.py b/src/lib/python/isc/ddns/zone_config.py index 6fd7ea3472..388770cb6e 100644 --- a/src/lib/python/isc/ddns/zone_config.py +++ b/src/lib/python/isc/ddns/zone_config.py @@ -72,10 +72,30 @@ class ZoneConfig: return ZONE_NOTFOUND, None def get_update_acl(self, zone_name, zone_class): + '''Return the update ACL for the given zone. + + This method searches the internally stored ACL map to see if + there's an ACL to be applied to the given zone. If found, that + ACL will be returned; otherwise the default ACL (see the constructor + description) will be returned. + + Parameters: + zone_name (isc.dns.Name): The zone name. + zone_class (isc.dns.RRClass): The zone class. + ''' acl = self.__acl_map.get((zone_name, zone_class)) if acl is not None: return acl return self.__default_acl def set_update_acl_map(self, new_map): + '''Set a new ACL map. + + This replaces any stored ACL map, either at construction or + by a previous call to this method, with the given new one. + + Parameter: + new_map: same as the acl_map parameter of the constructor. + + ''' self.__acl_map = new_map