mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 22:15:23 +00:00
[2497] Make new_rdata_factory_users[] a list of tuples
Also: * document new_rdata_factory_users[] with an example * Rename new_rdatafactory_users[] to new_rdata_factory_users[]
This commit is contained in:
@@ -24,11 +24,20 @@ from os.path import getmtime
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
# new_rdata_factory_users[] is a list of tuples of the form (rrtype,
|
||||||
|
# rrclass). Items in the list use the (new) RdataFactory class, and
|
||||||
|
# items which are not in the list use OldRdataFactory class.
|
||||||
|
# Note: rrtype and rrclass must be specified in lowercase in
|
||||||
|
# new_rdata_factory_users.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# new_rdata_factory_users = [('a', 'in'), ('a', 'ch')]
|
||||||
|
new_rdata_factory_users = []
|
||||||
|
|
||||||
re_typecode = re.compile('([\da-z]+)_(\d+)')
|
re_typecode = re.compile('([\da-z]+)_(\d+)')
|
||||||
classcode2txt = {}
|
classcode2txt = {}
|
||||||
typecode2txt = {}
|
typecode2txt = {}
|
||||||
typeandclass = []
|
typeandclass = []
|
||||||
new_rdatafactory_users = []
|
|
||||||
generic_code = 65536 # something larger than any code value
|
generic_code = 65536 # something larger than any code value
|
||||||
rdata_declarations = ''
|
rdata_declarations = ''
|
||||||
class_definitions = ''
|
class_definitions = ''
|
||||||
@@ -275,8 +284,8 @@ def generate_rrparam(fileprefix, basemtime):
|
|||||||
|
|
||||||
# By default, we use OldRdataFactory (see bug #2497). If you
|
# By default, we use OldRdataFactory (see bug #2497). If you
|
||||||
# want to pick RdataFactory for a particular type, add it to
|
# want to pick RdataFactory for a particular type, add it to
|
||||||
# new_rdatafactory_users.
|
# new_rdata_factory_users.
|
||||||
if type_txt in new_rdatafactory_users:
|
if (type_txt.lower(), class_txt.lower()) in new_rdata_factory_users:
|
||||||
rdf_class = 'RdataFactory'
|
rdf_class = 'RdataFactory'
|
||||||
else:
|
else:
|
||||||
rdf_class = 'OldRdataFactory'
|
rdf_class = 'OldRdataFactory'
|
||||||
|
Reference in New Issue
Block a user