From d05ace8fba6ea4a61c1070d5e5687aaa5d2aee2b Mon Sep 17 00:00:00 2001 From: Jr Aquino Date: Tue, 30 Aug 2011 17:48:15 -0700 Subject: 34 Create FreeIPA CLI Plugin for the 389 Auto Membership plugin Added new container in etc to hold the automembership configs. Modified constants to point to the new container Modified dsinstance to create the container Created automember.py to add the new commands Added xmlrpc test to verify functionality Added minor fix to user.py for constant behavior between memberof and automember https://fedorahosted.org/freeipa/ticket/1272 --- API.txt | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) (limited to 'API.txt') diff --git a/API.txt b/API.txt index b7578b66f..d61e7e15d 100644 --- a/API.txt +++ b/API.txt @@ -99,6 +99,119 @@ option: Str('version?', exclude='webui', flags=['no_option', 'no_output']) output: Output('summary', (, ), 'User-friendly description of action performed') output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) output: Output('value', , "The primary_key value of the entry, e.g. 'jdoe' for a user") +command: automember_add +args: 1,5,3 +arg: Str('cn', cli_name='automember_rule', label=Gettext('Automember Rule', domain='ipa', localedir=None), normalizer=) +option: Str('description', attribute=True, cli_name='desc', label=Gettext('Description', domain='ipa', localedir=None), multivalue=False, required=False) +option: StrEnum('type', label=Gettext('Grouping Type', domain='ipa', localedir=None), values=(u'group', u'hostgroup')) +option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui', flags=['no_output']) +option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui', flags=['no_output']) +option: Str('version?', exclude='webui', flags=['no_option', 'no_output']) +output: Output('summary', (, ), 'User-friendly description of action performed') +output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) +output: Output('value', , "The primary_key value of the entry, e.g. 'jdoe' for a user") +command: automember_add_condition +args: 1,8,5 +arg: Str('cn', cli_name='automember_rule', label=Gettext('Automember Rule', domain='ipa', localedir=None), normalizer=) +option: Str('description', attribute=True, autofill=False, cli_name='desc', label=Gettext('Description', domain='ipa', localedir=None), multivalue=False, required=False) +option: List('automemberinclusiveregex?', alwaysask=True, cli_name='inclusive_regex', label=Gettext('Inclusive Regex', domain='ipa', localedir=None), multivalue=True) +option: List('automemberexclusiveregex?', alwaysask=True, cli_name='exclusive_regex', label=Gettext('Exclusive Regex', domain='ipa', localedir=None), multivalue=True) +option: Str('key', flags=['no_create', 'no_update', 'no_search'], label=Gettext('Attribute Key', domain='ipa', localedir=None)) +option: StrEnum('type', label=Gettext('Grouping Type', domain='ipa', localedir=None), values=(u'group', u'hostgroup')) +option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui', flags=['no_output']) +option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui', flags=['no_output']) +option: Str('version?', exclude='webui', flags=['no_option', 'no_output']) +output: Output('summary', (, ), 'User-friendly description of action performed') +output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) +output: Output('value', , "The primary_key value of the entry, e.g. 'jdoe' for a user") +output: Output('failed', , Gettext('Conditions that could not be added', domain='ipa', localedir=None)) +output: Output('completed', , Gettext('Number of conditions added', domain='ipa', localedir=None)) +command: automember_default_group_remove +args: 0,5,3 +option: Str('description', attribute=True, autofill=False, cli_name='desc', label=Gettext('Description', domain='ipa', localedir=None), multivalue=False, required=False) +option: StrEnum('type', label=Gettext('Grouping Type', domain='ipa', localedir=None), values=(u'group', u'hostgroup')) +option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui', flags=['no_output']) +option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui', flags=['no_output']) +option: Str('version?', exclude='webui', flags=['no_option', 'no_output']) +output: Output('summary', (, ), 'User-friendly description of action performed') +output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) +output: Output('value', , "The primary_key value of the entry, e.g. 'jdoe' for a user") +command: automember_default_group_set +args: 0,6,3 +option: Str('description', attribute=True, autofill=False, cli_name='desc', label=Gettext('Description', domain='ipa', localedir=None), multivalue=False, required=False) +option: Str('automemberdefaultgroup', cli_name='default_group', flags=['no_create', 'no_update'], label=Gettext('Default Group', domain='ipa', localedir=None)) +option: StrEnum('type', label=Gettext('Grouping Type', domain='ipa', localedir=None), values=(u'group', u'hostgroup')) +option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui', flags=['no_output']) +option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui', flags=['no_output']) +option: Str('version?', exclude='webui', flags=['no_option', 'no_output']) +output: Output('summary', (, ), 'User-friendly description of action performed') +output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) +output: Output('value', , "The primary_key value of the entry, e.g. 'jdoe' for a user") +command: automember_default_group_show +args: 0,4,3 +option: StrEnum('type', label=Gettext('Grouping Type', domain='ipa', localedir=None), values=(u'group', u'hostgroup')) +option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui', flags=['no_output']) +option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui', flags=['no_output']) +option: Str('version?', exclude='webui', flags=['no_option', 'no_output']) +output: Output('summary', (, ), 'User-friendly description of action performed') +output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) +output: Output('value', , "The primary_key value of the entry, e.g. 'jdoe' for a user") +command: automember_del +args: 1,1,3 +arg: Str('cn', cli_name='automember_rule', label=Gettext('Automember Rule', domain='ipa', localedir=None), normalizer=) +option: StrEnum('type', label=Gettext('Grouping Type', domain='ipa', localedir=None), values=(u'group', u'hostgroup')) +output: Output('summary', (, ), 'User-friendly description of action performed') +output: Output('result', , 'list of deletions that failed') +output: Output('value', , "The primary_key value of the entry, e.g. 'jdoe' for a user") +command: automember_find +args: 1,5,4 +arg: Str('criteria?', noextrawhitespace=False) +option: Str('description', attribute=True, autofill=False, cli_name='desc', label=Gettext('Description', domain='ipa', localedir=None), multivalue=False, query=True, required=False) +option: StrEnum('type', label=Gettext('Grouping Type', domain='ipa', localedir=None), values=(u'group', u'hostgroup')) +option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui', flags=['no_output']) +option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui', flags=['no_output']) +option: Str('version?', exclude='webui', flags=['no_option', 'no_output']) +output: Output('summary', (, ), 'User-friendly description of action performed') +output: ListOfEntries('result', (, ), Gettext('A list of LDAP entries', domain='ipa', localedir=None)) +output: Output('count', , 'Number of entries returned') +output: Output('truncated', , 'True if not all results were returned') +command: automember_mod +args: 1,5,3 +arg: Str('cn', cli_name='automember_rule', label=Gettext('Automember Rule', domain='ipa', localedir=None), normalizer=) +option: Str('description', attribute=True, autofill=False, cli_name='desc', label=Gettext('Description', domain='ipa', localedir=None), multivalue=False, required=False) +option: StrEnum('type', label=Gettext('Grouping Type', domain='ipa', localedir=None), values=(u'group', u'hostgroup')) +option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui', flags=['no_output']) +option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui', flags=['no_output']) +option: Str('version?', exclude='webui', flags=['no_option', 'no_output']) +output: Output('summary', (, ), 'User-friendly description of action performed') +output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) +output: Output('value', , "The primary_key value of the entry, e.g. 'jdoe' for a user") +command: automember_remove_condition +args: 1,8,5 +arg: Str('cn', cli_name='automember_rule', label=Gettext('Automember Rule', domain='ipa', localedir=None), normalizer=) +option: Str('description', attribute=True, autofill=False, cli_name='desc', label=Gettext('Description', domain='ipa', localedir=None), multivalue=False, required=False) +option: List('automemberinclusiveregex?', alwaysask=True, cli_name='inclusive_regex', label=Gettext('Inclusive Regex', domain='ipa', localedir=None), multivalue=True) +option: List('automemberexclusiveregex?', alwaysask=True, cli_name='exclusive_regex', label=Gettext('Exclusive Regex', domain='ipa', localedir=None), multivalue=True) +option: Str('key', flags=['no_create', 'no_update', 'no_search'], label=Gettext('Attribute Key', domain='ipa', localedir=None)) +option: StrEnum('type', label=Gettext('Grouping Type', domain='ipa', localedir=None), values=(u'group', u'hostgroup')) +option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui', flags=['no_output']) +option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui', flags=['no_output']) +option: Str('version?', exclude='webui', flags=['no_option', 'no_output']) +output: Output('summary', (, ), 'User-friendly description of action performed') +output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) +output: Output('value', , "The primary_key value of the entry, e.g. 'jdoe' for a user") +output: Output('failed', , Gettext('Conditions that could not be removed', domain='ipa', localedir=None)) +output: Output('completed', , Gettext('Number of conditions removed', domain='ipa', localedir=None)) +command: automember_show +args: 1,4,3 +arg: Str('cn', cli_name='automember_rule', label=Gettext('Automember Rule', domain='ipa', localedir=None), normalizer=) +option: StrEnum('type', label=Gettext('Grouping Type', domain='ipa', localedir=None), values=(u'group', u'hostgroup')) +option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui', flags=['no_output']) +option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui', flags=['no_output']) +option: Str('version?', exclude='webui', flags=['no_option', 'no_output']) +output: Output('summary', (, ), 'User-friendly description of action performed') +output: Entry('result', , Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None)) +output: Output('value', , "The primary_key value of the entry, e.g. 'jdoe' for a user") command: automountkey_add args: 2,7,3 arg: Str('automountlocationcn', cli_name='automountlocation', label=Gettext('Location', domain='ipa', localedir=None), query=True, required=True) -- cgit