summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-12-02 16:29:26 -0500
committerRob Crittenden <rcritten@redhat.com>2010-12-02 16:29:26 -0500
commit6c393e53b01222ba7629ce86384d0adb34f7f275 (patch)
tree8351b0bbf7a394f15ec4d7b751a93778e4a95741 /ipalib
parent78f1cf3629efae205d9eac49c7ab2eab4744c208 (diff)
downloadfreeipa-6c393e53b01222ba7629ce86384d0adb34f7f275.tar.gz
freeipa-6c393e53b01222ba7629ce86384d0adb34f7f275.tar.xz
freeipa-6c393e53b01222ba7629ce86384d0adb34f7f275.zip
This is the second half of a patch. Only the part that had to be
re-based got pushed for some reason. Use better description for group names in help and always prompt for members When running <foo>-[add|remove]-member completely interactively it didn't prompt for managing membership, it just reported that 0 members were handled which was rather confusing. This will work via a shell if you want to echo too: $ echo "" | ipa group-add-member g1 This returns 0 members because nothing is read for users or group members. $ echo -e "g1\nadmin\n" | ipa group-add-member This adds the user admin to the group g1. It adds it as a user because user membership is prompted for first. ticket 415
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/parameters.py1
-rw-r--r--ipalib/plugins/baseldap.py2
-rw-r--r--ipalib/plugins/group.py2
-rw-r--r--ipalib/plugins/hostgroup.py2
-rw-r--r--ipalib/plugins/sudocmdgroup.py2
-rw-r--r--ipalib/plugins/sudorule.py2
6 files changed, 6 insertions, 5 deletions
diff --git a/ipalib/parameters.py b/ipalib/parameters.py
index 7543e15f..cf4f3ba4 100644
--- a/ipalib/parameters.py
+++ b/ipalib/parameters.py
@@ -315,6 +315,7 @@ class Param(ReadOnly):
('exclude', frozenset, None),
('flags', frozenset, frozenset()),
('hint', (str, Gettext), None),
+ ('alwaysask', bool, False),
# The 'default' kwarg gets appended in Param.__init__():
# ('default', self.type, None),
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 3894e18d..f6b992fd 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -869,7 +869,7 @@ class LDAPModMember(LDAPQuery):
name = to_cli(ldap_obj_name)
doc = self.member_param_doc % ldap_obj.object_name_plural
yield List('%s?' % name, cli_name='%ss' % name, doc=doc,
- label=ldap_obj.object_name)
+ label=ldap_obj.object_name, alwaysask=True)
def get_member_dns(self, **options):
dns = {}
diff --git a/ipalib/plugins/group.py b/ipalib/plugins/group.py
index 290d7ba1..75f40c57 100644
--- a/ipalib/plugins/group.py
+++ b/ipalib/plugins/group.py
@@ -101,7 +101,7 @@ class group(LDAPObject):
pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$',
pattern_errmsg='may only include letters, numbers, _, -, . and $',
maxlength=255,
- cli_name='name',
+ cli_name='group_name',
label=_('Group name'),
primary_key=True,
normalizer=lambda value: value.lower(),
diff --git a/ipalib/plugins/hostgroup.py b/ipalib/plugins/hostgroup.py
index 51d05836..1c4cc28e 100644
--- a/ipalib/plugins/hostgroup.py
+++ b/ipalib/plugins/hostgroup.py
@@ -73,7 +73,7 @@ class hostgroup(LDAPObject):
takes_params = (
Str('cn',
- cli_name='name',
+ cli_name='hostgroup_name',
label=_('Host-group'),
doc=_('Name of host-group'),
primary_key=True,
diff --git a/ipalib/plugins/sudocmdgroup.py b/ipalib/plugins/sudocmdgroup.py
index c6cecaf5..5ce9e176 100644
--- a/ipalib/plugins/sudocmdgroup.py
+++ b/ipalib/plugins/sudocmdgroup.py
@@ -68,7 +68,7 @@ class sudocmdgroup(LDAPObject):
takes_params = (
Str('cn',
- cli_name='name',
+ cli_name='sudocmdgroup_name',
label=_('Sudo Command Group name'),
primary_key=True,
normalizer=lambda value: value.lower(),
diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py
index 6a81b86b..ff39fb9f 100644
--- a/ipalib/plugins/sudorule.py
+++ b/ipalib/plugins/sudorule.py
@@ -50,7 +50,7 @@ class sudorule(LDAPObject):
takes_params = (
Str('cn',
- cli_name='name',
+ cli_name='sudorule_name',
label=_('Rule name'),
primary_key=True,
),