Modified records and zone parameters to use DNSNameParam

* Zone is stored as an absolute name (ipa never support relative
* zonenames)
* compatible with relative zone names as was before
* PTR target can be relative domain name

Part of ticket:
IPA should allow internationalized domain names
https://fedorahosted.org/freeipa/ticket/3169

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Martin Basti 2014-04-11 14:14:37 +02:00 committed by Martin Kosek
parent b964d2130a
commit a4d3d01f3f
2 changed files with 65 additions and 74 deletions

92
API.txt
View File

@ -706,8 +706,8 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: PrimaryKey('value', None, None)
command: dnsrecord_add
args: 2,116,3
arg: Str('dnszoneidnsname', cli_name='dnszone', multivalue=False, primary_key=True, query=True, required=True)
arg: Str('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True)
arg: DNSNameParam('dnszoneidnsname', cli_name='dnszone', multivalue=False, only_absolute=True, primary_key=True, query=True, required=True)
arg: DNSNameParam('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True)
option: Str('a6_part_data', attribute=False, cli_name='a6_data', multivalue=False, option_group=u'A6 Record', required=False)
option: A6Record('a6record', attribute=True, cli_name='a6_rec', csv=True, multivalue=True, option_group=u'A6 Record', required=False)
option: Flag('a_extra_create_reverse', attribute=False, autofill=True, cli_name='a_create_reverse', default=False, multivalue=False, option_group=u'A Record', required=False)
@ -716,7 +716,7 @@ option: Flag('aaaa_extra_create_reverse', attribute=False, autofill=True, cli_na
option: Str('aaaa_part_ip_address', attribute=False, cli_name='aaaa_ip_address', multivalue=False, option_group=u'AAAA Record', required=False)
option: AAAARecord('aaaarecord', attribute=True, cli_name='aaaa_rec', csv=True, multivalue=True, option_group=u'AAAA Record', required=False)
option: Str('addattr*', cli_name='addattr', exclude='webui')
option: Str('afsdb_part_hostname', attribute=False, cli_name='afsdb_hostname', multivalue=False, option_group=u'AFSDB Record', required=False)
option: DNSNameParam('afsdb_part_hostname', attribute=False, cli_name='afsdb_hostname', multivalue=False, option_group=u'AFSDB Record', required=False)
option: Int('afsdb_part_subtype', attribute=False, cli_name='afsdb_subtype', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'AFSDB Record', required=False)
option: AFSDBRecord('afsdbrecord', attribute=True, cli_name='afsdb_rec', csv=True, multivalue=True, option_group=u'AFSDB Record', required=False)
option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
@ -727,11 +727,11 @@ option: Str('cert_part_certificate_or_crl', attribute=False, cli_name='cert_cert
option: Int('cert_part_key_tag', attribute=False, cli_name='cert_key_tag', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'CERT Record', required=False)
option: Int('cert_part_type', attribute=False, cli_name='cert_type', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'CERT Record', required=False)
option: CERTRecord('certrecord', attribute=True, cli_name='cert_rec', csv=True, multivalue=True, option_group=u'CERT Record', required=False)
option: Str('cname_part_hostname', attribute=False, cli_name='cname_hostname', multivalue=False, option_group=u'CNAME Record', required=False)
option: DNSNameParam('cname_part_hostname', attribute=False, cli_name='cname_hostname', multivalue=False, option_group=u'CNAME Record', required=False)
option: CNAMERecord('cnamerecord', attribute=True, cli_name='cname_rec', csv=True, multivalue=True, option_group=u'CNAME Record', required=False)
option: DHCIDRecord('dhcidrecord', attribute=True, cli_name='dhcid_rec', csv=True, multivalue=True, option_group=u'DHCID Record', required=False)
option: DLVRecord('dlvrecord', attribute=True, cli_name='dlv_rec', csv=True, multivalue=True, option_group=u'DLV Record', required=False)
option: Str('dname_part_target', attribute=False, cli_name='dname_target', multivalue=False, option_group=u'DNAME Record', required=False)
option: DNSNameParam('dname_part_target', attribute=False, cli_name='dname_target', multivalue=False, option_group=u'DNAME Record', required=False)
option: DNAMERecord('dnamerecord', attribute=True, cli_name='dname_rec', csv=True, multivalue=True, option_group=u'DNAME Record', required=False)
option: StrEnum('dnsclass', attribute=True, cli_name='class', multivalue=False, required=False, values=(u'IN', u'CS', u'CH', u'HS'))
option: DNSKEYRecord('dnskeyrecord', attribute=True, cli_name='dnskey_rec', csv=True, multivalue=True, option_group=u'DNSKEY Record', required=False)
@ -749,7 +749,7 @@ option: Int('key_part_flags', attribute=False, cli_name='key_flags', maxvalue=65
option: Int('key_part_protocol', attribute=False, cli_name='key_protocol', maxvalue=255, minvalue=0, multivalue=False, option_group=u'KEY Record', required=False)
option: Str('key_part_public_key', attribute=False, cli_name='key_public_key', multivalue=False, option_group=u'KEY Record', required=False)
option: KEYRecord('keyrecord', attribute=True, cli_name='key_rec', csv=True, multivalue=True, option_group=u'KEY Record', required=False)
option: Str('kx_part_exchanger', attribute=False, cli_name='kx_exchanger', multivalue=False, option_group=u'KX Record', required=False)
option: DNSNameParam('kx_part_exchanger', attribute=False, cli_name='kx_exchanger', multivalue=False, option_group=u'KX Record', required=False)
option: Int('kx_part_preference', attribute=False, cli_name='kx_preference', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'KX Record', required=False)
option: KXRecord('kxrecord', attribute=True, cli_name='kx_rec', csv=True, multivalue=True, option_group=u'KX Record', required=False)
option: Decimal('loc_part_altitude', attribute=False, cli_name='loc_altitude', maxvalue=Decimal('42849672.95'), minvalue=Decimal('-100000.00'), multivalue=False, option_group=u'LOC Record', precision=2, required=False)
@ -765,7 +765,7 @@ option: Decimal('loc_part_lon_sec', attribute=False, cli_name='loc_lon_sec', max
option: Decimal('loc_part_size', attribute=False, cli_name='loc_size', maxvalue=Decimal('90000000.00'), minvalue=Decimal('0.0'), multivalue=False, option_group=u'LOC Record', precision=2, required=False)
option: Decimal('loc_part_v_precision', attribute=False, cli_name='loc_v_precision', maxvalue=Decimal('90000000.00'), minvalue=Decimal('0.0'), multivalue=False, option_group=u'LOC Record', precision=2, required=False)
option: LOCRecord('locrecord', attribute=True, cli_name='loc_rec', csv=True, multivalue=True, option_group=u'LOC Record', required=False)
option: Str('mx_part_exchanger', attribute=False, cli_name='mx_exchanger', multivalue=False, option_group=u'MX Record', required=False)
option: DNSNameParam('mx_part_exchanger', attribute=False, cli_name='mx_exchanger', multivalue=False, option_group=u'MX Record', required=False)
option: Int('mx_part_preference', attribute=False, cli_name='mx_preference', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'MX Record', required=False)
option: MXRecord('mxrecord', attribute=True, cli_name='mx_rec', csv=True, multivalue=True, option_group=u'MX Record', required=False)
option: Str('naptr_part_flags', attribute=False, cli_name='naptr_flags', multivalue=False, option_group=u'NAPTR Record', required=False)
@ -775,14 +775,14 @@ option: Str('naptr_part_regexp', attribute=False, cli_name='naptr_regexp', multi
option: Str('naptr_part_replacement', attribute=False, cli_name='naptr_replacement', multivalue=False, option_group=u'NAPTR Record', required=False)
option: Str('naptr_part_service', attribute=False, cli_name='naptr_service', multivalue=False, option_group=u'NAPTR Record', required=False)
option: NAPTRRecord('naptrrecord', attribute=True, cli_name='naptr_rec', csv=True, multivalue=True, option_group=u'NAPTR Record', required=False)
option: Str('ns_part_hostname', attribute=False, cli_name='ns_hostname', multivalue=False, option_group=u'NS Record', required=False)
option: DNSNameParam('ns_part_hostname', attribute=False, cli_name='ns_hostname', multivalue=False, option_group=u'NS Record', required=False)
option: NSEC3PARAMRecord('nsec3paramrecord', attribute=True, cli_name='nsec3param_rec', csv=True, multivalue=True, option_group=u'NSEC3PARAM Record', required=False)
option: NSEC3Record('nsec3record', attribute=True, cli_name='nsec3_rec', csv=True, multivalue=True, option_group=u'NSEC3 Record', required=False)
option: Str('nsec_part_next', attribute=False, cli_name='nsec_next', multivalue=False, option_group=u'NSEC Record', required=False)
option: DNSNameParam('nsec_part_next', attribute=False, cli_name='nsec_next', multivalue=False, option_group=u'NSEC Record', required=False)
option: StrEnum('nsec_part_types', attribute=False, cli_name='nsec_types', csv=True, multivalue=True, option_group=u'NSEC Record', required=False, values=(u'SOA', u'A', u'AAAA', u'A6', u'AFSDB', u'APL', u'CERT', u'CNAME', u'DHCID', u'DLV', u'DNAME', u'DNSKEY', u'DS', u'HIP', u'IPSECKEY', u'KEY', u'KX', u'LOC', u'MX', u'NAPTR', u'NS', u'NSEC', u'NSEC3', u'NSEC3PARAM', u'PTR', u'RRSIG', u'RP', u'SIG', u'SPF', u'SRV', u'SSHFP', u'TA', u'TKEY', u'TSIG', u'TXT'))
option: NSECRecord('nsecrecord', attribute=True, cli_name='nsec_rec', csv=True, multivalue=True, option_group=u'NSEC Record', required=False)
option: NSRecord('nsrecord', attribute=True, cli_name='ns_rec', csv=True, multivalue=True, option_group=u'NS Record', required=False)
option: Str('ptr_part_hostname', attribute=False, cli_name='ptr_hostname', multivalue=False, option_group=u'PTR Record', required=False)
option: DNSNameParam('ptr_part_hostname', attribute=False, cli_name='ptr_hostname', multivalue=False, only_absolute=True, option_group=u'PTR Record', required=False)
option: PTRRecord('ptrrecord', attribute=True, cli_name='ptr_rec', csv=True, multivalue=True, option_group=u'PTR Record', required=False)
option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui')
option: RPRecord('rprecord', attribute=True, cli_name='rp_rec', csv=True, multivalue=True, option_group=u'RP Record', required=False)
@ -810,7 +810,7 @@ option: SIGRecord('sigrecord', attribute=True, cli_name='sig_rec', csv=True, mul
option: SPFRecord('spfrecord', attribute=True, cli_name='spf_rec', csv=True, multivalue=True, option_group=u'SPF Record', required=False)
option: Int('srv_part_port', attribute=False, cli_name='srv_port', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'SRV Record', required=False)
option: Int('srv_part_priority', attribute=False, cli_name='srv_priority', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'SRV Record', required=False)
option: Str('srv_part_target', attribute=False, cli_name='srv_target', multivalue=False, option_group=u'SRV Record', required=False)
option: DNSNameParam('srv_part_target', attribute=False, cli_name='srv_target', multivalue=False, option_group=u'SRV Record', required=False)
option: Int('srv_part_weight', attribute=False, cli_name='srv_weight', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'SRV Record', required=False)
option: SRVRecord('srvrecord', attribute=True, cli_name='srv_rec', csv=True, multivalue=True, option_group=u'SRV Record', required=False)
option: Int('sshfp_part_algorithm', attribute=False, cli_name='sshfp_algorithm', maxvalue=255, minvalue=0, multivalue=False, option_group=u'SSHFP Record', required=False)
@ -829,8 +829,8 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: PrimaryKey('value', None, None)
command: dnsrecord_del
args: 2,39,3
arg: Str('dnszoneidnsname', cli_name='dnszone', multivalue=False, primary_key=True, query=True, required=True)
arg: Str('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True)
arg: DNSNameParam('dnszoneidnsname', cli_name='dnszone', multivalue=False, only_absolute=True, primary_key=True, query=True, required=True)
arg: DNSNameParam('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True)
option: A6Record('a6record', attribute=True, autofill=False, cli_name='a6_rec', csv=True, multivalue=True, option_group=None, required=False)
option: AAAARecord('aaaarecord', attribute=True, autofill=False, cli_name='aaaa_rec', csv=True, multivalue=True, option_group=None, required=False)
option: AFSDBRecord('afsdbrecord', attribute=True, autofill=False, cli_name='afsdb_rec', csv=True, multivalue=True, option_group=None, required=False)
@ -875,8 +875,8 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: ListOfPrimaryKeys('value', None, None)
command: dnsrecord_delentry
args: 2,2,3
arg: Str('dnszoneidnsname', cli_name='dnszone', multivalue=False, primary_key=True, query=True, required=True)
arg: Str('idnsname', attribute=True, cli_name='name', multivalue=True, primary_key=True, query=True, required=True)
arg: DNSNameParam('dnszoneidnsname', cli_name='dnszone', multivalue=False, only_absolute=True, primary_key=True, query=True, required=True)
arg: DNSNameParam('idnsname', attribute=True, cli_name='name', multivalue=True, primary_key=True, query=True, required=True)
option: Flag('continue', autofill=True, cli_name='continue', default=False)
option: Str('version?', exclude='webui')
output: Output('result', <type 'dict'>, None)
@ -884,7 +884,7 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: ListOfPrimaryKeys('value', None, None)
command: dnsrecord_find
args: 2,44,4
arg: Str('dnszoneidnsname', cli_name='dnszone', multivalue=False, primary_key=True, query=True, required=True)
arg: DNSNameParam('dnszoneidnsname', cli_name='dnszone', multivalue=False, only_absolute=True, primary_key=True, query=True, required=True)
arg: Str('criteria?', noextrawhitespace=False)
option: A6Record('a6record', attribute=True, autofill=False, cli_name='a6_rec', csv=True, multivalue=True, option_group=None, query=True, required=False)
option: AAAARecord('aaaarecord', attribute=True, autofill=False, cli_name='aaaa_rec', csv=True, multivalue=True, option_group=None, query=True, required=False)
@ -902,7 +902,7 @@ option: DNSKEYRecord('dnskeyrecord', attribute=True, autofill=False, cli_name='d
option: Int('dnsttl', attribute=True, autofill=False, cli_name='ttl', multivalue=False, query=True, required=False)
option: DSRecord('dsrecord', attribute=True, autofill=False, cli_name='ds_rec', csv=True, multivalue=True, option_group=None, query=True, required=False)
option: HIPRecord('hiprecord', attribute=True, autofill=False, cli_name='hip_rec', csv=True, multivalue=True, option_group=None, query=True, required=False)
option: Str('idnsname', attribute=True, autofill=False, cli_name='name', multivalue=False, primary_key=True, query=True, required=False)
option: DNSNameParam('idnsname', attribute=True, autofill=False, cli_name='name', multivalue=False, primary_key=True, query=True, required=False)
option: IPSECKEYRecord('ipseckeyrecord', attribute=True, autofill=False, cli_name='ipseckey_rec', csv=True, multivalue=True, option_group=None, query=True, required=False)
option: KEYRecord('keyrecord', attribute=True, autofill=False, cli_name='key_rec', csv=True, multivalue=True, option_group=None, query=True, required=False)
option: KXRecord('kxrecord', attribute=True, autofill=False, cli_name='kx_rec', csv=True, multivalue=True, option_group=None, query=True, required=False)
@ -936,15 +936,15 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: Output('truncated', <type 'bool'>, None)
command: dnsrecord_mod
args: 2,116,3
arg: Str('dnszoneidnsname', cli_name='dnszone', multivalue=False, primary_key=True, query=True, required=True)
arg: Str('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True)
arg: DNSNameParam('dnszoneidnsname', cli_name='dnszone', multivalue=False, only_absolute=True, primary_key=True, query=True, required=True)
arg: DNSNameParam('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True)
option: Str('a6_part_data', attribute=False, autofill=False, cli_name='a6_data', multivalue=False, option_group=u'A6 Record', required=False)
option: A6Record('a6record', attribute=True, autofill=False, cli_name='a6_rec', csv=True, multivalue=True, option_group=u'A6 Record', required=False)
option: Str('a_part_ip_address', attribute=False, autofill=False, cli_name='a_ip_address', multivalue=False, option_group=u'A Record', required=False)
option: Str('aaaa_part_ip_address', attribute=False, autofill=False, cli_name='aaaa_ip_address', multivalue=False, option_group=u'AAAA Record', required=False)
option: AAAARecord('aaaarecord', attribute=True, autofill=False, cli_name='aaaa_rec', csv=True, multivalue=True, option_group=u'AAAA Record', required=False)
option: Str('addattr*', cli_name='addattr', exclude='webui')
option: Str('afsdb_part_hostname', attribute=False, autofill=False, cli_name='afsdb_hostname', multivalue=False, option_group=u'AFSDB Record', required=False)
option: DNSNameParam('afsdb_part_hostname', attribute=False, autofill=False, cli_name='afsdb_hostname', multivalue=False, option_group=u'AFSDB Record', required=False)
option: Int('afsdb_part_subtype', attribute=False, autofill=False, cli_name='afsdb_subtype', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'AFSDB Record', required=False)
option: AFSDBRecord('afsdbrecord', attribute=True, autofill=False, cli_name='afsdb_rec', csv=True, multivalue=True, option_group=u'AFSDB Record', required=False)
option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
@ -955,12 +955,12 @@ option: Str('cert_part_certificate_or_crl', attribute=False, autofill=False, cli
option: Int('cert_part_key_tag', attribute=False, autofill=False, cli_name='cert_key_tag', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'CERT Record', required=False)
option: Int('cert_part_type', attribute=False, autofill=False, cli_name='cert_type', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'CERT Record', required=False)
option: CERTRecord('certrecord', attribute=True, autofill=False, cli_name='cert_rec', csv=True, multivalue=True, option_group=u'CERT Record', required=False)
option: Str('cname_part_hostname', attribute=False, autofill=False, cli_name='cname_hostname', multivalue=False, option_group=u'CNAME Record', required=False)
option: DNSNameParam('cname_part_hostname', attribute=False, autofill=False, cli_name='cname_hostname', multivalue=False, option_group=u'CNAME Record', required=False)
option: CNAMERecord('cnamerecord', attribute=True, autofill=False, cli_name='cname_rec', csv=True, multivalue=True, option_group=u'CNAME Record', required=False)
option: Str('delattr*', cli_name='delattr', exclude='webui')
option: DHCIDRecord('dhcidrecord', attribute=True, autofill=False, cli_name='dhcid_rec', csv=True, multivalue=True, option_group=u'DHCID Record', required=False)
option: DLVRecord('dlvrecord', attribute=True, autofill=False, cli_name='dlv_rec', csv=True, multivalue=True, option_group=u'DLV Record', required=False)
option: Str('dname_part_target', attribute=False, autofill=False, cli_name='dname_target', multivalue=False, option_group=u'DNAME Record', required=False)
option: DNSNameParam('dname_part_target', attribute=False, autofill=False, cli_name='dname_target', multivalue=False, option_group=u'DNAME Record', required=False)
option: DNAMERecord('dnamerecord', attribute=True, autofill=False, cli_name='dname_rec', csv=True, multivalue=True, option_group=u'DNAME Record', required=False)
option: StrEnum('dnsclass', attribute=True, autofill=False, cli_name='class', multivalue=False, required=False, values=(u'IN', u'CS', u'CH', u'HS'))
option: DNSKEYRecord('dnskeyrecord', attribute=True, autofill=False, cli_name='dnskey_rec', csv=True, multivalue=True, option_group=u'DNSKEY Record', required=False)
@ -977,7 +977,7 @@ option: Int('key_part_flags', attribute=False, autofill=False, cli_name='key_fla
option: Int('key_part_protocol', attribute=False, autofill=False, cli_name='key_protocol', maxvalue=255, minvalue=0, multivalue=False, option_group=u'KEY Record', required=False)
option: Str('key_part_public_key', attribute=False, autofill=False, cli_name='key_public_key', multivalue=False, option_group=u'KEY Record', required=False)
option: KEYRecord('keyrecord', attribute=True, autofill=False, cli_name='key_rec', csv=True, multivalue=True, option_group=u'KEY Record', required=False)
option: Str('kx_part_exchanger', attribute=False, autofill=False, cli_name='kx_exchanger', multivalue=False, option_group=u'KX Record', required=False)
option: DNSNameParam('kx_part_exchanger', attribute=False, autofill=False, cli_name='kx_exchanger', multivalue=False, option_group=u'KX Record', required=False)
option: Int('kx_part_preference', attribute=False, autofill=False, cli_name='kx_preference', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'KX Record', required=False)
option: KXRecord('kxrecord', attribute=True, autofill=False, cli_name='kx_rec', csv=True, multivalue=True, option_group=u'KX Record', required=False)
option: Decimal('loc_part_altitude', attribute=False, autofill=False, cli_name='loc_altitude', maxvalue=Decimal('42849672.95'), minvalue=Decimal('-100000.00'), multivalue=False, option_group=u'LOC Record', precision=2, required=False)
@ -993,7 +993,7 @@ option: Decimal('loc_part_lon_sec', attribute=False, autofill=False, cli_name='l
option: Decimal('loc_part_size', attribute=False, autofill=False, cli_name='loc_size', maxvalue=Decimal('90000000.00'), minvalue=Decimal('0.0'), multivalue=False, option_group=u'LOC Record', precision=2, required=False)
option: Decimal('loc_part_v_precision', attribute=False, autofill=False, cli_name='loc_v_precision', maxvalue=Decimal('90000000.00'), minvalue=Decimal('0.0'), multivalue=False, option_group=u'LOC Record', precision=2, required=False)
option: LOCRecord('locrecord', attribute=True, autofill=False, cli_name='loc_rec', csv=True, multivalue=True, option_group=u'LOC Record', required=False)
option: Str('mx_part_exchanger', attribute=False, autofill=False, cli_name='mx_exchanger', multivalue=False, option_group=u'MX Record', required=False)
option: DNSNameParam('mx_part_exchanger', attribute=False, autofill=False, cli_name='mx_exchanger', multivalue=False, option_group=u'MX Record', required=False)
option: Int('mx_part_preference', attribute=False, autofill=False, cli_name='mx_preference', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'MX Record', required=False)
option: MXRecord('mxrecord', attribute=True, autofill=False, cli_name='mx_rec', csv=True, multivalue=True, option_group=u'MX Record', required=False)
option: Str('naptr_part_flags', attribute=False, autofill=False, cli_name='naptr_flags', multivalue=False, option_group=u'NAPTR Record', required=False)
@ -1003,17 +1003,17 @@ option: Str('naptr_part_regexp', attribute=False, autofill=False, cli_name='napt
option: Str('naptr_part_replacement', attribute=False, autofill=False, cli_name='naptr_replacement', multivalue=False, option_group=u'NAPTR Record', required=False)
option: Str('naptr_part_service', attribute=False, autofill=False, cli_name='naptr_service', multivalue=False, option_group=u'NAPTR Record', required=False)
option: NAPTRRecord('naptrrecord', attribute=True, autofill=False, cli_name='naptr_rec', csv=True, multivalue=True, option_group=u'NAPTR Record', required=False)
option: Str('ns_part_hostname', attribute=False, autofill=False, cli_name='ns_hostname', multivalue=False, option_group=u'NS Record', required=False)
option: DNSNameParam('ns_part_hostname', attribute=False, autofill=False, cli_name='ns_hostname', multivalue=False, option_group=u'NS Record', required=False)
option: NSEC3PARAMRecord('nsec3paramrecord', attribute=True, autofill=False, cli_name='nsec3param_rec', csv=True, multivalue=True, option_group=u'NSEC3PARAM Record', required=False)
option: NSEC3Record('nsec3record', attribute=True, autofill=False, cli_name='nsec3_rec', csv=True, multivalue=True, option_group=u'NSEC3 Record', required=False)
option: Str('nsec_part_next', attribute=False, autofill=False, cli_name='nsec_next', multivalue=False, option_group=u'NSEC Record', required=False)
option: DNSNameParam('nsec_part_next', attribute=False, autofill=False, cli_name='nsec_next', multivalue=False, option_group=u'NSEC Record', required=False)
option: StrEnum('nsec_part_types', attribute=False, autofill=False, cli_name='nsec_types', csv=True, multivalue=True, option_group=u'NSEC Record', required=False, values=(u'SOA', u'A', u'AAAA', u'A6', u'AFSDB', u'APL', u'CERT', u'CNAME', u'DHCID', u'DLV', u'DNAME', u'DNSKEY', u'DS', u'HIP', u'IPSECKEY', u'KEY', u'KX', u'LOC', u'MX', u'NAPTR', u'NS', u'NSEC', u'NSEC3', u'NSEC3PARAM', u'PTR', u'RRSIG', u'RP', u'SIG', u'SPF', u'SRV', u'SSHFP', u'TA', u'TKEY', u'TSIG', u'TXT'))
option: NSECRecord('nsecrecord', attribute=True, autofill=False, cli_name='nsec_rec', csv=True, multivalue=True, option_group=u'NSEC Record', required=False)
option: NSRecord('nsrecord', attribute=True, autofill=False, cli_name='ns_rec', csv=True, multivalue=True, option_group=u'NS Record', required=False)
option: Str('ptr_part_hostname', attribute=False, autofill=False, cli_name='ptr_hostname', multivalue=False, option_group=u'PTR Record', required=False)
option: DNSNameParam('ptr_part_hostname', attribute=False, autofill=False, cli_name='ptr_hostname', multivalue=False, only_absolute=True, option_group=u'PTR Record', required=False)
option: PTRRecord('ptrrecord', attribute=True, autofill=False, cli_name='ptr_rec', csv=True, multivalue=True, option_group=u'PTR Record', required=False)
option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui')
option: Str('rename', cli_name='rename', multivalue=False, primary_key=True, required=False)
option: DNSNameParam('rename', cli_name='rename', multivalue=False, primary_key=True, required=False)
option: Flag('rights', autofill=True, default=False)
option: RPRecord('rprecord', attribute=True, autofill=False, cli_name='rp_rec', csv=True, multivalue=True, option_group=u'RP Record', required=False)
option: Int('rrsig_part_algorithm', attribute=False, autofill=False, cli_name='rrsig_algorithm', maxvalue=255, minvalue=0, multivalue=False, option_group=u'RRSIG Record', required=False)
@ -1040,7 +1040,7 @@ option: SIGRecord('sigrecord', attribute=True, autofill=False, cli_name='sig_rec
option: SPFRecord('spfrecord', attribute=True, autofill=False, cli_name='spf_rec', csv=True, multivalue=True, option_group=u'SPF Record', required=False)
option: Int('srv_part_port', attribute=False, autofill=False, cli_name='srv_port', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'SRV Record', required=False)
option: Int('srv_part_priority', attribute=False, autofill=False, cli_name='srv_priority', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'SRV Record', required=False)
option: Str('srv_part_target', attribute=False, autofill=False, cli_name='srv_target', multivalue=False, option_group=u'SRV Record', required=False)
option: DNSNameParam('srv_part_target', attribute=False, autofill=False, cli_name='srv_target', multivalue=False, option_group=u'SRV Record', required=False)
option: Int('srv_part_weight', attribute=False, autofill=False, cli_name='srv_weight', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'SRV Record', required=False)
option: SRVRecord('srvrecord', attribute=True, autofill=False, cli_name='srv_rec', csv=True, multivalue=True, option_group=u'SRV Record', required=False)
option: Int('sshfp_part_algorithm', attribute=False, autofill=False, cli_name='sshfp_algorithm', maxvalue=255, minvalue=0, multivalue=False, option_group=u'SSHFP Record', required=False)
@ -1059,8 +1059,8 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: PrimaryKey('value', None, None)
command: dnsrecord_show
args: 2,5,3
arg: Str('dnszoneidnsname', cli_name='dnszone', multivalue=False, primary_key=True, query=True, required=True)
arg: Str('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True)
arg: DNSNameParam('dnszoneidnsname', cli_name='dnszone', multivalue=False, only_absolute=True, primary_key=True, query=True, required=True)
arg: DNSNameParam('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True)
option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui')
option: Flag('rights', autofill=True, default=False)
@ -1071,7 +1071,7 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: PrimaryKey('value', None, None)
command: dnszone_add
args: 1,25,3
arg: Str('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True)
arg: DNSNameParam('idnsname', attribute=True, cli_name='name', multivalue=False, only_absolute=True, primary_key=True, required=True)
option: Str('addattr*', cli_name='addattr', exclude='webui')
option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
option: StrEnum('dnsclass', attribute=True, cli_name='class', multivalue=False, required=False, values=(u'IN', u'CS', u'CH', u'HS'))
@ -1086,10 +1086,10 @@ option: StrEnum('idnsforwardpolicy', attribute=True, cli_name='forward_policy',
option: Bool('idnssecinlinesigning', attribute=True, cli_name='dnssec', default=False, multivalue=False, required=False)
option: Int('idnssoaexpire', attribute=True, autofill=True, cli_name='expire', default=1209600, maxvalue=2147483647, minvalue=0, multivalue=False, required=True)
option: Int('idnssoaminimum', attribute=True, autofill=True, cli_name='minimum', default=3600, maxvalue=2147483647, minvalue=0, multivalue=False, required=True)
option: Str('idnssoamname', attribute=True, cli_name='name_server', multivalue=False, required=True)
option: DNSNameParam('idnssoamname', attribute=True, cli_name='name_server', multivalue=False, required=True)
option: Int('idnssoarefresh', attribute=True, autofill=True, cli_name='refresh', default=3600, maxvalue=2147483647, minvalue=0, multivalue=False, required=True)
option: Int('idnssoaretry', attribute=True, autofill=True, cli_name='retry', default=900, maxvalue=2147483647, minvalue=0, multivalue=False, required=True)
option: Str('idnssoarname', attribute=True, cli_name='admin_email', multivalue=False, required=True)
option: DNSNameParam('idnssoarname', attribute=True, cli_name='admin_email', multivalue=False, only_absolute=True, required=True)
option: Int('idnssoaserial', attribute=True, autofill=True, cli_name='serial', maxvalue=4294967295L, minvalue=1, multivalue=False, required=True)
option: Str('idnsupdatepolicy', attribute=True, autofill=True, cli_name='update_policy', multivalue=False, required=False)
option: Str('ip_address?')
@ -1102,14 +1102,14 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: PrimaryKey('value', None, None)
command: dnszone_add_permission
args: 1,1,3
arg: Str('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True)
arg: DNSNameParam('idnsname', attribute=True, cli_name='name', multivalue=False, only_absolute=True, primary_key=True, query=True, required=True)
option: Str('version?', exclude='webui')
output: Output('result', <type 'bool'>, None)
output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: Output('value', <type 'unicode'>, None)
command: dnszone_del
args: 1,2,3
arg: Str('idnsname', attribute=True, cli_name='name', multivalue=True, primary_key=True, query=True, required=True)
arg: DNSNameParam('idnsname', attribute=True, cli_name='name', multivalue=True, only_absolute=True, primary_key=True, query=True, required=True)
option: Flag('continue', autofill=True, cli_name='continue', default=False)
option: Str('version?', exclude='webui')
output: Output('result', <type 'dict'>, None)
@ -1117,14 +1117,14 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: ListOfPrimaryKeys('value', None, None)
command: dnszone_disable
args: 1,1,3
arg: Str('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True)
arg: DNSNameParam('idnsname', attribute=True, cli_name='name', multivalue=False, only_absolute=True, primary_key=True, query=True, required=True)
option: Str('version?', exclude='webui')
output: Output('result', <type 'bool'>, None)
output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: PrimaryKey('value', None, None)
command: dnszone_enable
args: 1,1,3
arg: Str('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True)
arg: DNSNameParam('idnsname', attribute=True, cli_name='name', multivalue=False, only_absolute=True, primary_key=True, query=True, required=True)
option: Str('version?', exclude='webui')
output: Output('result', <type 'bool'>, None)
output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
@ -1142,14 +1142,14 @@ option: Bool('idnsallowsyncptr', attribute=True, autofill=False, cli_name='allow
option: Str('idnsallowtransfer', attribute=True, autofill=False, cli_name='allow_transfer', default=u'none;', multivalue=False, query=True, required=False)
option: Str('idnsforwarders', attribute=True, autofill=False, cli_name='forwarder', csv=True, multivalue=True, query=True, required=False)
option: StrEnum('idnsforwardpolicy', attribute=True, autofill=False, cli_name='forward_policy', multivalue=False, query=True, required=False, values=(u'only', u'first', u'none'))
option: Str('idnsname', attribute=True, autofill=False, cli_name='name', multivalue=False, primary_key=True, query=True, required=False)
option: DNSNameParam('idnsname', attribute=True, autofill=False, cli_name='name', multivalue=False, only_absolute=True, primary_key=True, query=True, required=False)
option: Bool('idnssecinlinesigning', attribute=True, autofill=False, cli_name='dnssec', default=False, multivalue=False, query=True, required=False)
option: Int('idnssoaexpire', attribute=True, autofill=False, cli_name='expire', default=1209600, maxvalue=2147483647, minvalue=0, multivalue=False, query=True, required=False)
option: Int('idnssoaminimum', attribute=True, autofill=False, cli_name='minimum', default=3600, maxvalue=2147483647, minvalue=0, multivalue=False, query=True, required=False)
option: Str('idnssoamname', attribute=True, autofill=False, cli_name='name_server', multivalue=False, query=True, required=False)
option: DNSNameParam('idnssoamname', attribute=True, autofill=False, cli_name='name_server', multivalue=False, query=True, required=False)
option: Int('idnssoarefresh', attribute=True, autofill=False, cli_name='refresh', default=3600, maxvalue=2147483647, minvalue=0, multivalue=False, query=True, required=False)
option: Int('idnssoaretry', attribute=True, autofill=False, cli_name='retry', default=900, maxvalue=2147483647, minvalue=0, multivalue=False, query=True, required=False)
option: Str('idnssoarname', attribute=True, autofill=False, cli_name='admin_email', multivalue=False, query=True, required=False)
option: DNSNameParam('idnssoarname', attribute=True, autofill=False, cli_name='admin_email', multivalue=False, only_absolute=True, query=True, required=False)
option: Int('idnssoaserial', attribute=True, autofill=False, cli_name='serial', maxvalue=4294967295L, minvalue=1, multivalue=False, query=True, required=False)
option: Str('idnsupdatepolicy', attribute=True, autofill=False, cli_name='update_policy', multivalue=False, query=True, required=False)
option: Bool('idnszoneactive', attribute=True, autofill=False, cli_name='zone_active', multivalue=False, query=True, required=False)
@ -1165,7 +1165,7 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: Output('truncated', <type 'bool'>, None)
command: dnszone_mod
args: 1,26,3
arg: Str('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True)
arg: DNSNameParam('idnsname', attribute=True, cli_name='name', multivalue=False, only_absolute=True, primary_key=True, query=True, required=True)
option: Str('addattr*', cli_name='addattr', exclude='webui')
option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
option: Str('delattr*', cli_name='delattr', exclude='webui')
@ -1181,10 +1181,10 @@ option: StrEnum('idnsforwardpolicy', attribute=True, autofill=False, cli_name='f
option: Bool('idnssecinlinesigning', attribute=True, autofill=False, cli_name='dnssec', default=False, multivalue=False, required=False)
option: Int('idnssoaexpire', attribute=True, autofill=False, cli_name='expire', default=1209600, maxvalue=2147483647, minvalue=0, multivalue=False, required=False)
option: Int('idnssoaminimum', attribute=True, autofill=False, cli_name='minimum', default=3600, maxvalue=2147483647, minvalue=0, multivalue=False, required=False)
option: Str('idnssoamname', attribute=True, autofill=False, cli_name='name_server', multivalue=False, required=False)
option: DNSNameParam('idnssoamname', attribute=True, autofill=False, cli_name='name_server', multivalue=False, required=False)
option: Int('idnssoarefresh', attribute=True, autofill=False, cli_name='refresh', default=3600, maxvalue=2147483647, minvalue=0, multivalue=False, required=False)
option: Int('idnssoaretry', attribute=True, autofill=False, cli_name='retry', default=900, maxvalue=2147483647, minvalue=0, multivalue=False, required=False)
option: Str('idnssoarname', attribute=True, autofill=False, cli_name='admin_email', multivalue=False, required=False)
option: DNSNameParam('idnssoarname', attribute=True, autofill=False, cli_name='admin_email', multivalue=False, only_absolute=True, required=False)
option: Int('idnssoaserial', attribute=True, autofill=False, cli_name='serial', maxvalue=4294967295L, minvalue=1, multivalue=False, required=False)
option: Str('idnsupdatepolicy', attribute=True, autofill=False, cli_name='update_policy', multivalue=False, required=False)
option: Str('name_from_ip', attribute=False, autofill=False, cli_name='name_from_ip', multivalue=False, required=False)
@ -1197,14 +1197,14 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: PrimaryKey('value', None, None)
command: dnszone_remove_permission
args: 1,1,3
arg: Str('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True)
arg: DNSNameParam('idnsname', attribute=True, cli_name='name', multivalue=False, only_absolute=True, primary_key=True, query=True, required=True)
option: Str('version?', exclude='webui')
output: Output('result', <type 'bool'>, None)
output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: Output('value', <type 'unicode'>, None)
command: dnszone_show
args: 1,4,3
arg: Str('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True)
arg: DNSNameParam('idnsname', attribute=True, cli_name='name', multivalue=False, only_absolute=True, primary_key=True, query=True, required=True)
option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui')
option: Flag('rights', autofill=True, default=False)

View File

@ -31,7 +31,7 @@ from ipalib.request import context
from ipalib import api, errors, output
from ipalib import Command
from ipalib.parameters import (Flag, Bool, Int, Decimal, Str, StrEnum, Any,
DeprecatedParam)
DeprecatedParam, DNSNameParam)
from ipalib.plugins.baseldap import *
from ipalib import _, ngettext
from ipalib.util import (validate_zonemgr, normalize_zonemgr,
@ -907,8 +907,7 @@ class AFSDBRecord(DNSRecord):
minvalue=0,
maxvalue=65535,
),
Str('hostname',
_bind_hostname_validator,
DNSNameParam('hostname',
label=_('Hostname'),
),
)
@ -946,8 +945,7 @@ class CNAMERecord(DNSRecord):
rrtype = 'CNAME'
rfc = 1035
parts = (
Str('hostname',
_bind_cname_hostname_validator,
DNSNameParam('hostname',
label=_('Hostname'),
doc=_('A hostname which this alias hostname points to'),
),
@ -967,8 +965,7 @@ class DNAMERecord(DNSRecord):
rrtype = 'DNAME'
rfc = 2672
parts = (
Str('target',
_bind_cname_hostname_validator,
DNSNameParam('target',
label=_('Target'),
),
)
@ -1046,8 +1043,7 @@ class KXRecord(DNSRecord):
minvalue=0,
maxvalue=65535,
),
Str('exchanger',
_bind_hostname_validator,
DNSNameParam('exchanger',
label=_('Exchanger'),
doc=_('A host willing to act as a key exchanger'),
),
@ -1192,8 +1188,7 @@ class MXRecord(DNSRecord):
minvalue=0,
maxvalue=65535,
),
Str('exchanger',
_bind_hostname_validator,
DNSNameParam('exchanger',
label=_('Exchanger'),
doc=_('A host willing to act as a mail exchanger'),
),
@ -1204,8 +1199,7 @@ class NSRecord(DNSRecord):
rfc = 1035
parts = (
Str('hostname',
_bind_hostname_validator,
DNSNameParam('hostname',
label=_('Hostname'),
),
)
@ -1218,8 +1212,7 @@ class NSECRecord(DNSRecord):
_allowed_types = (u'SOA',) + _record_types
parts = (
Str('next',
_bind_hostname_validator,
DNSNameParam('next',
label=_('Next Domain Name'),
),
StrEnum('types+',
@ -1300,9 +1293,9 @@ class PTRRecord(DNSRecord):
rrtype = 'PTR'
rfc = 1035
parts = (
Str('hostname',
DNSNameParam('hostname',
_hostname_validator,
normalizer=_normalize_hostname,
only_absolute=True,
label=_('Hostname'),
doc=_('The hostname this reverse record points to'),
),
@ -1332,8 +1325,7 @@ class SRVRecord(DNSRecord):
minvalue=0,
maxvalue=65535,
),
Str('target',
_srv_target_validator,
DNSNameParam('target',
label=_('Target'),
doc=_('The domain name of the target host or \'.\' if the service is decidedly not available at this domain'),
),
@ -1564,13 +1556,12 @@ class dnszone(LDAPObject):
label_singular = _('DNS Zone')
takes_params = (
Str('idnsname',
_domain_name_validator,
DNSNameParam('idnsname',
only_absolute=True,
cli_name='name',
label=_('Zone name'),
doc=_('Zone name (FQDN)'),
default_from=lambda name_from_ip: _reverse_zone_name(name_from_ip),
normalizer=lambda value: value.lower(),
primary_key=True,
),
Str('name_from_ip?', _validate_ipnet,
@ -1578,18 +1569,19 @@ class dnszone(LDAPObject):
doc=_('IP network to create reverse zone name from'),
flags=('virtual_attribute',),
),
Str('idnssoamname',
DNSNameParam('idnssoamname',
cli_name='name_server',
label=_('Authoritative nameserver'),
doc=_('Authoritative nameserver domain name'),
normalizer=lambda value: value.lower(),
),
Str('idnssoarname',
DNSNameParam('idnssoarname',
_rname_validator,
only_absolute=True,
cli_name='admin_email',
label=_('Administrator e-mail address'),
doc=_('Administrator e-mail address'),
default_from=lambda idnsname: 'hostmaster.%s' % idnsname,
default_from=lambda idnsname:
DNSName(('hostmaster')).derelativize(idnsname),
normalizer=normalize_zonemgr,
),
Int('idnssoaserial',
@ -2123,8 +2115,7 @@ class dnsrecord(LDAPObject):
label_singular = _('DNS Resource Record')
takes_params = (
Str('idnsname',
_dns_record_name_validator,
DNSNameParam('idnsname',
cli_name='name',
label=_('Record name'),
doc=_('Record name'),