Modified has_output attributes

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-10 12:26:02 +02:00 committed by Martin Kosek
parent d0ce6472f7
commit e70f88c696
2 changed files with 10 additions and 4 deletions

View File

@ -1106,7 +1106,7 @@ arg: Str('idnsname', attribute=True, cli_name='name', multivalue=False, primary_
option: Str('version?', exclude='webui')
output: Output('result', <type 'bool'>, None)
output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: PrimaryKey('value', None, 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)
@ -1201,7 +1201,7 @@ arg: Str('idnsname', attribute=True, cli_name='name', multivalue=False, primary_
option: Str('version?', exclude='webui')
output: Output('result', <type 'bool'>, None)
output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: PrimaryKey('value', None, 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)

View File

@ -255,6 +255,12 @@ _IN = dns.rdataclass.IN
# NS record type
_NS = dns.rdatatype.from_text('NS')
_output_permissions = (
output.summary,
output.Output('result', bool, _('True means the operation was successful')),
output.Output('value', unicode, _('Permission value')),
)
def _rname_validator(ugettext, zonemgr):
try:
validate_zonemgr(zonemgr)
@ -2049,7 +2055,7 @@ api.register(dnszone_enable)
class dnszone_add_permission(LDAPQuery):
__doc__ = _('Add a permission for per-zone access delegation.')
has_output = output.standard_value
has_output = _output_permissions
msg_summary = _('Added system permission "%(value)s"')
def execute(self, *keys, **options):
@ -2087,7 +2093,7 @@ api.register(dnszone_add_permission)
class dnszone_remove_permission(LDAPQuery):
__doc__ = _('Remove a permission for per-zone access delegation.')
has_output = output.standard_value
has_output = _output_permissions
msg_summary = _('Removed system permission "%(value)s"')
def execute(self, *keys, **options):