Update the command-line options to more closely match v1

This commit is contained in:
Rob Crittenden 2008-10-21 16:32:30 -04:00
parent bc5edcf893
commit 8d07faed4d

View File

@ -55,11 +55,11 @@ class user(frontend.Object):
takes_params = ( takes_params = (
Param('givenname', Param('givenname',
cli_name='first', cli_name='first',
doc='User first name', doc='User\'s first name',
), ),
Param('sn', Param('sn',
cli_name='last', cli_name='last',
doc='User last name', doc='User\'s last name',
), ),
Param('uid', Param('uid',
cli_name='user', cli_name='user',
@ -68,22 +68,40 @@ class user(frontend.Object):
normalize=lambda value: value.lower(), normalize=lambda value: value.lower(),
), ),
Param('gecos?', Param('gecos?',
doc='GECOS field', doc='Set the GECOS field',
default_from=lambda uid: uid, default_from=lambda uid: uid,
), ),
Param('homedirectory?', Param('homedirectory?',
cli_name='home', cli_name='home',
doc='Path of user home directory', doc='Set the User\'s home directory',
default_from=lambda uid: '/home/%s' % uid, default_from=lambda uid: '/home/%s' % uid,
), ),
Param('loginshell?', Param('loginshell?',
cli_name='shell', cli_name='shell',
default=u'/bin/sh', default=u'/bin/sh',
doc='Login shell', doc='Set User\'s Login shell',
), ),
Param('krbprincipalname?', cli_name='principal', Param('krbprincipalname?', cli_name='principal',
default_from=lambda uid: '%s@EXAMPLE.COM' % uid, doc='Set User\'s Kerberos Principal name',
default_from=lambda uid: '%s@%s' % (uid, api.env.realm),
), ),
Param('mailaddress?',
cli_name='mail',
doc='Set User\'s e-mail address',
),
Param('userpassword?',
cli_name='password',
doc='Set User\'s password',
),
Param('groups?',
doc='Add account to one or more groups (comma-separated)',
),
Param('uidnumber?',
cli_name='uid',
type=ipa_types.Int(),
doc='The uid to use for this user. If not included one is automatically set.',
),
) )
api.register(user) api.register(user)