From 4314d02fbf9ef1cb9543ecf76a8d22e79d250214 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Thu, 27 Mar 2014 14:04:00 +0100 Subject: Allow primary keys to use different type than unicode. Also return list of primary keys instead of a single unicode CSV value from LDAPDelete-based commands. This introduces a new capability 'primary_key_types' for backward compatibility with old clients. Reviewed-By: Tomas Babej --- API.txt | 337 +++++++++++---------- VERSION | 4 +- ipalib/capabilities.py | 3 + ipalib/cli.py | 3 +- ipalib/frontend.py | 15 +- ipalib/output.py | 52 +++- ipalib/plugins/aci.py | 12 +- ipalib/plugins/automember.py | 20 +- ipalib/plugins/automount.py | 8 +- ipalib/plugins/baseldap.py | 69 +++-- ipalib/plugins/delegation.py | 10 +- ipalib/plugins/dns.py | 13 +- ipalib/plugins/group.py | 2 +- ipalib/plugins/hbacrule.py | 4 +- ipalib/plugins/host.py | 2 +- ipalib/plugins/krbtpolicy.py | 4 +- ipalib/plugins/selfservice.py | 10 +- ipalib/plugins/selinuxusermap.py | 4 +- ipalib/plugins/service.py | 2 +- ipalib/plugins/sudorule.py | 4 +- ipalib/plugins/trust.py | 30 +- ipalib/plugins/user.py | 6 +- ipatests/test_ipalib/test_output.py | 7 +- ipatests/test_xmlrpc/test_automember_plugin.py | 44 +-- ipatests/test_xmlrpc/test_automount_plugin.py | 20 +- ipatests/test_xmlrpc/test_batch_plugin.py | 4 +- ipatests/test_xmlrpc/test_config_plugin.py | 10 +- ipatests/test_xmlrpc/test_dns_plugin.py | 24 +- .../test_dns_realmdomains_integration.py | 6 +- ipatests/test_xmlrpc/test_group_plugin.py | 24 +- ipatests/test_xmlrpc/test_hbacsvcgroup_plugin.py | 8 +- ipatests/test_xmlrpc/test_host_plugin.py | 12 +- ipatests/test_xmlrpc/test_hostgroup_plugin.py | 12 +- ipatests/test_xmlrpc/test_krbtpolicy.py | 6 +- ipatests/test_xmlrpc/test_netgroup_plugin.py | 8 +- ipatests/test_xmlrpc/test_permission_plugin.py | 28 +- ipatests/test_xmlrpc/test_privilege_plugin.py | 4 +- ipatests/test_xmlrpc/test_radiusproxy_plugin.py | 4 +- ipatests/test_xmlrpc/test_range_plugin.py | 24 +- ipatests/test_xmlrpc/test_realmdomains_plugin.py | 14 +- ipatests/test_xmlrpc/test_role_plugin.py | 12 +- ipatests/test_xmlrpc/test_selinuxusermap_plugin.py | 24 +- ipatests/test_xmlrpc/test_service_plugin.py | 4 +- ipatests/test_xmlrpc/test_sudocmd_plugin.py | 4 +- ipatests/test_xmlrpc/test_sudocmdgroup_plugin.py | 12 +- ipatests/test_xmlrpc/test_user_plugin.py | 56 ++-- 46 files changed, 538 insertions(+), 447 deletions(-) diff --git a/API.txt b/API.txt index a0285d494..c2654b144 100644 --- a/API.txt +++ b/API.txt @@ -18,7 +18,7 @@ option: StrEnum('type', attribute=False, cli_name='type', multivalue=False, requ option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: aci_del args: 1,2,3 arg: Str('aciname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -26,7 +26,7 @@ option: StrEnum('aciprefix', cli_name='prefix', values=(u'permission', u'delegat option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: aci_find args: 1,16,4 arg: Str('criteria?', noextrawhitespace=False) @@ -69,7 +69,7 @@ option: StrEnum('type', attribute=False, autofill=False, cli_name='type', multiv option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: aci_rename args: 1,15,3 arg: Str('aciname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -90,7 +90,7 @@ option: StrEnum('type', attribute=False, autofill=False, cli_name='type', multiv option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: aci_show args: 1,5,3 arg: Str('aciname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -101,7 +101,7 @@ option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: adtrust_is_enabled args: 0,1,1 option: Str('version?', exclude='webui') @@ -118,7 +118,7 @@ option: StrEnum('type', values=(u'group', u'hostgroup')) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automember_add_condition args: 1,8,5 arg: Str('cn', cli_name='automember_rule') @@ -134,7 +134,7 @@ output: Output('completed', , None) output: Output('failed', , None) output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automember_default_group_remove args: 0,5,3 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') @@ -144,7 +144,7 @@ option: StrEnum('type', values=(u'group', u'hostgroup')) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automember_default_group_set args: 0,6,3 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') @@ -155,7 +155,7 @@ option: StrEnum('type', values=(u'group', u'hostgroup')) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automember_default_group_show args: 0,4,3 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') @@ -164,7 +164,7 @@ option: StrEnum('type', values=(u'group', u'hostgroup')) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automember_del args: 1,2,3 arg: Str('cn', cli_name='automember_rule') @@ -172,7 +172,7 @@ option: StrEnum('type', values=(u'group', u'hostgroup')) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: automember_find args: 1,5,4 arg: Str('criteria?', noextrawhitespace=False) @@ -199,7 +199,7 @@ option: StrEnum('type', values=(u'group', u'hostgroup')) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automember_rebuild args: 0,7,3 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') @@ -211,7 +211,7 @@ option: Str('users*') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automember_remove_condition args: 1,8,5 arg: Str('cn', cli_name='automember_rule') @@ -227,7 +227,7 @@ output: Output('completed', , None) output: Output('failed', , None) output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automember_show args: 1,4,3 arg: Str('cn', cli_name='automember_rule') @@ -237,7 +237,7 @@ option: StrEnum('type', values=(u'group', u'hostgroup')) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automountkey_add args: 2,7,3 arg: Str('automountlocationcn', cli_name='automountlocation', query=True, required=True) @@ -251,7 +251,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automountkey_del args: 2,4,3 arg: Str('automountlocationcn', cli_name='automountlocation', query=True, required=True) @@ -262,7 +262,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False, excl option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: automountkey_find args: 3,7,4 arg: Str('automountlocationcn', cli_name='automountlocation', query=True, required=True) @@ -296,7 +296,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automountkey_show args: 2,6,3 arg: Str('automountlocationcn', cli_name='automountlocation', query=True, required=True) @@ -309,7 +309,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automountlocation_add args: 1,5,3 arg: Str('cn', attribute=True, cli_name='location', multivalue=False, primary_key=True, required=True) @@ -320,7 +320,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automountlocation_del args: 1,2,3 arg: Str('cn', attribute=True, cli_name='location', multivalue=True, primary_key=True, query=True, required=True) @@ -328,7 +328,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: automountlocation_find args: 1,7,4 arg: Str('criteria?', noextrawhitespace=False) @@ -359,7 +359,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automountlocation_tofiles args: 1,1,1 arg: Str('cn', attribute=True, cli_name='location', multivalue=False, primary_key=True, query=True, required=True) @@ -377,7 +377,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automountmap_add_indirect args: 2,8,3 arg: Str('automountlocationcn', cli_name='automountlocation', query=True, required=True) @@ -392,7 +392,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automountmap_del args: 2,2,3 arg: Str('automountlocationcn', cli_name='automountlocation', query=True, required=True) @@ -401,7 +401,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: automountmap_find args: 2,8,4 arg: Str('automountlocationcn', cli_name='automountlocation', query=True, required=True) @@ -432,7 +432,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: automountmap_show args: 2,4,3 arg: Str('automountlocationcn', cli_name='automountlocation', query=True, required=True) @@ -443,7 +443,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: batch args: 1,1,2 arg: Any('methods*') @@ -536,7 +536,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: config_show args: 0,4,3 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') @@ -545,7 +545,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: cosentry_add args: 1,7,3 arg: Str('cn', attribute=True, cli_name='cn', multivalue=False, primary_key=True, required=True) @@ -558,7 +558,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: cosentry_del args: 1,2,3 arg: Str('cn', attribute=True, cli_name='cn', multivalue=True, primary_key=True, query=True, required=True) @@ -566,7 +566,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: cosentry_find args: 1,9,4 arg: Str('criteria?', noextrawhitespace=False) @@ -597,7 +597,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: cosentry_show args: 1,4,3 arg: Str('cn', attribute=True, cli_name='cn', multivalue=False, primary_key=True, query=True, required=True) @@ -607,7 +607,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: delegation_add args: 1,7,3 arg: Str('aciname', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True) @@ -620,14 +620,14 @@ option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: delegation_del args: 1,1,3 arg: Str('aciname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: delegation_find args: 1,9,4 arg: Str('criteria?', noextrawhitespace=False) @@ -656,7 +656,7 @@ option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: delegation_show args: 1,3,3 arg: Str('aciname', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -665,20 +665,20 @@ option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: dns_is_enabled args: 0,1,3 option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: dns_resolve args: 1,1,3 arg: Str('hostname') option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: dnsconfig_mod args: 0,11,3 option: Str('addattr*', cli_name='addattr', exclude='webui') @@ -694,7 +694,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: dnsconfig_show args: 0,4,3 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') @@ -703,7 +703,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: dnsrecord_add args: 2,116,3 arg: Str('dnszoneidnsname', cli_name='dnszone', query=True, required=True) @@ -826,7 +826,7 @@ option: TXTRecord('txtrecord', attribute=True, cli_name='txt_rec', csv=True, mul option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: dnsrecord_del args: 2,39,3 arg: Str('dnszoneidnsname', cli_name='dnszone', query=True, required=True) @@ -872,7 +872,7 @@ option: TXTRecord('txtrecord', attribute=True, autofill=False, cli_name='txt_rec option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: dnsrecord_delentry args: 2,2,3 arg: Str('dnszoneidnsname', cli_name='dnszone', query=True, required=True) @@ -881,7 +881,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: dnsrecord_find args: 2,44,4 arg: Str('dnszoneidnsname', cli_name='dnszone', query=True, required=True) @@ -1056,7 +1056,7 @@ option: TXTRecord('txtrecord', attribute=True, autofill=False, cli_name='txt_rec option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: dnsrecord_show args: 2,5,3 arg: Str('dnszoneidnsname', cli_name='dnszone', query=True, required=True) @@ -1068,7 +1068,7 @@ option: Flag('structured', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: dnszone_add args: 1,24,3 arg: Str('idnsname', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True) @@ -1098,14 +1098,14 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , 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) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, 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) @@ -1113,21 +1113,21 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , 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) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , 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) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: dnszone_find args: 1,26,4 arg: Str('criteria?', noextrawhitespace=False) @@ -1191,14 +1191,14 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , 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) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, 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) @@ -1208,7 +1208,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: env args: 1,3,4 arg: Str('variables*') @@ -1234,7 +1234,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: group_add_member args: 1,7,3 arg: Str('cn', attribute=True, cli_name='group_name', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$', primary_key=True, query=True, required=True) @@ -1255,14 +1255,14 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: group_detach args: 1,1,3 arg: Str('cn', attribute=True, cli_name='group_name', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$', primary_key=True, query=True, required=True) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: group_find args: 1,28,4 arg: Str('criteria?', noextrawhitespace=False) @@ -1316,7 +1316,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: group_remove_member args: 1,7,3 arg: Str('cn', attribute=True, cli_name='group_name', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$', primary_key=True, query=True, required=True) @@ -1340,7 +1340,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hbacrule_add args: 1,16,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True) @@ -1362,7 +1362,7 @@ option: StrEnum('usercategory', attribute=True, cli_name='usercat', multivalue=F option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hbacrule_add_host args: 1,6,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -1418,21 +1418,21 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: hbacrule_disable args: 1,1,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hbacrule_enable args: 1,1,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hbacrule_find args: 1,18,4 arg: Str('criteria?', noextrawhitespace=False) @@ -1481,7 +1481,7 @@ option: StrEnum('usercategory', attribute=True, autofill=False, cli_name='userca option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hbacrule_remove_host args: 1,6,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -1540,7 +1540,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hbacsvc_add args: 1,7,3 arg: Str('cn', attribute=True, cli_name='service', multivalue=False, primary_key=True, required=True) @@ -1553,7 +1553,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hbacsvc_del args: 1,2,3 arg: Str('cn', attribute=True, cli_name='service', multivalue=True, primary_key=True, query=True, required=True) @@ -1561,7 +1561,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: hbacsvc_find args: 1,9,4 arg: Str('criteria?', noextrawhitespace=False) @@ -1592,7 +1592,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hbacsvc_show args: 1,5,3 arg: Str('cn', attribute=True, cli_name='service', multivalue=False, primary_key=True, query=True, required=True) @@ -1603,7 +1603,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hbacsvcgroup_add args: 1,7,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True) @@ -1616,7 +1616,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hbacsvcgroup_add_member args: 1,5,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -1635,7 +1635,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: hbacsvcgroup_find args: 1,9,4 arg: Str('criteria?', noextrawhitespace=False) @@ -1666,7 +1666,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hbacsvcgroup_remove_member args: 1,5,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -1688,7 +1688,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hbactest args: 0,10,6 option: Flag('disabled?', autofill=True, cli_name='disabled', default=False) @@ -1734,7 +1734,7 @@ option: Str('userpassword', attribute=True, cli_name='password', multivalue=Fals option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: host_add_managedby args: 1,5,3 arg: Str('fqdn', attribute=True, cli_name='hostname', multivalue=False, primary_key=True, query=True, required=True) @@ -1753,14 +1753,14 @@ option: Flag('updatedns?', autofill=True, default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: host_disable args: 1,1,3 arg: Str('fqdn', attribute=True, cli_name='hostname', multivalue=False, primary_key=True, query=True, required=True) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: host_find args: 1,33,4 arg: Str('criteria?', noextrawhitespace=False) @@ -1829,7 +1829,7 @@ option: Str('userpassword', attribute=True, autofill=False, cli_name='password', option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: host_remove_managedby args: 1,5,3 arg: Str('fqdn', attribute=True, cli_name='hostname', multivalue=False, primary_key=True, query=True, required=True) @@ -1852,7 +1852,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hostgroup_add args: 1,7,3 arg: Str('cn', attribute=True, cli_name='hostgroup_name', multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$', primary_key=True, required=True) @@ -1865,7 +1865,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hostgroup_add_member args: 1,6,3 arg: Str('cn', attribute=True, cli_name='hostgroup_name', multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$', primary_key=True, query=True, required=True) @@ -1885,7 +1885,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: hostgroup_find args: 1,21,4 arg: Str('criteria?', noextrawhitespace=False) @@ -1928,7 +1928,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: hostgroup_remove_member args: 1,6,3 arg: Str('cn', attribute=True, cli_name='hostgroup_name', multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$', primary_key=True, query=True, required=True) @@ -1951,7 +1951,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: i18n_messages args: 0,1,1 option: Str('version?', exclude='webui') @@ -1973,7 +1973,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: idrange_del args: 1,2,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=True, primary_key=True, query=True, required=True) @@ -1981,7 +1981,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: idrange_find args: 1,13,4 arg: Str('criteria?', noextrawhitespace=False) @@ -2020,7 +2020,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: idrange_show args: 1,4,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -2030,7 +2030,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: json_metadata args: 2,4,3 arg: Str('objname?') @@ -2056,7 +2056,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: krbtpolicy_reset args: 1,3,3 arg: Str('uid', attribute=True, cli_name='user', multivalue=False, primary_key=True, query=True, required=False) @@ -2065,7 +2065,7 @@ option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: krbtpolicy_show args: 1,4,3 arg: Str('uid', attribute=True, cli_name='user', multivalue=False, primary_key=True, query=True, required=False) @@ -2075,7 +2075,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: migrate_ds args: 2,18,4 arg: Str('ldapuri', cli_name='ldap_uri') @@ -2118,7 +2118,7 @@ option: StrEnum('usercategory', attribute=True, cli_name='usercat', multivalue=F option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: netgroup_add_member args: 1,9,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$', primary_key=True, query=True, required=True) @@ -2141,7 +2141,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: netgroup_find args: 1,28,4 arg: Str('criteria?', noextrawhitespace=False) @@ -2195,7 +2195,7 @@ option: StrEnum('usercategory', attribute=True, autofill=False, cli_name='userca option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: netgroup_remove_member args: 1,9,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$', primary_key=True, query=True, required=True) @@ -2221,7 +2221,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: otptoken_add args: 1,21,3 arg: Str('ipatokenuniqueid', attribute=True, autofill=True, cli_name='id', multivalue=False, primary_key=True, required=False) @@ -2248,7 +2248,7 @@ option: StrEnum('type', attribute=False, autofill=True, cli_name='type', default option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: otptoken_del args: 1,2,3 arg: Str('ipatokenuniqueid', attribute=True, autofill=True, cli_name='id', multivalue=True, primary_key=True, query=True, required=True) @@ -2256,7 +2256,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: otptoken_find args: 1,21,4 arg: Str('criteria?', noextrawhitespace=False) @@ -2306,7 +2306,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: otptoken_show args: 1,4,3 arg: Str('ipatokenuniqueid', attribute=True, autofill=True, cli_name='id', multivalue=False, primary_key=True, query=True, required=True) @@ -2316,7 +2316,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: passwd args: 3,1,3 arg: Str('principal', autofill=True, cli_name='user', primary_key=True) @@ -2325,7 +2325,7 @@ arg: Password('current_password', autofill=True, confirm=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: permission_add args: 1,19,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, pattern='^[-_ a-zA-Z0-9.]+$', primary_key=True, required=True) @@ -2350,7 +2350,7 @@ option: Str('type', alwaysask=True, attribute=False, autofill=False, cli_name='t option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: permission_add_member args: 1,5,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, pattern='^[-_ a-zA-Z0-9.:]+$', primary_key=True, query=True, required=True) @@ -2372,7 +2372,7 @@ option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui option: Str('version', cli_name='version', exclude='webui', multivalue=False, required=False) output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: permission_del args: 1,3,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=True, pattern='^[-_ a-zA-Z0-9.:]+$', primary_key=True, query=True, required=True) @@ -2381,7 +2381,7 @@ option: Flag('force', autofill=True, default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: permission_find args: 1,24,4 arg: Str('criteria?', noextrawhitespace=False) @@ -2442,7 +2442,7 @@ option: Str('type', attribute=False, autofill=False, cli_name='type', multivalue option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: permission_remove_member args: 1,5,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, pattern='^[-_ a-zA-Z0-9.:]+$', primary_key=True, query=True, required=True) @@ -2464,7 +2464,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: ping args: 0,1,1 option: Str('version?', exclude='webui') @@ -2494,7 +2494,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: privilege_add_member args: 1,5,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -2524,7 +2524,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: privilege_find args: 1,9,4 arg: Str('criteria?', noextrawhitespace=False) @@ -2556,7 +2556,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: privilege_remove_member args: 1,5,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -2589,7 +2589,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: pwpolicy_add args: 1,14,3 arg: Str('cn', attribute=True, cli_name='group', multivalue=False, primary_key=True, required=True) @@ -2609,7 +2609,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: pwpolicy_del args: 1,2,3 arg: Str('cn', attribute=True, cli_name='group', multivalue=True, primary_key=True, required=True) @@ -2617,7 +2617,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: pwpolicy_find args: 1,16,4 arg: Str('criteria?', noextrawhitespace=False) @@ -2662,7 +2662,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: pwpolicy_show args: 1,5,3 arg: Str('cn', attribute=True, cli_name='group', multivalue=False, primary_key=True, query=True, required=False) @@ -2673,7 +2673,7 @@ option: Str('user?') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: radiusproxy_add args: 1,11,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True) @@ -2690,7 +2690,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: radiusproxy_del args: 1,2,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=True, primary_key=True, query=True, required=True) @@ -2698,7 +2698,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: radiusproxy_find args: 1,13,4 arg: Str('criteria?', noextrawhitespace=False) @@ -2738,7 +2738,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: radiusproxy_show args: 1,4,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -2748,7 +2748,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: realmdomains_mod args: 0,11,3 option: Str('add_domain', attribute=True, autofill=False, cli_name='add_domain', multivalue=False, required=False) @@ -2764,7 +2764,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: realmdomains_show args: 0,4,3 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') @@ -2773,7 +2773,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: role_add args: 1,7,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True) @@ -2786,7 +2786,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: role_add_member args: 1,8,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -2819,7 +2819,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: role_find args: 1,9,4 arg: Str('criteria?', noextrawhitespace=False) @@ -2851,7 +2851,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: role_remove_member args: 1,8,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -2887,7 +2887,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: selfservice_add args: 1,5,3 arg: Str('aciname', attribute=True, cli_name='name', multivalue=False, pattern='^[-_ a-zA-Z0-9]+$', primary_key=True, required=True) @@ -2898,14 +2898,14 @@ option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: selfservice_del args: 1,1,3 arg: Str('aciname', attribute=True, cli_name='name', multivalue=False, pattern='^[-_ a-zA-Z0-9]+$', primary_key=True, query=True, required=True) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: selfservice_find args: 1,7,4 arg: Str('criteria?', noextrawhitespace=False) @@ -2930,7 +2930,7 @@ option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: selfservice_show args: 1,3,3 arg: Str('aciname', attribute=True, cli_name='name', multivalue=False, pattern='^[-_ a-zA-Z0-9]+$', primary_key=True, query=True, required=True) @@ -2939,7 +2939,7 @@ option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: selinuxusermap_add args: 1,12,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True) @@ -2957,7 +2957,7 @@ option: StrEnum('usercategory', attribute=True, cli_name='usercat', multivalue=F option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: selinuxusermap_add_host args: 1,6,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -2989,21 +2989,21 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: selinuxusermap_disable args: 1,1,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: selinuxusermap_enable args: 1,1,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: selinuxusermap_find args: 1,14,4 arg: Str('criteria?', noextrawhitespace=False) @@ -3044,7 +3044,7 @@ option: StrEnum('usercategory', attribute=True, autofill=False, cli_name='userca option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: selinuxusermap_remove_host args: 1,6,3 arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, query=True, required=True) @@ -3079,7 +3079,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: service_add args: 1,11,3 arg: Str('krbprincipalname', attribute=True, cli_name='principal', multivalue=False, primary_key=True, required=True) @@ -3096,7 +3096,7 @@ option: Bytes('usercertificate', attribute=True, cli_name='certificate', multiva option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: service_add_host args: 1,5,3 arg: Str('krbprincipalname', attribute=True, cli_name='principal', multivalue=False, primary_key=True, query=True, required=True) @@ -3115,14 +3115,14 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: service_disable args: 1,1,3 arg: Str('krbprincipalname', attribute=True, cli_name='principal', multivalue=False, primary_key=True, query=True, required=True) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: service_find args: 1,11,4 arg: Str('criteria?', noextrawhitespace=False) @@ -3158,7 +3158,7 @@ option: Bytes('usercertificate', attribute=True, autofill=False, cli_name='certi option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: service_remove_host args: 1,5,3 arg: Str('krbprincipalname', attribute=True, cli_name='principal', multivalue=False, primary_key=True, query=True, required=True) @@ -3181,7 +3181,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: sidgen_was_run args: 0,1,1 option: Str('version?', exclude='webui') @@ -3198,7 +3198,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: sudocmd_del args: 1,2,3 arg: Str('sudocmd', attribute=True, cli_name='command', multivalue=True, primary_key=True, query=True, required=True) @@ -3206,7 +3206,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: sudocmd_find args: 1,9,4 arg: Str('criteria?', noextrawhitespace=False) @@ -3237,7 +3237,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: sudocmd_show args: 1,5,3 arg: Str('sudocmd', attribute=True, cli_name='command', multivalue=False, primary_key=True, query=True, required=True) @@ -3248,7 +3248,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: sudocmdgroup_add args: 1,7,3 arg: Str('cn', attribute=True, cli_name='sudocmdgroup_name', multivalue=False, primary_key=True, required=True) @@ -3261,7 +3261,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: sudocmdgroup_add_member args: 1,5,3 arg: Str('cn', attribute=True, cli_name='sudocmdgroup_name', multivalue=False, primary_key=True, query=True, required=True) @@ -3280,7 +3280,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: sudocmdgroup_find args: 1,9,4 arg: Str('criteria?', noextrawhitespace=False) @@ -3311,7 +3311,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: sudocmdgroup_remove_member args: 1,5,3 arg: Str('cn', attribute=True, cli_name='sudocmdgroup_name', multivalue=False, primary_key=True, query=True, required=True) @@ -3333,7 +3333,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: sudorule_add args: 1,18,3 arg: Str('cn', attribute=True, cli_name='sudorule_name', multivalue=False, primary_key=True, required=True) @@ -3357,7 +3357,7 @@ option: StrEnum('usercategory', attribute=True, cli_name='usercat', multivalue=F option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: sudorule_add_allow_command args: 1,6,3 arg: Str('cn', attribute=True, cli_name='sudorule_name', multivalue=False, primary_key=True, query=True, required=True) @@ -3404,7 +3404,7 @@ option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: sudorule_add_runasgroup args: 1,5,3 arg: Str('cn', attribute=True, cli_name='sudorule_name', multivalue=False, primary_key=True, query=True, required=True) @@ -3447,7 +3447,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: sudorule_disable args: 1,1,1 arg: Str('cn', attribute=True, cli_name='sudorule_name', multivalue=False, primary_key=True, query=True, required=True) @@ -3510,7 +3510,7 @@ option: StrEnum('usercategory', attribute=True, autofill=False, cli_name='userca option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: sudorule_remove_allow_command args: 1,6,3 arg: Str('cn', attribute=True, cli_name='sudorule_name', multivalue=False, primary_key=True, query=True, required=True) @@ -3557,7 +3557,7 @@ option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: sudorule_remove_runasgroup args: 1,5,3 arg: Str('cn', attribute=True, cli_name='sudorule_name', multivalue=False, primary_key=True, query=True, required=True) @@ -3603,7 +3603,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: trust_add args: 1,13,3 arg: Str('cn', attribute=True, cli_name='realm', multivalue=False, primary_key=True, required=True) @@ -3622,7 +3622,7 @@ option: StrEnum('trust_type', autofill=True, cli_name='type', default=u'ad', val option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: trust_del args: 1,2,3 arg: Str('cn', attribute=True, cli_name='realm', multivalue=True, primary_key=True, query=True, required=True) @@ -3630,7 +3630,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: trust_fetch_domains args: 1,4,4 arg: Str('cn', attribute=True, cli_name='realm', multivalue=False, primary_key=True, query=True, required=True) @@ -3674,7 +3674,7 @@ option: Str('setattr*', cli_name='setattr', exclude='webui') option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: trust_resolve args: 0,4,1 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') @@ -3691,7 +3691,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: trustconfig_mod args: 0,9,3 option: Str('addattr*', cli_name='addattr', exclude='webui') @@ -3705,7 +3705,7 @@ option: StrEnum('trust_type', autofill=True, cli_name='type', default=u'ad', val option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: trustconfig_show args: 0,5,3 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') @@ -3715,7 +3715,7 @@ option: StrEnum('trust_type', autofill=True, cli_name='type', default=u'ad', val option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: trustdomain_add args: 2,9,3 arg: Str('trustcn', cli_name='trust', query=True, required=True) @@ -3731,7 +3731,7 @@ option: StrEnum('trust_type', autofill=True, cli_name='type', default=u'ad', val option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: trustdomain_del args: 2,2,3 arg: Str('trustcn', cli_name='trust', query=True, required=True) @@ -3740,7 +3740,7 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: trustdomain_disable args: 2,1,3 arg: Str('trustcn', cli_name='trust', query=True, required=True) @@ -3748,7 +3748,7 @@ arg: Str('cn', attribute=True, cli_name='domain', multivalue=False, primary_key= option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: trustdomain_enable args: 2,1,3 arg: Str('trustcn', cli_name='trust', query=True, required=True) @@ -3756,7 +3756,7 @@ arg: Str('cn', attribute=True, cli_name='domain', multivalue=False, primary_key= option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: trustdomain_find args: 2,10,4 arg: Str('trustcn', cli_name='trust', query=True, required=True) @@ -3792,7 +3792,7 @@ option: StrEnum('trust_type', autofill=True, cli_name='type', default=u'ad', val option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: user_add args: 1,43,3 arg: Str('uid', attribute=True, cli_name='login', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$', primary_key=True, required=True) @@ -3841,7 +3841,7 @@ option: Password('userpassword', attribute=True, cli_name='password', exclude='w option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: user_del args: 1,2,3 arg: Str('uid', attribute=True, cli_name='login', maxlength=255, multivalue=True, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$', primary_key=True, query=True, required=True) @@ -3849,21 +3849,21 @@ option: Flag('continue', autofill=True, cli_name='continue', default=False) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: ListOfPrimaryKeys('value', None, None) command: user_disable args: 1,1,3 arg: Str('uid', attribute=True, cli_name='login', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$', primary_key=True, query=True, required=True) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: user_enable args: 1,1,3 arg: Str('uid', attribute=True, cli_name='login', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$', primary_key=True, query=True, required=True) option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: user_find args: 1,53,4 arg: Str('criteria?', noextrawhitespace=False) @@ -3973,7 +3973,7 @@ option: Password('userpassword', attribute=True, autofill=False, cli_name='passw option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: user_show args: 1,5,3 arg: Str('uid', attribute=True, cli_name='login', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$', primary_key=True, query=True, required=True) @@ -3984,7 +3984,7 @@ option: Flag('rights', autofill=True, default=False) option: Str('version?', exclude='webui') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) command: user_status args: 1,4,4 arg: Str('uid', attribute=True, cli_name='login', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$', primary_key=True, query=True, required=True) @@ -4002,7 +4002,8 @@ arg: Str('uid', attribute=True, cli_name='login', maxlength=255, multivalue=Fals option: Str('version?', exclude='webui') output: Output('result', , None) output: Output('summary', (, ), None) -output: Output('value', , None) +output: PrimaryKey('value', None, None) capability: messages 2.52 capability: optional_uid_params 2.54 capability: permissions2 2.69 +capability: primary_key_types 2.83 diff --git a/VERSION b/VERSION index e787e3713..3b48d6407 100644 --- a/VERSION +++ b/VERSION @@ -89,5 +89,5 @@ IPA_DATA_VERSION=20100614120000 # # ######################################################## IPA_API_VERSION_MAJOR=2 -IPA_API_VERSION_MINOR=82 -# Last change: amisnyov - automember nowait add +IPA_API_VERSION_MINOR=83 +# Last change: jcholast - add 'primary_key_types' capability diff --git a/ipalib/capabilities.py b/ipalib/capabilities.py index b60a570cf..3dd93294f 100644 --- a/ipalib/capabilities.py +++ b/ipalib/capabilities.py @@ -45,6 +45,9 @@ capabilities = dict( # permissions2: Reworked permission system # http://www.freeipa.org/page/V3/Permissions_V2 permissions2=u'2.69', + + # primary_key_types: Non-unicode primary keys in command output + primary_key_types=u'2.83', ) diff --git a/ipalib/cli.py b/ipalib/cli.py index 067d78089..4250aaf54 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -363,7 +363,8 @@ class textui(backend.Backend): label = labels.get(key, key) flag = flags.get(key, []) value = entry[key] - if 'suppress_empty' in flag and value in [u'', '', [], None]: + if ('suppress_empty' in flag and + value in [u'', '', (), [], None]): continue if isinstance(value, dict): if frontend.entry_count(value) == 0: diff --git a/ipalib/frontend.py b/ipalib/frontend.py index 76c53eba5..66be7939f 100644 --- a/ipalib/frontend.py +++ b/ipalib/frontend.py @@ -439,12 +439,9 @@ class Command(HasParam): and 'summary' in self.output and 'summary' not in ret ): - if self.msg_summary: - ret['summary'] = self.msg_summary % ret - else: - ret['summary'] = None + ret['summary'] = self.get_summary_default(ret) if self.use_output_validation and (self.output or ret is not None): - self.validate_output(ret) + self.validate_output(ret, options.get('version', API_VERSION)) return ret def soft_validate(self, values): @@ -918,7 +915,7 @@ class Command(HasParam): flags=['no_option', 'no_output'], ) - def validate_output(self, output): + def validate_output(self, output, version=API_VERSION): """ Validate the return value to make sure it meets the interface contract. """ @@ -947,7 +944,7 @@ class Command(HasParam): nice, o.name, o.type, type(value), value) ) if callable(o.validate): - o.validate(self, value) + o.validate(self, value, version) def get_output_params(self): for param in self._get_param_iterable('output_params', verb='has'): @@ -959,6 +956,10 @@ class Command(HasParam): continue yield param + def get_summary_default(self, output): + if self.msg_summary: + return self.msg_summary % output + def log_messages(self, output, logger): logger_functions = dict( debug=logger.debug, diff --git a/ipalib/output.py b/ipalib/output.py index 1f42b4d6e..3501cddd2 100644 --- a/ipalib/output.py +++ b/ipalib/output.py @@ -24,6 +24,7 @@ Simple description of return values. from inspect import getdoc from types import NoneType from plugable import ReadOnly, lock +from capabilities import client_has_capability from text import _ @@ -99,7 +100,7 @@ class ListOfEntries(Output): type = (list, tuple) doc = _('A list of LDAP entries') - def validate(self, cmd, entries): + def validate(self, cmd, entries, version): assert isinstance(entries, self.type) for (i, entry) in enumerate(entries): if not isinstance(entry, dict): @@ -107,6 +108,47 @@ class ListOfEntries(Output): self.name, i, dict, type(entry), entry) ) +class PrimaryKey(Output): + def validate(self, cmd, value, version): + if client_has_capability(version, 'primary_key_types'): + if hasattr(cmd, 'obj') and cmd.obj and cmd.obj.primary_key: + types = cmd.obj.primary_key.allowed_types + else: + types = (unicode,) + types = types + (NoneType,) + else: + types = (unicode,) + if not isinstance(value, types): + raise TypeError( + "%s.validate_output() => %s.validate():\n" + " output[%r]: need %r; got %r: %r" % ( + cmd.name, self.__class__.__name__, self.name, + types[0], type(value), value)) + +class ListOfPrimaryKeys(Output): + def validate(self, cmd, values, version): + if client_has_capability(version, 'primary_key_types'): + types = (tuple, list) + else: + types = (unicode,) + if not isinstance(values, types): + raise TypeError( + "%s.validate_output() => %s.validate():\n" + " output[%r]: need %r; got %r: %r" % ( + cmd.name, self.__class__.__name__, self.name, + types[0], type(values), values)) + + if client_has_capability(version, 'primary_key_types'): + if hasattr(cmd, 'obj') and cmd.obj and cmd.obj.primary_key: + types = cmd.obj.primary_key.allowed_types + else: + types = (unicode,) + for (i, value) in enumerate(values): + if not isinstance(value, types): + raise TypeError(emsg % ( + cmd.name, self.__class__.__name__, i, self.name, + types[0], type(value), value)) + result = Output('result', doc=_('All commands should at least have a result')) @@ -114,7 +156,7 @@ summary = Output('summary', (unicode, NoneType), _('User-friendly description of action performed') ) -value = Output('value', unicode, +value = PrimaryKey('value', None, _("The primary_key value of the entry, e.g. 'jdoe' for a user"), flags=['no_display'], ) @@ -140,6 +182,12 @@ standard_delete = ( value, ) +standard_multi_delete = ( + summary, + Output('result', dict, _('List of deletions that failed')), + ListOfPrimaryKeys('value', flags=['no_display']), +) + standard_boolean = ( summary, Output('result', bool, _('True means the operation was successful')), diff --git a/ipalib/plugins/aci.py b/ipalib/plugins/aci.py index 45900b357..4821089f1 100644 --- a/ipalib/plugins/aci.py +++ b/ipalib/plugins/aci.py @@ -126,7 +126,7 @@ from ipalib.aci import ACI from ipalib import output from ipalib import _, ngettext from ipalib.plugable import Registry -from ipalib.plugins.baseldap import gen_pkey_only_option +from ipalib.plugins.baseldap import gen_pkey_only_option, pkey_to_value from ipapython.ipa_log_manager import * from ipapython.dn import DN @@ -557,7 +557,7 @@ class aci_add(crud.Create): result = _aci_to_kw(ldap, newaci, kw.get('test', False)) return dict( result=result, - value=aciname, + value=pkey_to_value(aciname, kw), ) @@ -598,7 +598,7 @@ class aci_del(crud.Delete): return dict( result=True, - value=aciname, + value=pkey_to_value(aciname, options), ) @@ -666,7 +666,7 @@ class aci_mod(crud.Update): result = _aci_to_kw(ldap, newaci) return dict( result=result, - value=aciname, + value=pkey_to_value(aciname, kw), ) @@ -919,7 +919,7 @@ class aci_show(crud.Retrieve): result = _aci_to_kw(ldap, aci) return dict( result=result, - value=aciname, + value=pkey_to_value(aciname, kw), ) @@ -981,5 +981,5 @@ class aci_rename(crud.Update): result = _aci_to_kw(ldap, newaci) return dict( result=result, - value=kw['newname'], + value=pkey_to_value(kw['newname'], kw), ) diff --git a/ipalib/plugins/automember.py b/ipalib/plugins/automember.py index dad35d458..3166c6958 100644 --- a/ipalib/plugins/automember.py +++ b/ipalib/plugins/automember.py @@ -297,7 +297,7 @@ class automember_add(LDAPCreate): def execute(self, *keys, **options): result = super(automember_add, self).execute(*keys, **options) - result['value'] = keys[-1] + result['value'] = pkey_to_value(keys[-1], options) return result @@ -389,7 +389,7 @@ class automember_add_condition(LDAPUpdate): result = {'result': getattr(context, 'entry_attrs'), 'value': keys[-1]} result['failed'] = getattr(context, 'failed') result['completed'] = getattr(context, 'completed') - result['value'] = keys[-1] + result['value'] = pkey_to_value(keys[-1], options) return result @@ -476,7 +476,7 @@ class automember_remove_condition(LDAPUpdate): result = {'result': getattr(context, 'entry_attrs'), 'value': keys[-1]} result['failed'] = getattr(context, 'failed') result['completed'] = getattr(context, 'completed') - result['value'] = keys[-1] + result['value'] = pkey_to_value(keys[-1], options) return result @@ -491,7 +491,7 @@ class automember_mod(LDAPUpdate): def execute(self, *keys, **options): result = super(automember_mod, self).execute(*keys, **options) - result['value'] = keys[-1] + result['value'] = pkey_to_value(keys[-1], options) return result @@ -506,7 +506,7 @@ class automember_del(LDAPDelete): def execute(self, *keys, **options): result = super(automember_del, self).execute(*keys, **options) - result['value'] = keys[-1] + result['value'] = pkey_to_value([keys[-1]], options) return result @@ -540,7 +540,7 @@ class automember_show(LDAPRetrieve): def execute(self, *keys, **options): result = super(automember_show, self).execute(*keys, **options) - result['value'] = keys[-1] + result['value'] = pkey_to_value(keys[-1], options) return result @@ -568,7 +568,7 @@ class automember_default_group_set(LDAPUpdate): def execute(self, *keys, **options): result = super(automember_default_group_set, self).execute(*keys, **options) - result['value'] = options['type'] + result['value'] = pkey_to_value(options['type'], options) return result @@ -602,7 +602,7 @@ class automember_default_group_remove(LDAPUpdate): def execute(self, *keys, **options): result = super(automember_default_group_remove, self).execute(*keys, **options) - result['value'] = options['type'] + result['value'] = pkey_to_value(options['type'], options) return result @@ -626,7 +626,7 @@ class automember_default_group_show(LDAPRetrieve): def execute(self, *keys, **options): result = super(automember_default_group_show, self).execute(*keys, **options) - result['value'] = options['type'] + result['value'] = pkey_to_value(options['type'], options) return result @@ -777,4 +777,4 @@ class automember_rebuild(Command): return dict( result=result, summary=unicode(summary), - value=u'') + value=pkey_to_value(None, options)) diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py index b961b1c17..7b426b688 100644 --- a/ipalib/plugins/automount.py +++ b/ipalib/plugins/automount.py @@ -827,7 +827,7 @@ class automountkey_add(LDAPCreate): options[self.obj.primary_key.name] = self.obj.get_pk(key, info) options['add_operation'] = True result = super(automountkey_add, self).execute(*keys, **options) - result['value'] = options['automountkey'] + result['value'] = pkey_to_value(options['automountkey'], options) return result api.register(automountkey_add) @@ -923,7 +923,7 @@ class automountkey_del(LDAPDelete): options['automountkey'], options.get('automountinformation', None)) result = super(automountkey_del, self).execute(*keys, **options) - result['value'] = options['automountkey'] + result['value'] = pkey_to_value([options['automountkey']], options) return result api.register(automountkey_del) @@ -982,7 +982,7 @@ class automountkey_mod(LDAPUpdate): options['rename'] = new_rdn result = super(automountkey_mod, self).execute(*keys, **options) - result['value'] = options['automountkey'] + result['value'] = pkey_to_value(options['automountkey'], options) return result api.register(automountkey_mod) @@ -1026,7 +1026,7 @@ class automountkey_show(LDAPRetrieve): options.get('automountinformation', None)) result = super(automountkey_show, self).execute(*keys, **options) - result['value'] = options['automountkey'] + result['value'] = pkey_to_value(options['automountkey'], options) return result api.register(automountkey_show) diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py index 6a8b4f822..949e5753b 100644 --- a/ipalib/plugins/baseldap.py +++ b/ipalib/plugins/baseldap.py @@ -32,7 +32,9 @@ from ipalib.cli import to_cli from ipalib import output from ipalib.text import _ from ipalib.util import json_serialize, validate_hostname +from ipalib.capabilities import client_has_capability from ipapython.dn import DN, RDN +from ipapython.version import API_VERSION DNA_MAGIC = -1 @@ -240,6 +242,20 @@ def entry_to_dict(entry, **options): result['dn'] = entry.dn return result +def pkey_to_unicode(key): + if key is None: + key = [] + elif not isinstance(key, (tuple, list)): + key = [key] + key = u','.join(unicode(k) for k in key) + return key + +def pkey_to_value(key, options): + version = options.get('version', API_VERSION) + if client_has_capability(version, 'primary_key_types'): + return key + return pkey_to_unicode(key) + def wait_for_value(ldap, dn, attr, value): """ 389-ds postoperation plugins are executed after the data has been @@ -768,6 +784,12 @@ last, after all sets and adds."""), _callback_registry = dict(pre={}, post={}, exc={}, interactive_prompt={}) + def get_summary_default(self, output): + if 'value' in output: + output = dict(output) + output['value'] = pkey_to_unicode(output['value']) + return super(BaseLDAPCommand, self).get_summary_default(output) + def _convert_2_dict(self, ldap, attrs): """ Convert a string in the form of name/value pairs into a dictionary. @@ -1103,9 +1125,12 @@ class LDAPCreate(BaseLDAPCommand, crud.Create): entry_attrs = entry_to_dict(entry_attrs, **options) entry_attrs['dn'] = dn - if self.obj.primary_key and keys[-1] is not None: - return dict(result=entry_attrs, value=keys[-1]) - return dict(result=entry_attrs, value=u'') + if self.obj.primary_key: + pkey = keys[-1] + else: + pkey = None + + return dict(result=entry_attrs, value=pkey_to_value(pkey, options)) def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options): assert isinstance(dn, DN) @@ -1227,9 +1252,12 @@ class LDAPRetrieve(LDAPQuery): entry_attrs = entry_to_dict(entry_attrs, **options) entry_attrs['dn'] = dn - if self.obj.primary_key and keys[-1] is not None: - return dict(result=entry_attrs, value=keys[-1]) - return dict(result=entry_attrs, value=u'') + if self.obj.primary_key: + pkey = keys[-1] + else: + pkey = None + + return dict(result=entry_attrs, value=pkey_to_value(pkey, options)) def pre_callback(self, ldap, dn, attrs_list, *keys, **options): assert isinstance(dn, DN) @@ -1363,9 +1391,12 @@ class LDAPUpdate(LDAPQuery, crud.Update): entry_attrs = entry_to_dict(entry_attrs, **options) - if self.obj.primary_key and keys[-1] is not None: - return dict(result=entry_attrs, value=keys[-1]) - return dict(result=entry_attrs, value=u'') + if self.obj.primary_key: + pkey = keys[-1] + else: + pkey = None + + return dict(result=entry_attrs, value=pkey_to_value(pkey, options)) def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options): assert isinstance(dn, DN) @@ -1386,7 +1417,7 @@ class LDAPDelete(LDAPMultiQuery): """ Delete an LDAP entry and all of its direct subentries. """ - has_output = output.standard_delete + has_output = output.standard_multi_delete has_output_params = global_output_params @@ -1433,28 +1464,28 @@ class LDAPDelete(LDAPMultiQuery): return result - if not self.obj.primary_key or not isinstance(keys[-1], (list, tuple)): - pkeyiter = (keys[-1], ) - else: + if self.obj.primary_key and isinstance(keys[-1], (list, tuple)): pkeyiter = keys[-1] + elif keys[-1] is not None: + pkeyiter = [keys[-1]] + else: + pkeyiter = [] deleted = [] failed = [] - result = True for pkey in pkeyiter: try: - if not delete_entry(pkey): - result = False + delete_entry(pkey) except errors.ExecutionError: if not options.get('continue', False): raise failed.append(pkey) else: deleted.append(pkey) + deleted = pkey_to_value(deleted, options) + failed = pkey_to_value(failed, options) - if self.obj.primary_key and pkeyiter[0] is not None: - return dict(result=dict(failed=u','.join(failed)), value=u','.join(deleted)) - return dict(result=dict(failed=u''), value=u'') + return dict(result=dict(failed=failed), value=deleted) def pre_callback(self, ldap, dn, *keys, **options): assert isinstance(dn, DN) diff --git a/ipalib/plugins/delegation.py b/ipalib/plugins/delegation.py index bab76ccbc..93129fbc4 100644 --- a/ipalib/plugins/delegation.py +++ b/ipalib/plugins/delegation.py @@ -24,7 +24,7 @@ from ipalib.request import context from ipalib import api, crud, errors from ipalib import output from ipalib import Object, Command -from ipalib.plugins.baseldap import gen_pkey_only_option +from ipalib.plugins.baseldap import gen_pkey_only_option, pkey_to_value __doc__ = _(""" Group to Group Delegation @@ -141,7 +141,7 @@ class delegation_add(crud.Create): return dict( result=result, - value=aciname, + value=pkey_to_value(aciname, kw), ) api.register(delegation_add) @@ -159,7 +159,7 @@ class delegation_del(crud.Delete): self.obj.postprocess_result(result) return dict( result=True, - value=aciname, + value=pkey_to_value(aciname, kw), ) api.register(delegation_del) @@ -178,7 +178,7 @@ class delegation_mod(crud.Update): return dict( result=result, - value=aciname, + value=pkey_to_value(aciname, kw), ) api.register(delegation_mod) @@ -220,7 +220,7 @@ class delegation_show(crud.Retrieve): self.obj.postprocess_result(result) return dict( result=result, - value=aciname, + value=pkey_to_value(aciname, kw), ) api.register(delegation_show) diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index 876f37619..23b3ad456 100644 --- a/ipalib/plugins/dns.py +++ b/ipalib/plugins/dns.py @@ -2012,7 +2012,7 @@ class dnszone_disable(LDAPQuery): except errors.EmptyModlist: pass - return dict(result=True, value=keys[-1]) + return dict(result=True, value=pkey_to_value(keys[-1], options)) api.register(dnszone_disable) @@ -2036,7 +2036,7 @@ class dnszone_enable(LDAPQuery): except errors.EmptyModlist: pass - return dict(result=True, value=keys[-1]) + return dict(result=True, value=pkey_to_value(keys[-1], options)) api.register(dnszone_enable) @@ -2073,7 +2073,7 @@ class dnszone_add_permission(LDAPQuery): return dict( result=True, - value=permission_name, + value=pkey_to_value(permission_name, options), ) api.register(dnszone_add_permission) @@ -2106,7 +2106,7 @@ class dnszone_remove_permission(LDAPQuery): return dict( result=True, - value=permission_name, + value=pkey_to_value(permission_name, options), ) api.register(dnszone_remove_permission) @@ -2957,7 +2957,7 @@ api.register(dnsrecord_delentry) class dnsrecord_del(LDAPUpdate): __doc__ = _('Delete DNS resource record.') - has_output = output.standard_delete + has_output = output.standard_multi_delete no_option_msg = _('Neither --del-all nor options to delete a specific record provided.\n'\ "Command help may be consulted for all supported record types.") @@ -3045,6 +3045,7 @@ class dnsrecord_del(LDAPUpdate): return result result = super(dnsrecord_del, self).execute(*keys, **options) + result['value'] = pkey_to_value([keys[-1]], options) if getattr(context, 'del_all', False) and not \ self.obj.is_pkey_zone_record(*keys): @@ -3223,7 +3224,7 @@ class dns_is_enabled(Command): except Exception, e: pass - return dict(result=dns_enabled, value=u'') + return dict(result=dns_enabled, value=pkey_to_value(None, options)) api.register(dns_is_enabled) diff --git a/ipalib/plugins/group.py b/ipalib/plugins/group.py index 644954d94..2cbd7e57a 100644 --- a/ipalib/plugins/group.py +++ b/ipalib/plugins/group.py @@ -589,7 +589,7 @@ class group_detach(LDAPQuery): return dict( result=True, - value=keys[0], + value=pkey_to_value(keys[0], options), ) api.register(group_detach) diff --git a/ipalib/plugins/hbacrule.py b/ipalib/plugins/hbacrule.py index 52abb408b..06e9c4e6b 100644 --- a/ipalib/plugins/hbacrule.py +++ b/ipalib/plugins/hbacrule.py @@ -324,7 +324,7 @@ class hbacrule_enable(LDAPQuery): return dict( result=True, - value=cn, + value=pkey_to_value(cn, options), ) api.register(hbacrule_enable) @@ -354,7 +354,7 @@ class hbacrule_disable(LDAPQuery): return dict( result=True, - value=cn, + value=pkey_to_value(cn, options), ) api.register(hbacrule_disable) diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py index 9b5a39d89..8f770ff02 100644 --- a/ipalib/plugins/host.py +++ b/ipalib/plugins/host.py @@ -1011,7 +1011,7 @@ class host_disable(LDAPQuery): return dict( result=True, - value=keys[0], + value=pkey_to_value(keys[0], options), ) def post_callback(self, ldap, dn, entry_attrs, *keys, **options): diff --git a/ipalib/plugins/krbtpolicy.py b/ipalib/plugins/krbtpolicy.py index 4ae676dc5..22a961a4a 100644 --- a/ipalib/plugins/krbtpolicy.py +++ b/ipalib/plugins/krbtpolicy.py @@ -216,8 +216,6 @@ class krbtpolicy_reset(LDAPQuery): entry_attrs = entry_to_dict(entry_attrs, **options) - if keys[-1] is not None: - return dict(result=entry_attrs, value=keys[-1]) - return dict(result=entry_attrs, value=u'') + return dict(result=entry_attrs, value=pkey_to_value(keys[-1], options)) api.register(krbtpolicy_reset) diff --git a/ipalib/plugins/selfservice.py b/ipalib/plugins/selfservice.py index b2ea7677a..a1fd9d355 100644 --- a/ipalib/plugins/selfservice.py +++ b/ipalib/plugins/selfservice.py @@ -23,7 +23,7 @@ from ipalib.request import context from ipalib import api, crud, errors from ipalib import output from ipalib import Object, Command -from ipalib.plugins.baseldap import gen_pkey_only_option +from ipalib.plugins.baseldap import gen_pkey_only_option, pkey_to_value __doc__ = _(""" Self-service Permissions @@ -135,7 +135,7 @@ class selfservice_add(crud.Create): return dict( result=result, - value=aciname, + value=pkey_to_value(aciname, kw), ) api.register(selfservice_add) @@ -153,7 +153,7 @@ class selfservice_del(crud.Delete): return dict( result=True, - value=aciname, + value=pkey_to_value(aciname, kw), ) api.register(selfservice_del) @@ -175,7 +175,7 @@ class selfservice_mod(crud.Update): return dict( result=result, - value=aciname, + value=pkey_to_value(aciname, kw), ) api.register(selfservice_mod) @@ -218,7 +218,7 @@ class selfservice_show(crud.Retrieve): self.obj.postprocess_result(result) return dict( result=result, - value=aciname, + value=pkey_to_value(aciname, kw), ) api.register(selfservice_show) diff --git a/ipalib/plugins/selinuxusermap.py b/ipalib/plugins/selinuxusermap.py index 04a37bd0d..cf1d55d9a 100644 --- a/ipalib/plugins/selinuxusermap.py +++ b/ipalib/plugins/selinuxusermap.py @@ -425,7 +425,7 @@ class selinuxusermap_enable(LDAPQuery): return dict( result=True, - value=cn, + value=pkey_to_value(cn, options), ) api.register(selinuxusermap_enable) @@ -455,7 +455,7 @@ class selinuxusermap_disable(LDAPQuery): return dict( result=True, - value=cn, + value=pkey_to_value(cn, options), ) api.register(selinuxusermap_disable) diff --git a/ipalib/plugins/service.py b/ipalib/plugins/service.py index 25f02cd12..f590b666a 100644 --- a/ipalib/plugins/service.py +++ b/ipalib/plugins/service.py @@ -661,7 +661,7 @@ class service_disable(LDAPQuery): return dict( result=True, - value=keys[0], + value=pkey_to_value(keys[0], options), ) api.register(service_disable) diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py index 16611aede..627b4b975 100644 --- a/ipalib/plugins/sudorule.py +++ b/ipalib/plugins/sudorule.py @@ -699,7 +699,7 @@ class sudorule_add_option(LDAPQuery): entry_attrs = entry_to_dict(entry_attrs, **options) - return dict(result=entry_attrs, value=cn) + return dict(result=entry_attrs, value=pkey_to_value(cn, options)) def output_for_cli(self, textui, result, cn, **options): textui.print_dashed(_('Added option "%(option)s" to Sudo Rule "%(rule)s"') % \ @@ -755,7 +755,7 @@ class sudorule_remove_option(LDAPQuery): entry_attrs = entry_to_dict(entry_attrs, **options) - return dict(result=entry_attrs, value=cn) + return dict(result=entry_attrs, value=pkey_to_value(cn, options)) def output_for_cli(self, textui, result, cn, **options): textui.print_dashed(_('Removed option "%(option)s" from Sudo Rule "%(rule)s"') % \ diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py index f57cf7d89..de838803f 100644 --- a/ipalib/plugins/trust.py +++ b/ipalib/plugins/trust.py @@ -434,6 +434,7 @@ sides. ) msg_summary = _('Added Active Directory trust for realm "%(value)s"') + msg_summary_existing = _('Re-established trust to domain "%(value)s"') has_output_params = LDAPCreate.has_output_params + trust_output_params def execute(self, *keys, **options): @@ -640,11 +641,6 @@ sides. except errors.NotFound: dn = None - if dn: - summary = _('Re-established trust to domain "%(value)s"') - else: - summary = self.msg_summary - # 1. Full access to the remote domain. Use admin credentials and # generate random trustdom password to do work on both sides if full_join: @@ -685,10 +681,13 @@ sides. error=_('Unable to verify write permissions to the AD')) ret = dict( - value=self.trustinstance.remote_domain.info['dns_domain'], + value=pkey_to_value( + self.trustinstance.remote_domain.info['dns_domain'], + options), verified=result['verified'] ) - ret['summary'] = summary % ret + if dn: + ret['summary'] = self.msg_summary_existing % ret return ret @@ -702,10 +701,13 @@ sides. options['trust_secret'] ) ret = dict( - value=self.trustinstance.remote_domain.info['dns_domain'], + value=pkey_to_value( + self.trustinstance.remote_domain.info['dns_domain'], + options), verified=result['verified'] ) - ret['summary'] = summary % ret + if dn: + ret['summary'] = self.msg_summary_existing % ret return ret raise errors.ValidationError(name=_('AD Trust setup'), error=_('Not enough arguments specified to perform trust setup')) @@ -915,7 +917,7 @@ class trustconfig_mod(LDAPUpdate): def execute(self, *keys, **options): result = super(trustconfig_mod, self).execute(*keys, **options) - result['value'] = options['trust_type'] + result['value'] = pkey_to_value(options['trust_type'], options) return result def post_callback(self, ldap, dn, entry_attrs, *keys, **options): @@ -932,7 +934,7 @@ class trustconfig_show(LDAPRetrieve): def execute(self, *keys, **options): result = super(trustconfig_show, self).execute(*keys, **options) - result['value'] = options['trust_type'] + result['value'] = pkey_to_value(options['trust_type'], options) return result def post_callback(self, ldap, dn, entry_attrs, *keys, **options): @@ -1216,7 +1218,7 @@ class trustdomain_del(LDAPDelete): except errors.AlreadyActive: pass result = super(trustdomain_del, self).execute(*keys, **options) - result['value'] = u','.join(keys[1]) + result['value'] = pkey_to_value(keys[1], options) return result @@ -1346,7 +1348,7 @@ class trustdomain_enable(LDAPQuery): return dict( result=True, - value=keys[1], + value=pkey_to_value(keys[1], options), ) api.register(trustdomain_enable) @@ -1386,7 +1388,7 @@ class trustdomain_disable(LDAPQuery): return dict( result=True, - value=keys[1], + value=pkey_to_value(keys[1], options), ) api.register(trustdomain_disable) diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py index 4bdfb26a7..166955933 100644 --- a/ipalib/plugins/user.py +++ b/ipalib/plugins/user.py @@ -832,7 +832,7 @@ class user_disable(LDAPQuery): return dict( result=True, - value=keys[0], + value=pkey_to_value(keys[0], options), ) api.register(user_disable) @@ -854,7 +854,7 @@ class user_enable(LDAPQuery): return dict( result=True, - value=keys[0], + value=pkey_to_value(keys[0], options), ) api.register(user_enable) @@ -883,7 +883,7 @@ class user_unlock(LDAPQuery): return dict( result=True, - value=keys[0], + value=pkey_to_value(keys[0], options), ) api.register(user_unlock) diff --git a/ipatests/test_ipalib/test_output.py b/ipatests/test_ipalib/test_output.py index 15ef11e10..e722a973d 100644 --- a/ipatests/test_ipalib/test_output.py +++ b/ipatests/test_ipalib/test_output.py @@ -25,6 +25,7 @@ from ipatests.util import raises, ClassChecker from ipalib import output from ipalib.frontend import Command from ipalib import _ +from ipapython.version import API_VERSION class test_Output(ClassChecker): """ @@ -78,12 +79,14 @@ class test_ListOfEntries(ClassChecker): okay = dict(foo='bar') nope = ('aye', 'bee') - e = raises(TypeError, inst.validate, cmd, [okay, okay, nope]) + e = raises(TypeError, inst.validate, + cmd, [okay, okay, nope], API_VERSION) assert str(e) == output.emsg % ( 'example', 'ListOfEntries', 'stuff', 2, dict, tuple, nope ) - e = raises(TypeError, inst.validate, cmd, [nope, okay, nope]) + e = raises(TypeError, inst.validate, + cmd, [nope, okay, nope], API_VERSION) assert str(e) == output.emsg % ( 'example', 'ListOfEntries', 'stuff', 0, dict, tuple, nope ) diff --git a/ipatests/test_xmlrpc/test_automember_plugin.py b/ipatests/test_xmlrpc/test_automember_plugin.py index 600d54890..6618ac605 100644 --- a/ipatests/test_xmlrpc/test_automember_plugin.py +++ b/ipatests/test_xmlrpc/test_automember_plugin.py @@ -242,7 +242,7 @@ class test_automember(Declarative): desc='Rebuild membership for hostgroups', command=('automember_rebuild', [], dict(type=u'hostgroup')), expected=dict( - value=u'', + value=None, summary=fuzzy_automember_message, result=dict() ), @@ -252,7 +252,7 @@ class test_automember(Declarative): desc='Rebuild membership for hostgroups asynchronously', command=('automember_rebuild', [], dict(type=u'hostgroup',no_wait=True)), expected=dict( - value=u'', + value=None, summary=u'Automember rebuild membership task started', result=dict( dn=fuzzy_automember_dn @@ -361,7 +361,7 @@ class test_automember(Declarative): desc='Rebuild membership for host: %s' % fqdn1, command=('automember_rebuild', [], dict(hosts=fqdn1)), expected=dict( - value=u'', + value=None, summary=fuzzy_automember_message, result=dict() ), @@ -371,7 +371,7 @@ class test_automember(Declarative): desc='Rebuild membership for host: %s asynchronously' % fqdn1, command=('automember_rebuild', [], dict(hosts=fqdn1, no_wait=True)), expected=dict( - value=u'', + value=None, summary=u'Automember rebuild membership task started', result=dict( dn=fuzzy_automember_dn @@ -398,9 +398,9 @@ class test_automember(Declarative): desc='Delete host: %r' % fqdn1, command=('host_del', [fqdn1], dict()), expected=dict( - value=fqdn1, + value=[fqdn1], summary=u'Deleted host "%s"' % fqdn1, - result=dict(failed=u''), + result=dict(failed=[]), ), ), @@ -408,9 +408,9 @@ class test_automember(Declarative): desc='Delete hostgroup: %r' % hostgroup1, command=('hostgroup_del', [hostgroup1], dict()), expected=dict( - value=hostgroup1, + value=[hostgroup1], summary=u'Deleted hostgroup "%s"' % hostgroup1, - result=dict(failed=u''), + result=dict(failed=[]), ), ), @@ -418,9 +418,9 @@ class test_automember(Declarative): desc='Delete automember rule: %r' % hostgroup1, command=('automember_del', [hostgroup1], dict(type=u'hostgroup')), expected=dict( - value=hostgroup1, + value=[hostgroup1], summary=u'Deleted automember rule "%s"' % hostgroup1, - result=dict(failed=u''), + result=dict(failed=[]), ), ), @@ -543,7 +543,7 @@ class test_automember(Declarative): desc='Rebuild membership for groups', command=('automember_rebuild', [], dict(type=u'group')), expected=dict( - value=u'', + value=None, summary=fuzzy_automember_message, result=dict() ), @@ -553,7 +553,7 @@ class test_automember(Declarative): desc='Rebuild membership for groups asynchronously', command=('automember_rebuild', [], dict(type=u'group', no_wait=True)), expected=dict( - value=u'', + value=None, summary=u'Automember rebuild membership task started', result=dict( dn=fuzzy_automember_dn @@ -620,7 +620,7 @@ class test_automember(Declarative): desc='Rebuild membership for user: %s' % user1, command=('automember_rebuild', [], dict(users=user1)), expected=dict( - value=u'', + value=None, summary=fuzzy_automember_message, result=dict() ), @@ -630,7 +630,7 @@ class test_automember(Declarative): desc='Rebuild membership for user: %s asynchronously' % user1, command=('automember_rebuild', [], dict(users=user1, no_wait=True)), expected=dict( - value=u'', + value=None, summary=u'Automember rebuild membership task started', result=dict( dn=fuzzy_automember_dn @@ -658,9 +658,9 @@ class test_automember(Declarative): desc='Delete user: %r' % user1, command=('user_del', [user1], dict()), expected=dict( - value=user1, + value=[user1], summary=u'Deleted user "%s"' % user1, - result=dict(failed=u''), + result=dict(failed=[]), ), ), @@ -668,9 +668,9 @@ class test_automember(Declarative): desc='Delete user: %r' % manager1, command=('user_del', [manager1], dict()), expected=dict( - value=manager1, + value=[manager1], summary=u'Deleted user "%s"' % manager1, - result=dict(failed=u''), + result=dict(failed=[]), ), ), @@ -678,9 +678,9 @@ class test_automember(Declarative): desc='Delete group: %r' % group1, command=('group_del', [group1], dict()), expected=dict( - value=group1, + value=[group1], summary=u'Deleted group "%s"' % group1, - result=dict(failed=u''), + result=dict(failed=[]), ), ), @@ -688,9 +688,9 @@ class test_automember(Declarative): desc='Delete automember rule: %r' % group1, command=('automember_del', [group1], dict(type=u'group')), expected=dict( - value=group1, + value=[group1], summary=u'Deleted automember rule "%s"' % group1, - result=dict(failed=u''), + result=dict(failed=[]), ), ), diff --git a/ipatests/test_xmlrpc/test_automount_plugin.py b/ipatests/test_xmlrpc/test_automount_plugin.py index e1af651c8..2eee80b1f 100644 --- a/ipatests/test_xmlrpc/test_automount_plugin.py +++ b/ipatests/test_xmlrpc/test_automount_plugin.py @@ -100,7 +100,7 @@ class AutomountTest(XMLRPC_test): finally: res = api.Command['automountlocation_del'](self.locname)['result'] assert res - assert_attr_equal(res, 'failed', '') + assert not res['failed'] # Success; delete the temporary directory shutil.rmtree(conf_directory) @@ -285,7 +285,7 @@ class test_automount(AutomountTest): delkey_kw={'automountkey': self.keyname_rename, 'automountinformation' : self.newinfo} res = api.Command['automountkey_del'](self.locname, self.mapname, **delkey_kw)['result'] assert res - assert_attr_equal(res, 'failed', '') + assert not res['failed'] # Verify that it is gone with assert_raises(errors.NotFound): @@ -297,7 +297,7 @@ class test_automount(AutomountTest): """ res = api.Command['automountlocation_del'](self.locname)['result'] assert res - assert_attr_equal(res, 'failed', '') + assert not res['failed'] # Verify that it is gone with assert_raises(errors.NotFound): @@ -367,7 +367,7 @@ class test_automount_direct(AutomountTest): """ res = api.Command['automountlocation_del'](self.locname)['result'] assert res - assert_attr_equal(res, 'failed', '') + assert not res['failed'] # Verity that it is gone with assert_raises(errors.NotFound): @@ -443,7 +443,7 @@ class test_automount_indirect(AutomountTest): """ res = api.Command['automountkey_del'](self.locname, self.parentmap, **self.key_kw)['result'] assert res - assert_attr_equal(res, 'failed', '') + assert not res['failed'] # Verify that it is gone with assert_raises(errors.NotFound): @@ -455,7 +455,7 @@ class test_automount_indirect(AutomountTest): """ res = api.Command['automountmap_del'](self.locname, self.mapname)['result'] assert res - assert_attr_equal(res, 'failed', '') + assert not res['failed'] # Verify that it is gone with assert_raises(errors.NotFound): @@ -467,7 +467,7 @@ class test_automount_indirect(AutomountTest): """ res = api.Command['automountlocation_del'](self.locname)['result'] assert res - assert_attr_equal(res, 'failed', '') + assert not res['failed'] # Verity that it is gone with assert_raises(errors.NotFound): @@ -551,7 +551,7 @@ class test_automount_indirect_no_parent(AutomountTest): delkey_kw={'automountkey': self.keyname, 'automountinformation': self.mapname} res = api.Command['automountkey_del'](self.locname, self.parentmap, **delkey_kw)['result'] assert res - assert_attr_equal(res, 'failed', '') + assert not res['failed'] # Verify that it is gone with assert_raises(errors.NotFound): @@ -563,7 +563,7 @@ class test_automount_indirect_no_parent(AutomountTest): """ res = api.Command['automountmap_del'](self.locname, self.mapname)['result'] assert res - assert_attr_equal(res, 'failed', '') + assert not res['failed'] # Verify that it is gone with assert_raises(errors.NotFound): @@ -575,7 +575,7 @@ class test_automount_indirect_no_parent(AutomountTest): """ res = api.Command['automountlocation_del'](self.locname)['result'] assert res - assert_attr_equal(res, 'failed', '') + assert not res['failed'] # Verity that it is gone with assert_raises(errors.NotFound): diff --git a/ipatests/test_xmlrpc/test_batch_plugin.py b/ipatests/test_xmlrpc/test_batch_plugin.py index 2b056c93f..7f5a09fc7 100644 --- a/ipatests/test_xmlrpc/test_batch_plugin.py +++ b/ipatests/test_xmlrpc/test_batch_plugin.py @@ -104,8 +104,8 @@ class test_batch(Declarative): error=None), dict( summary=u'Deleted group "%s"' % group1, - result=dict(failed=u''), - value=group1, + result=dict(failed=[]), + value=[group1], error=None), ), ), diff --git a/ipatests/test_xmlrpc/test_config_plugin.py b/ipatests/test_xmlrpc/test_config_plugin.py index 56baf7f0b..6880d6139 100644 --- a/ipatests/test_xmlrpc/test_config_plugin.py +++ b/ipatests/test_xmlrpc/test_config_plugin.py @@ -37,7 +37,7 @@ class test_config(Declarative): dict(addattr=u'ipauserobjectclasses=ipahost')), expected=dict( result=lambda d: 'ipahost' in d['ipauserobjectclasses'], - value=u'', + value=None, summary=None, ), ), @@ -48,7 +48,7 @@ class test_config(Declarative): dict(delattr=u'ipauserobjectclasses=ipahost')), expected=dict( result=lambda d: 'ipahost' not in d['ipauserobjectclasses'], - value=u'', + value=None, summary=None, ), ), @@ -123,7 +123,7 @@ class test_config(Declarative): command=('config_mod', [], dict(ipauserauthtype=u'password')), expected=dict( result=lambda d: d['ipauserauthtype'] == (u'password',), - value=u'', + value=None, summary=None, ), ), @@ -133,7 +133,7 @@ class test_config(Declarative): command=('config_show', [], {}), expected=dict( result=lambda d: d['ipauserauthtype'] == (u'password',), - value=u'', + value=None, summary=None, ), ), @@ -143,7 +143,7 @@ class test_config(Declarative): command=('config_mod', [], dict(ipauserauthtype=None)), expected=dict( result=lambda d: 'ipauserauthtype' not in d, - value=u'', + value=None, summary=None, ), ), diff --git a/ipatests/test_xmlrpc/test_dns_plugin.py b/ipatests/test_xmlrpc/test_dns_plugin.py index dd434c2f5..7fbf37313 100644 --- a/ipatests/test_xmlrpc/test_dns_plugin.py +++ b/ipatests/test_xmlrpc/test_dns_plugin.py @@ -451,9 +451,9 @@ class test_dns(Declarative): desc='Delete reverse zone %r' % revzone1, command=('dnszone_del', [revzone1], {}), expected={ - 'value': revzone1, + 'value': [revzone1], 'summary': u'Deleted DNS zone "%s"' % revzone1, - 'result': {'failed': u''}, + 'result': {'failed': []}, }, ), @@ -560,7 +560,7 @@ class test_dns(Declarative): desc='Remove A record from %r in zone %r' % (name1, zone1), command=('dnsrecord_del', [zone1, name1], {'arecord': arec2}), expected={ - 'value': name1, + 'value': [name1], 'summary': None, 'result': { 'idnsname': [name1], @@ -897,9 +897,9 @@ class test_dns(Declarative): desc='Delete zone %r' % zone2, command=('dnszone_del', [zone2], {}), expected={ - 'value': zone2, + 'value': [zone2], 'summary': u'Deleted DNS zone "%s"' % zone2, - 'result': {'failed': u''}, + 'result': {'failed': []}, }, ), @@ -1026,9 +1026,9 @@ class test_dns(Declarative): desc='Delete record %r in zone %r' % (name1_renamed, zone1), command=('dnsrecord_del', [zone1, name1_renamed], {'del_all': True }), expected={ - 'value': name1_renamed, + 'value': [name1_renamed], 'summary': u'Deleted record "%s"' % name1_renamed, - 'result': {'failed': u''}, + 'result': {'failed': []}, }, ), @@ -1166,7 +1166,7 @@ class test_dns(Declarative): desc='Update global DNS settings', command=('dnsconfig_mod', [], {'idnsforwarders' : [fwd_ip],}), expected={ - 'value': u'', + 'value': None, 'summary': None, 'result': { 'idnsforwarders': [fwd_ip], @@ -1406,9 +1406,9 @@ class test_dns(Declarative): desc='Delete zone %r' % zone1, command=('dnszone_del', [zone1], {}), expected={ - 'value': zone1, + 'value': [zone1], 'summary': u'Deleted DNS zone "%s"' % zone1, - 'result': {'failed': u''}, + 'result': {'failed': []}, }, ), @@ -1469,9 +1469,9 @@ class test_dns(Declarative): desc='Delete zone %r' % zone1, command=('dnszone_del', [zone1], {}), expected={ - 'value': zone1, + 'value': [zone1], 'summary': u'Deleted DNS zone "%s"' % zone1, - 'result': {'failed': u''}, + 'result': {'failed': []}, }, ), diff --git a/ipatests/test_xmlrpc/test_dns_realmdomains_integration.py b/ipatests/test_xmlrpc/test_dns_realmdomains_integration.py index 1e46d362e..ccb3e77c9 100644 --- a/ipatests/test_xmlrpc/test_dns_realmdomains_integration.py +++ b/ipatests/test_xmlrpc/test_dns_realmdomains_integration.py @@ -55,6 +55,8 @@ def assert_realmdomain_and_txt_record_present(response): def assert_realmdomain_and_txt_record_not_present(response): zone = response['value'] + if isinstance(zone, (tuple, list)): + zone = zone[0] r = api.Command['realmdomains_show']() assert zone not in r['result']['associateddomain'] @@ -159,9 +161,9 @@ class test_dns_realmdomains_integration(Declarative): 'during dnszone_del', command=('dnszone_del', [dnszone_1], {}), expected={ - 'value': dnszone_1, + 'value': [dnszone_1], 'summary': u'Deleted DNS zone "%s"' % dnszone_1, - 'result': {'failed': u''}, + 'result': {'failed': []}, }, extra_check=assert_realmdomain_and_txt_record_not_present, ), diff --git a/ipatests/test_xmlrpc/test_group_plugin.py b/ipatests/test_xmlrpc/test_group_plugin.py index 568e5851e..71172893b 100644 --- a/ipatests/test_xmlrpc/test_group_plugin.py +++ b/ipatests/test_xmlrpc/test_group_plugin.py @@ -554,8 +554,8 @@ class test_group(Declarative): desc='Remove group %r with external membership' % (group3), command=('group_del', [group3], {}), expected=dict( - result=dict(failed=u''), - value=group3, + result=dict(failed=[]), + value=[group3], summary=u'Deleted group "testgroup3"', ), ), @@ -693,8 +693,8 @@ class test_group(Declarative): desc='Delete %r' % group1, command=('group_del', [group1], {}), expected=dict( - result=dict(failed=u''), - value=group1, + result=dict(failed=[]), + value=[group1], summary=u'Deleted group "testgroup1"', ) ), @@ -728,8 +728,8 @@ class test_group(Declarative): desc='Delete %r' % group2, command=('group_del', [group2], {}), expected=dict( - result=dict(failed=u''), - value=group2, + result=dict(failed=[]), + value=[group2], summary=u'Deleted group "testgroup2"', ) ), @@ -859,8 +859,8 @@ class test_group(Declarative): desc='Now delete the unmanaged group %r' % user1, command=('group_del', [user1], {}), expected=dict( - result=dict(failed=u''), - value=user1, + result=dict(failed=[]), + value=[user1], summary=u'Deleted group "%s"' % user1, ) ), @@ -875,9 +875,9 @@ class test_group(Declarative): desc='Delete %r' % user1, command=('user_del', [user1], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "tuser1"', - value=user1, + value=[user1], ), ), @@ -1004,9 +1004,9 @@ class test_group(Declarative): desc='Delete %r' % user1, command=('user_del', [user1], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "%s"' % user1, - value=user1, + value=[user1], ), ), diff --git a/ipatests/test_xmlrpc/test_hbacsvcgroup_plugin.py b/ipatests/test_xmlrpc/test_hbacsvcgroup_plugin.py index 8140741d9..3aaaa36fb 100644 --- a/ipatests/test_xmlrpc/test_hbacsvcgroup_plugin.py +++ b/ipatests/test_xmlrpc/test_hbacsvcgroup_plugin.py @@ -236,9 +236,9 @@ class test_hbacsvcgroup(Declarative): desc='Delete %r' % hbacsvcgroup1, command=('hbacsvcgroup_del', [hbacsvcgroup1], {}), expected=dict( - value=hbacsvcgroup1, + value=[hbacsvcgroup1], summary=u'Deleted HBAC service group "testhbacsvcgroup1"', - result=dict(failed=u''), + result=dict(failed=[]), ), ), @@ -247,9 +247,9 @@ class test_hbacsvcgroup(Declarative): desc='Delete service %r' % hbacsvc1, command=('hbacsvc_del', [hbacsvc1], {}), expected=dict( - value=hbacsvc1, + value=[hbacsvc1], summary=u'Deleted HBAC service "%s"' % hbacsvc1, - result=dict(failed=u''), + result=dict(failed=[]), ), ) diff --git a/ipatests/test_xmlrpc/test_host_plugin.py b/ipatests/test_xmlrpc/test_host_plugin.py index af42ee54d..6a9e9f17c 100644 --- a/ipatests/test_xmlrpc/test_host_plugin.py +++ b/ipatests/test_xmlrpc/test_host_plugin.py @@ -585,9 +585,9 @@ class test_host(Declarative): desc='Delete %r' % fqdn1, command=('host_del', [fqdn1], {}), expected=dict( - value=fqdn1, + value=[fqdn1], summary=u'Deleted host "%s"' % fqdn1, - result=dict(failed=u''), + result=dict(failed=[]), ), ), @@ -661,9 +661,9 @@ class test_host(Declarative): desc='Delete using host name %r' % short1, command=('host_del', [short1], {}), expected=dict( - value=short1, + value=[short1], summary=u'Deleted host "%s"' % short1, - result=dict(failed=u''), + result=dict(failed=[]), ), ), @@ -831,9 +831,9 @@ class test_host(Declarative): desc='Delete %r' % fqdn3, command=('host_del', [fqdn3], {}), expected=dict( - value=fqdn3, + value=[fqdn3], summary=u'Deleted host "%s"' % fqdn3, - result=dict(failed=u''), + result=dict(failed=[]), ), ), diff --git a/ipatests/test_xmlrpc/test_hostgroup_plugin.py b/ipatests/test_xmlrpc/test_hostgroup_plugin.py index b610979ec..017d8ad2d 100644 --- a/ipatests/test_xmlrpc/test_hostgroup_plugin.py +++ b/ipatests/test_xmlrpc/test_hostgroup_plugin.py @@ -261,9 +261,9 @@ class test_hostgroup(Declarative): desc='Delete %r' % hostgroup1, command=('hostgroup_del', [hostgroup1], {}), expected=dict( - value=hostgroup1, + value=[hostgroup1], summary=u'Deleted hostgroup "testhostgroup1"', - result=dict(failed=u''), + result=dict(failed=[]), ), ), @@ -293,9 +293,9 @@ class test_hostgroup(Declarative): desc='Delete %r' % hostgroup_single, command=('hostgroup_del', [hostgroup_single], {}), expected=dict( - value=hostgroup_single, + value=[hostgroup_single], summary=u'Deleted hostgroup "a"', - result=dict(failed=u''), + result=dict(failed=[]), ), ), @@ -304,9 +304,9 @@ class test_hostgroup(Declarative): desc='Delete host %r' % fqdn1, command=('host_del', [fqdn1], {}), expected=dict( - value=fqdn1, + value=[fqdn1], summary=u'Deleted host "%s"' % fqdn1, - result=dict(failed=u''), + result=dict(failed=[]), ), ) diff --git a/ipatests/test_xmlrpc/test_krbtpolicy.py b/ipatests/test_xmlrpc/test_krbtpolicy.py index 6d7d1b6ef..33034f4ed 100644 --- a/ipatests/test_xmlrpc/test_krbtpolicy.py +++ b/ipatests/test_xmlrpc/test_krbtpolicy.py @@ -42,7 +42,7 @@ class test_krbtpolicy(Declarative): 'krbtpolicy_reset', [], {} ), expected=dict( - value=u'', + value=None, summary=None, result=dict( krbmaxticketlife=[u'86400'], @@ -58,7 +58,7 @@ class test_krbtpolicy(Declarative): 'krbtpolicy_show', [], {} ), expected=dict( - value=u'', + value=None, summary=None, result=dict( dn=DN(('cn',api.env.domain),('cn','kerberos'), @@ -76,7 +76,7 @@ class test_krbtpolicy(Declarative): 'krbtpolicy_mod', [], dict(krbmaxticketlife=3600) ), expected=dict( - value=u'', + value=None, summary=None, result=dict( krbmaxticketlife=[u'3600'], diff --git a/ipatests/test_xmlrpc/test_netgroup_plugin.py b/ipatests/test_xmlrpc/test_netgroup_plugin.py index dd3a8b84c..162879884 100644 --- a/ipatests/test_xmlrpc/test_netgroup_plugin.py +++ b/ipatests/test_xmlrpc/test_netgroup_plugin.py @@ -200,9 +200,9 @@ class test_netgroup(Declarative): desc='Delete %r' % netgroup_single, command=('netgroup_del', [netgroup_single], {}), expected=dict( - value=netgroup_single, + value=[netgroup_single], summary=u'Deleted netgroup "%s"' % netgroup_single, - result=dict(failed=u''), + result=dict(failed=[]), ), ), @@ -1281,9 +1281,9 @@ class test_netgroup(Declarative): desc='Delete %r' % netgroup1, command=('netgroup_del', [netgroup1], {}), expected=dict( - value=netgroup1, + value=[netgroup1], summary=u'Deleted netgroup "%s"' % netgroup1, - result=dict(failed=u''), + result=dict(failed=[]), ), ), diff --git a/ipatests/test_xmlrpc/test_permission_plugin.py b/ipatests/test_xmlrpc/test_permission_plugin.py index 54e8d57dd..24585beae 100644 --- a/ipatests/test_xmlrpc/test_permission_plugin.py +++ b/ipatests/test_xmlrpc/test_permission_plugin.py @@ -1217,8 +1217,8 @@ class test_permission(Declarative): desc='Delete %r' % permission1_renamed_ucase, command=('permission_del', [permission1_renamed_ucase], {}), expected=dict( - result=dict(failed=u''), - value=permission1_renamed_ucase, + result=dict(failed=[]), + value=[permission1_renamed_ucase], summary=u'Deleted permission "%s"' % permission1_renamed_ucase, ) ), @@ -1253,8 +1253,8 @@ class test_permission(Declarative): desc='Delete %r' % permission2, command=('permission_del', [permission2], {}), expected=dict( - result=dict(failed=u''), - value=permission2, + result=dict(failed=[]), + value=[permission2], summary=u'Deleted permission "%s"' % permission2, ) ), @@ -1277,8 +1277,8 @@ class test_permission(Declarative): desc='Delete %r' % privilege1, command=('privilege_del', [privilege1], {}), expected=dict( - result=dict(failed=u''), - value=privilege1, + result=dict(failed=[]), + value=[privilege1], summary=u'Deleted privilege "%s"' % privilege1, ) ), @@ -1410,8 +1410,8 @@ class test_permission(Declarative): desc='Delete %r' % permission1, command=('permission_del', [permission1], {}), expected=dict( - result=dict(failed=u''), - value=permission1, + result=dict(failed=[]), + value=[permission1], summary=u'Deleted permission "%s"' % permission1, ) ), @@ -2697,8 +2697,8 @@ def _make_permission_flag_tests(flags, expected_message): desc='Delete %r with --force' % permission1, command=('permission_del', [permission1], {'force': True}), expected=dict( - result=dict(failed=u''), - value=permission1, + result=dict(failed=[]), + value=[permission1], summary=u'Deleted permission "%s"' % permission1, ), ), @@ -3571,8 +3571,8 @@ class test_managed_permissions(Declarative): desc='Delete %r with --force' % permission1, command=('permission_del', [permission1], {'force': True}), expected=dict( - result=dict(failed=u''), - value=permission1, + result=dict(failed=[]), + value=[permission1], summary=u'Deleted permission "%s"' % permission1, ), ), @@ -3826,8 +3826,8 @@ class test_permission_filters(Declarative): desc='Delete %r' % permission1, command=('permission_del', [permission1], {}), expected=dict( - result=dict(failed=u''), - value=permission1, + result=dict(failed=[]), + value=[permission1], summary=u'Deleted permission "%s"' % permission1, ) ), diff --git a/ipatests/test_xmlrpc/test_privilege_plugin.py b/ipatests/test_xmlrpc/test_privilege_plugin.py index 0f0e2f046..3d59c552a 100644 --- a/ipatests/test_xmlrpc/test_privilege_plugin.py +++ b/ipatests/test_xmlrpc/test_privilege_plugin.py @@ -410,8 +410,8 @@ class test_privilege(Declarative): desc='Delete %r' % privilege1, command=('privilege_del', [privilege1], {}), expected=dict( - result=dict(failed=u''), - value=privilege1, + result=dict(failed=[]), + value=[privilege1], summary=u'Deleted privilege "%s"' % privilege1, ) ), diff --git a/ipatests/test_xmlrpc/test_radiusproxy_plugin.py b/ipatests/test_xmlrpc/test_radiusproxy_plugin.py index d3be060e9..beb0b8c38 100644 --- a/ipatests/test_xmlrpc/test_radiusproxy_plugin.py +++ b/ipatests/test_xmlrpc/test_radiusproxy_plugin.py @@ -373,9 +373,9 @@ class test_raduisproxy(Declarative): desc='Delete %r' % radius1, command=('radiusproxy_del', [radius1], {}), expected=dict( - value=radius1, + value=[radius1], summary=u'Deleted RADIUS proxy server "%s"' % radius1, - result=dict(failed=u''), + result=dict(failed=[]), ), ), diff --git a/ipatests/test_xmlrpc/test_range_plugin.py b/ipatests/test_xmlrpc/test_range_plugin.py index 562bcf638..3b7a393e8 100644 --- a/ipatests/test_xmlrpc/test_range_plugin.py +++ b/ipatests/test_xmlrpc/test_range_plugin.py @@ -323,8 +323,8 @@ class test_range(Declarative): desc='Delete user %r' % user1, command=('user_del', [user1], {}), expected=dict( - result=dict(failed=u''), - value=user1, + result=dict(failed=[]), + value=[user1], summary=u'Deleted user "%s"' % user1, ), ), @@ -334,8 +334,8 @@ class test_range(Declarative): desc='Delete group %r' % group1, command=('group_del', [group1], {}), expected=dict( - result=dict(failed=u''), - value=group1, + result=dict(failed=[]), + value=[group1], summary=u'Deleted group "%s"' % group1, ), ), @@ -345,8 +345,8 @@ class test_range(Declarative): desc='Delete ID range %r' % testrange1, command=('idrange_del', [testrange1], {}), expected=dict( - result=dict(failed=u''), - value=testrange1, + result=dict(failed=[]), + value=[testrange1], summary=u'Deleted ID range "%s"' % testrange1, ), ), @@ -442,8 +442,8 @@ class test_range(Declarative): desc='Delete ID range %r' % testrange2, command=('idrange_del', [testrange2], {}), expected=dict( - result=dict(failed=u''), - value=testrange2, + result=dict(failed=[]), + value=[testrange2], summary=u'Deleted ID range "%s"' % testrange2, ), ), @@ -476,8 +476,8 @@ class test_range(Declarative): desc='Delete ID range %r' % testrange8, command=('idrange_del', [testrange8], {}), expected=dict( - result=dict(failed=u''), - value=testrange8, + result=dict(failed=[]), + value=[testrange8], summary=u'Deleted ID range "%s"' % testrange8, ), ), @@ -486,8 +486,8 @@ class test_range(Declarative): desc='Delete non-active AD trusted range %r' % testrange9, command=('idrange_del', [testrange9], {}), expected=dict( - result=dict(failed=u''), - value=testrange9, + result=dict(failed=[]), + value=[testrange9], summary=u'Deleted ID range "%s"' % testrange9, ), ), diff --git a/ipatests/test_xmlrpc/test_realmdomains_plugin.py b/ipatests/test_xmlrpc/test_realmdomains_plugin.py index 1d4dda3d2..a47fd6b98 100644 --- a/ipatests/test_xmlrpc/test_realmdomains_plugin.py +++ b/ipatests/test_xmlrpc/test_realmdomains_plugin.py @@ -45,7 +45,7 @@ class test_realmdomains(Declarative): desc='Retrieve realm domains', command=('realmdomains_show', [], {}), expected=dict( - value=u'', + value=None, summary=None, result=dict( dn=dn, @@ -57,7 +57,7 @@ class test_realmdomains(Declarative): desc='Retrieve realm domains - print all attributes', command=('realmdomains_show', [], {'all': True}), expected=dict( - value=u'', + value=None, summary=None, result=dict( dn=dn, @@ -80,7 +80,7 @@ class test_realmdomains(Declarative): desc='Replace list of realm domains with "%s"' % [our_domain, new_domain_1], command=('realmdomains_mod', [], {'associateddomain': [our_domain, new_domain_1]}), expected=dict( - value=u'', + value=None, summary=None, result=dict( associateddomain=[our_domain, new_domain_1], @@ -91,7 +91,7 @@ class test_realmdomains(Declarative): desc='Add domain "%s" to list' % new_domain_2, command=('realmdomains_mod', [], {'add_domain': new_domain_2}), expected=dict( - value=u'', + value=None, summary=None, result=dict( associateddomain=[our_domain, new_domain_1, new_domain_2], @@ -102,7 +102,7 @@ class test_realmdomains(Declarative): desc='Delete domain "%s" from list' % new_domain_2, command=('realmdomains_mod', [], {'del_domain': new_domain_2}), expected=dict( - value=u'', + value=None, summary=None, result=dict( associateddomain=[our_domain, new_domain_1], @@ -113,7 +113,7 @@ class test_realmdomains(Declarative): desc='Add domain "%s" and delete domain "%s"' % (new_domain_2, new_domain_1), command=('realmdomains_mod', [], {'add_domain': new_domain_2, 'del_domain': new_domain_1}), expected=dict( - value=u'', + value=None, summary=None, result=dict( associateddomain=[our_domain, new_domain_2], @@ -163,7 +163,7 @@ class test_realmdomains(Declarative): desc='Add an invalid domain "%s" with --force option' % bad_domain, command=('realmdomains_mod', [], {'add_domain': bad_domain, 'force': True}), expected=dict( - value=u'', + value=None, summary=None, result=dict( associateddomain=[our_domain, new_domain_2, bad_domain], diff --git a/ipatests/test_xmlrpc/test_role_plugin.py b/ipatests/test_xmlrpc/test_role_plugin.py index 119bfb1a8..f400b0fa8 100644 --- a/ipatests/test_xmlrpc/test_role_plugin.py +++ b/ipatests/test_xmlrpc/test_role_plugin.py @@ -468,8 +468,8 @@ class test_role(Declarative): desc='Delete %r' % group1, command=('group_del', [group1], {}), expected=dict( - result=dict(failed=u''), - value=group1, + result=dict(failed=[]), + value=[group1], summary=u'Deleted group "testgroup1"', ) ), @@ -554,8 +554,8 @@ class test_role(Declarative): desc='Delete %r' % role1, command=('role_del', [role1], {}), expected=dict( - result=dict(failed=u''), - value=role1, + result=dict(failed=[]), + value=[role1], summary=u'Deleted role "%s"' % role1, ) ), @@ -604,8 +604,8 @@ class test_role(Declarative): desc='Delete %r' % role2, command=('role_del', [role2], {}), expected=dict( - result=dict(failed=u''), - value=role2, + result=dict(failed=[]), + value=[role2], summary=u'Deleted role "%s"' % role2, ) ), diff --git a/ipatests/test_xmlrpc/test_selinuxusermap_plugin.py b/ipatests/test_xmlrpc/test_selinuxusermap_plugin.py index 9089a1c5e..c987a0c53 100644 --- a/ipatests/test_xmlrpc/test_selinuxusermap_plugin.py +++ b/ipatests/test_xmlrpc/test_selinuxusermap_plugin.py @@ -572,8 +572,8 @@ class test_selinuxusermap(Declarative): desc='Try to delete similarly named HBAC rule %r' % hbacrule2, command=('hbacrule_del', [hbacrule2], {}), expected=dict( - result=dict(failed=u''), - value=hbacrule2, + result=dict(failed=[]), + value=[hbacrule2], summary=u'Deleted HBAC rule "%s"' % hbacrule2, ) ), @@ -584,8 +584,8 @@ class test_selinuxusermap(Declarative): desc='Delete %r' % rule1, command=('selinuxusermap_del', [rule1], {}), expected=dict( - result=dict(failed=u''), - value=rule1, + result=dict(failed=[]), + value=[rule1], summary=u'Deleted SELinux User Map "%s"' % rule1, ) ), @@ -780,8 +780,8 @@ class test_selinuxusermap(Declarative): desc='Delete %r' % rule1, command=('selinuxusermap_del', [rule1], {}), expected=dict( - result=dict(failed=u''), - value=rule1, + result=dict(failed=[]), + value=[rule1], summary=u'Deleted SELinux User Map "%s"' % rule1, ) ), @@ -823,8 +823,8 @@ class test_selinuxusermap(Declarative): desc='Delete %r' % rule1, command=('selinuxusermap_del', [rule1], {}), expected=dict( - result=dict(failed=u''), - value=rule1, + result=dict(failed=[]), + value=[rule1], summary=u'Deleted SELinux User Map "%s"' % rule1, ) ), @@ -865,8 +865,8 @@ class test_selinuxusermap(Declarative): desc='Delete %r' % rule1, command=('selinuxusermap_del', [rule1], {}), expected=dict( - result=dict(failed=u''), - value=rule1, + result=dict(failed=[]), + value=[rule1], summary=u'Deleted SELinux User Map "%s"' % rule1, ) ), @@ -899,8 +899,8 @@ class test_selinuxusermap(Declarative): desc='Delete %r' % rule1, command=('selinuxusermap_del', [rule1], {}), expected=dict( - result=dict(failed=u''), - value=rule1, + result=dict(failed=[]), + value=[rule1], summary=u'Deleted SELinux User Map "%s"' % rule1, ) ), diff --git a/ipatests/test_xmlrpc/test_service_plugin.py b/ipatests/test_xmlrpc/test_service_plugin.py index c11612e6b..532d9888c 100644 --- a/ipatests/test_xmlrpc/test_service_plugin.py +++ b/ipatests/test_xmlrpc/test_service_plugin.py @@ -543,9 +543,9 @@ class test_service(Declarative): desc='Delete %r' % service1, command=('service_del', [service1], {}), expected=dict( - value=service1, + value=[service1], summary=u'Deleted service "%s"' % service1, - result=dict(failed=u''), + result=dict(failed=[]), ), ), diff --git a/ipatests/test_xmlrpc/test_sudocmd_plugin.py b/ipatests/test_xmlrpc/test_sudocmd_plugin.py index fe91705c2..2bcf4920f 100644 --- a/ipatests/test_xmlrpc/test_sudocmd_plugin.py +++ b/ipatests/test_xmlrpc/test_sudocmd_plugin.py @@ -281,9 +281,9 @@ class test_sudocmd(Declarative): desc='Delete %r' % sudocmd1, command=('sudocmd_del', [sudocmd1], {}), expected=dict( - value=sudocmd1, + value=[sudocmd1], summary=u'Deleted Sudo Command "%s"' % sudocmd1, - result=dict(failed=u''), + result=dict(failed=[]), ), ), diff --git a/ipatests/test_xmlrpc/test_sudocmdgroup_plugin.py b/ipatests/test_xmlrpc/test_sudocmdgroup_plugin.py index 397d47683..281b0a10c 100644 --- a/ipatests/test_xmlrpc/test_sudocmdgroup_plugin.py +++ b/ipatests/test_xmlrpc/test_sudocmdgroup_plugin.py @@ -600,8 +600,8 @@ class test_sudocmdgroup(Declarative): desc='Delete %r' % sudocmdgroup1, command=('sudocmdgroup_del', [sudocmdgroup1], {}), expected=dict( - result=dict(failed=u''), - value=sudocmdgroup1, + result=dict(failed=[]), + value=[sudocmdgroup1], summary=u'Deleted Sudo Command Group "testsudocmdgroup1"', ) ), @@ -638,8 +638,8 @@ class test_sudocmdgroup(Declarative): desc='Delete %r' % sudocmdgroup2, command=('sudocmdgroup_del', [sudocmdgroup2], {}), expected=dict( - result=dict(failed=u''), - value=sudocmdgroup2, + result=dict(failed=[]), + value=[sudocmdgroup2], summary=u'Deleted Sudo Command Group "testsudocmdgroup2"', ) ), @@ -676,8 +676,8 @@ class test_sudocmdgroup(Declarative): desc='Now delete the sudo command %r' % sudocmd1, command=('sudocmd_del', [sudocmd1], {}), expected=dict( - result=dict(failed=u''), - value=sudocmd1, + result=dict(failed=[]), + value=[sudocmd1], summary=u'Deleted Sudo Command "%s"' % sudocmd1, ) ), diff --git a/ipatests/test_xmlrpc/test_user_plugin.py b/ipatests/test_xmlrpc/test_user_plugin.py index b7febe745..edeebc965 100644 --- a/ipatests/test_xmlrpc/test_user_plugin.py +++ b/ipatests/test_xmlrpc/test_user_plugin.py @@ -519,9 +519,9 @@ class test_user(Declarative): desc='Delete "%s"' % user1, command=('user_del', [user1], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "%s"' % user1, - value=user1, + value=[user1], ), ), @@ -574,9 +574,9 @@ class test_user(Declarative): desc='Delete "%s"' % user1, command=('user_del', [user1], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "%s"' % user1, - value=user1, + value=[user1], ), ), @@ -646,9 +646,9 @@ class test_user(Declarative): desc='Delete "%s" and "%s" at the same time' % (user1, user2), command=('user_del', [user1, user2], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "tuser1,tuser2"', - value=u','.join((user1, user2)), + value=[user1, user2], ), ), @@ -782,9 +782,9 @@ class test_user(Declarative): desc='Delete "%s"' % user1, command=('user_del', [user1], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "%s"' % user1, - value=user1, + value=[user1], ), ), @@ -811,9 +811,9 @@ class test_user(Declarative): desc='Delete "%s"' % user1, command=('user_del', [user1], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "%s"' % user1, - value=user1, + value=[user1], ), ), @@ -849,9 +849,9 @@ class test_user(Declarative): desc='Delete "%s"' % user2, command=('user_del', [user2], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "%s"' % user2, - value=user2, + value=[user2], ), ), @@ -892,9 +892,9 @@ class test_user(Declarative): desc='Delete "%s"' % user1, command=('user_del', [user1], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "%s"' % user1, - value=user1, + value=[user1], ), ), @@ -932,9 +932,9 @@ class test_user(Declarative): desc='Delete "%s"' % user1, command=('user_del', [user1], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "%s"' % user1, - value=user1, + value=[user1], ), ), @@ -971,9 +971,9 @@ class test_user(Declarative): desc='Delete "%s"' % user1, command=('user_del', [user1], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "%s"' % user1, - value=user1, + value=[user1], ), ), @@ -1008,9 +1008,9 @@ class test_user(Declarative): desc='Delete "%s"' % user2, command=('user_del', [user2], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "%s"' % user2, - value=user2, + value=[user2], ), ), @@ -1116,9 +1116,9 @@ class test_user(Declarative): desc='Delete %r' % renameduser1, command=('user_del', [renameduser1], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "%s"' % renameduser1, - value=renameduser1, + value=[renameduser1], ), ), @@ -1255,9 +1255,9 @@ class test_user(Declarative): desc='Delete 2nd admin "%s"' % admin2, command=('user_del', [admin2], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "%s"' % admin2, - value=admin2, + value=[admin2], ), ), @@ -1324,9 +1324,9 @@ class test_user(Declarative): desc='Delete "%s"' % user2, command=('user_del', [user2], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "%s"' % user2, - value=user2, + value=[user2], ), ), @@ -1362,9 +1362,9 @@ class test_user(Declarative): desc='Delete "%s"' % user1, command=('user_del', [user1], {}), expected=dict( - result=dict(failed=u''), + result=dict(failed=[]), summary=u'Deleted user "%s"' % user1, - value=user1, + value=[user1], ), ), -- cgit