mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 15:40:01 -06:00
dns: fix dns_update_system_records to work with thin client
https://fedorahosted.org/freeipa/ticket/2008 https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
parent
0787af8d5a
commit
894be1bd50
6
API.txt
6
API.txt
@ -1092,10 +1092,12 @@ output: Output('result', type=[<type 'bool'>])
|
||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||
output: Output('value', type=[<type 'unicode'>])
|
||||
command: dns_update_system_records
|
||||
args: 0,2,2
|
||||
args: 0,4,2
|
||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||
option: Flag('dry_run', autofill=True, default=False)
|
||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
||||
option: Str('version?')
|
||||
output: Output('result', type=[<type 'dict'>])
|
||||
output: Entry('result')
|
||||
output: Output('value', type=[<type 'bool'>])
|
||||
command: dnsconfig_mod
|
||||
args: 0,11,3
|
||||
|
4
VERSION
4
VERSION
@ -90,5 +90,5 @@ IPA_DATA_VERSION=20100614120000
|
||||
# #
|
||||
########################################################
|
||||
IPA_API_VERSION_MAJOR=2
|
||||
IPA_API_VERSION_MINOR=197
|
||||
# Last change: pspacek - DNS: Support default TTL setting for master DNS zones
|
||||
IPA_API_VERSION_MINOR=198
|
||||
# Last change: dns: fix dns_update_system_records to work with thin client
|
||||
|
@ -23,7 +23,7 @@ from __future__ import print_function
|
||||
import six
|
||||
import copy
|
||||
|
||||
from ipaclient.frontend import MethodOverride, CommandOverride
|
||||
from ipaclient.frontend import MethodOverride
|
||||
from ipalib import errors
|
||||
from ipalib.dns import (get_part_rrtype,
|
||||
get_record_rrtype,
|
||||
@ -347,7 +347,7 @@ class dnsforwardzone_mod(MethodOverride):
|
||||
|
||||
|
||||
@register(override=True)
|
||||
class dns_update_system_records(CommandOverride):
|
||||
class dns_update_system_records(MethodOverride):
|
||||
def output_for_cli(self, textui, output, *args, **options):
|
||||
output_super = copy.deepcopy(output)
|
||||
super_res = output_super.get('result', {})
|
||||
|
@ -41,6 +41,7 @@ from ipalib.dns import (extra_name_format,
|
||||
iterate_rrparams_by_parts,
|
||||
part_name_format,
|
||||
record_name_format)
|
||||
from ipalib.frontend import Method, Object
|
||||
from ipalib.request import context
|
||||
from ipalib import api, errors, output
|
||||
from ipalib import Command
|
||||
@ -4428,11 +4429,8 @@ class dnsforwardzone_remove_permission(DNSZoneBase_remove_permission):
|
||||
|
||||
|
||||
@register()
|
||||
class dns_update_system_records(Command):
|
||||
__doc__ = _('Update location and IPA server DNS records')
|
||||
|
||||
|
||||
has_output_params = (
|
||||
class dns_system_records(Object):
|
||||
takes_params = (
|
||||
Str(
|
||||
'ipa_records*',
|
||||
label=_('IPA DNS records')
|
||||
@ -4443,11 +4441,17 @@ class dns_update_system_records(Command):
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@register()
|
||||
class dns_update_system_records(Method):
|
||||
__doc__ = _('Update location and IPA server DNS records')
|
||||
|
||||
obj_name = 'dns_system_records'
|
||||
attr_name = 'update'
|
||||
|
||||
has_output = (
|
||||
output.Output(
|
||||
output.Entry(
|
||||
'result',
|
||||
type=dict,
|
||||
doc=_('Dictionary mapping variable name to value'),
|
||||
),
|
||||
output.Output(
|
||||
'value', bool,
|
||||
|
Loading…
Reference in New Issue
Block a user